Visa ämne
 Skriv ut ämne
Scriptarkiv
Jag hittar inget någonstans, så jag föreslår att ett upprättas.
Jag tänkte att jag börjar här och nu, med ett enkelt upplägg:

Scriptnamn
Kompabilitet (SP/MP)
Verision (OFP, A1, A2)
Syntax ([this] exec "script.sqs" o.s.v.)

Kod Källa  

script i codeformat



Om någon stör sig något alldeles grönjävligt på det här får ni väl vidta åtgärder...
Ett första script, ganska simpelt men användbart:
Kallar in en helikopter som plockar upp dig när du har kastat en grön rökgranat.


greensmoke.sqs
SP
A1
this exec "greensmoke.sqs"

Kod Källa  


; Readme by Ogion
; You need on the map:
;  1 helicopter named heli1
;  1 green smokeshell
;  1 helipad named base
;  1 trigger configured as you wish. I used radio Alpha in my testing.
; I named this script greensmoke.sqs and called it by syntax: this exec "greensmoke.sqs"

; Creates the marker
createMarker ["smokecheck",position player];
"smokecheck" setMarkerSize [0,0];
"smokecheck" setMarkerType "dot";

; Checks the smoke
@((count ((markerpos "smokecheck") nearObjects ["SmokeshellGreen",50])) > 0)
player sideChat "Smoke out";

createMarker ["LZ",position player];
"LZ" setMarkerSize [0,0];
"LZ" setMarkerType "dot";

; Gets a pilot in the chopper
rescue = createGroup WEST;
_Leader="SoldierWPilot" createUnit [getPos base, rescue, "rescue=this;this moveInDriver heli1", 1, "Sergeant "];

; Takes off
_wp1 = group rescue addWaypoint [getpos base, 1];
[group rescue, 1] setWPPos getMarkerpos "LZ";
[group rescue, 1] setWaypointType "LOAD";
[group rescue, 1] setWaypointStatements ["true", "heli1 land ""LAND"" "]
[group rescue, 1] setWaypointTimeout [20, 20, 20]
[west,"HQ"] sideChat "Resuce One en route. Please stand by.";

; Returns to base
_wp2 = group rescue addWaypoint [getpos base, 1];
[group rescue, 2] setWPPos getpos base;
[group rescue, 2] setWaypointType "GETOUT";

; Removes the redundant markers
deleteMarker "LZ"
deleteMarker "smokecheck"

exit
Bygger upp ett kraftverk med förstörbara objekt.
Lätt att möblera om så att layouten passar ens önskemål.

powerplant.sqs
SP/MP
A1
this exec "powerplant.sqs"

Kod Källa  


; ****************************************************************
; Script file for Armed Assault
; Created by: Ogion
; Place a marker on the map named powerplant1
; ****************************************************************



;power facility 1
_trafo1= createVehicle ["Land_trafostanica_velka", [(getMarkerPos "powerplant1" select 0)+10,(getMarkerPos "powerplant1" select 1)+7,(getMarkerPos "powerplant1" select 2)], [], 0, "trafo1=this"];
_trafo1 setDir 90;
_skorsten1 = createVehicle ["Land_komin", [(getMarkerPos "powerplant1" select 0)+20,(getMarkerPos "powerplant1" select 1),(getMarkerPos "powerplant1" select 2)], [], 0, "skorsten1=this"];
_skorsten1 setDir 270;
_verket1 = createVehicle ["Land_Tovarna1", [(getMarkerPos "powerplant1" select 0)+10,(getMarkerPos "powerplant1" select 1)-13,(getMarkerPos "powerplant1" select 2)], [], 0, "verket1=this"];
_verket setDir 180;




Och här är en annan anläggning. Mer som en kemisk fabrik eller nått...

plant.sqs
SP/MP
A1
this exec "plant.sqs"

Kod Källa  


; ****************************************************************
; Script file for Armed Assault
; Created by: Ogion
; Place a marker on the map named plant
; ****************************************************************


;factory area
_trafo1= createVehicle ["Land_trafostanica_mala", [(getMarkerPos "plant" select 0)+10,(getMarkerPos "plant" select 1)+12,(getMarkerPos "plant" select 2)], [], 0, "trafo1=this"];
_trafo1 setDir 90;
_vattentorn1 = createVehicle ["Land_watertower1", [(getMarkerPos "plant" select 0)-7,(getMarkerPos "plant" select 1)+30,(getMarkerPos "plant" select 2)], [], 0, "vattentorn1=this"];
_vattentorn1 setDir 270;
_silo1 = createVehicle ["Land_Nasypka", [(getMarkerPos "plant" select 0)+20,(getMarkerPos "plant" select 1)+10,(getMarkerPos "plant" select 2)], [], 0, "silo1=this"];
_silo1 setDir 270;
_silo2 = createVehicle ["Land_Nasypka", [(getMarkerPos "plant" select 0)+25,(getMarkerPos "plant" select 1)+10,(getMarkerPos "plant" select 2)], [], 0, "silo2=this"];
_silo2 setDir 270;
_silo3 = createVehicle ["Land_Nasypka", [(getMarkerPos "plant" select 0)+30,(getMarkerPos "plant" select 1)+10,(getMarkerPos "plant" select 2)], [], 0, "silo3=this"];
_silo3 setDir 270;
_verket1 = createVehicle ["Land_Tovarna2", [(getMarkerPos "plant" select 0)+10,(getMarkerPos "plant" select 1)-13,(getMarkerPos "plant" select 2)], [], 0, "verket1=this"];
_verket1 setDir 90;
_container1a = createVehicle ["WarfareBWestContructionSite1", [(getMarkerPos "plant" select 0)+35,(getMarkerPos "plant" select 1)-30,(getMarkerPos "plant" select 2)], [], 0, "container1a=this"];
_container1a setDir 90;
_container2a = createVehicle ["WarfareBWestContructionSite", [(getMarkerPos "plant" select 0)+35,(getMarkerPos "plant" select 1)-35,(getMarkerPos "plant" select 2)], [], 0, "container2a=this"];
_container2a setDir 90;
_container3a = createVehicle ["WarfareBWestContructionSite1", [(getMarkerPos "plant" select 0)+35,(getMarkerPos "plant" select 1)-40,(getMarkerPos "plant" select 2)], [], 0, "container3a=this"];
_container3a setDir 90;
_container1b = createVehicle ["WarfareBWestContructionSite1", [(getMarkerPos "plant" select 0)+45,(getMarkerPos "plant" select 1)-30,(getMarkerPos "plant" select 2)], [], 0, "container1b=this"];
_container1b setDir 90;
_container2b = createVehicle ["WarfareBWestContructionSite", [(getMarkerPos "plant" select 0)+45,(getMarkerPos "plant" select 1)-35,(getMarkerPos "plant" select 2)], [], 0, "container2b=this"];
_container2b setDir 90;
_container3b = createVehicle ["WarfareBEastContructionSite1", [(getMarkerPos "plant" select 0)+45,(getMarkerPos "plant" select 1)-40,(getMarkerPos "plant" select 2)], [], 0, "container3b=this"];
_container3b setDir 90;
_verket2 = createVehicle ["Land_Tovarna1", [(getMarkerPos "plant" select 0)+10,(getMarkerPos "plant" select 1)-40,(getMarkerPos "plant" select 2)], [], 0, "verket2=this"];
_verket2 setDir 180;
_skorsten1 = createVehicle ["Land_komin", [(getMarkerPos "plant" select 0)-5,(getMarkerPos "plant" select 1)-5,(getMarkerPos "plant" select 2)], [], 0, "skorsten1=this"];
_skorsten1 setDir 90;
_skorsten2 = createVehicle ["Land_komin", [(getMarkerPos "plant" select 0)-5,(getMarkerPos "plant" select 1)-15,(getMarkerPos "plant" select 2)], [], 0, "skorsten2=this"];
_skorsten2 setDir 90;
_skorsten3 = createVehicle ["Land_komin", [(getMarkerPos "plant" select 0)-5,(getMarkerPos "plant" select 1)-25,(getMarkerPos "plant" select 2)], [], 0, "skorsten3=this"];
_skorsten3 setDir 90;
_torn1 = createVehicle ["Land_vysilac_FM", [(getMarkerPos "plant" select 0)+31,(getMarkerPos "plant" select 1)-45,(getMarkerPos "plant" select 2)], [], 0, "torn1=this"];
_torn1 setDir 90;
_garage1 = createVehicle ["Land_garaz", [(getMarkerPos "plant" select 0)+30,(getMarkerPos "plant" select 1),(getMarkerPos "plant" select 2)], [], 0, "garage1=this"];
_garage1 setDir 0;
_garage2 = createVehicle ["Land_garaz", [(getMarkerPos "plant" select 0)+50,(getMarkerPos "plant" select 1),(getMarkerPos "plant" select 2)], [], 0, "garage2=this"];
_garage2 setDir 0;
_kontor1 = createVehicle ["Land_ryb_domek", [(getMarkerPos "plant" select 0)+40,(getMarkerPos "plant" select 1)-10,(getMarkerPos "plant" select 2)], [], 0, "kontor1=this"];
_kontor1 setDir 180;
_fat1 = createVehicle ["barrels", [(getMarkerPos "plant" select 0)+45,(getMarkerPos "plant" select 1)-6,(getMarkerPos "plant" select 2)], [], 0, "fat1=this"];
_fat1 setDir 180;
_fat2 = createVehicle ["barrels", [(getMarkerPos "plant" select 0)+45,(getMarkerPos "plant" select 1)-7,(getMarkerPos "plant" select 2)], [], 0, "fat2=this"];
_fat2 setDir 180;
_verkstad = createVehicle ["Land_repair_center", [(getMarkerPos "plant" select 0)+55,(getMarkerPos "plant" select 1)-12,(getMarkerPos "plant" select 2)], [], 0, "verkstad=this"];
_verkstad setDir 270;


Screenie (low res)
img121.imageshack.us/img121/5140/plant1l.th.jpg
Redigerat av ogion den 2010-04-09 14:46