Argh i sorta wanted to clean up my script.. so i seperated part's of them, including where the truck picks up the units.. so that the truck move's individually when a grp finished getting inside it.. soo i created another script for that.. and i cant get it to work.. lol i've given up on this almost, so iv'e uploaded the mission files.. hope noone steals my ideas'/ scripts' without asking me.. i just posting for help thats all
cheers.
edit:
Well.. i thought about it.. ive posted the scripts below in order they start to give you guys an idea and any possible changes that could be made.. ill point out where it dont work.
Basically the mission starts.. you walk around with your group until all of a sudden an alarm sounds.. the trigger is activated when it is OPFOR detected by BLUFOR
and this script starts.. seems to be fine here.
Defend.sqs
; *****************************************************
; ** Defend Position **********************************
; *****************************************************
playsound "alarm"
~20
Officer sideChat "Theyre' here! Everyone up the front line and defend!."
~15
@(unitReady leader grp4)&&(unitReady leader grp5)&&(unitReady leader grp6)&&(unitReady leader grp7)&&(unitReady leader grp8)
~10
Officer sideChat "Ok, everyone going in to position? Good. Now do not to let them through!"
~10
Officer sideChat "Good luck, out"
exit
;******CREDIT******************************
;**Mandoble - Wicked Scripting ************
;**Cheetah - Trying to help ***************
;**Crashdome - Also trying to help ********
;**Lee - Trying to help too ***************
;**Surdus Priest - Good Advice ************
Then all the cycle waypoints stops, and the unit's move to their position and attack any enemy on sight.. the waypoint they move to defend has a lockWP in it.
Then if any enemy guys get's pasts the machine guns into the town.. another script start's telling everyone to fall back.. so it's up to the player's ability to stop them getting into the town, otherwise this script will start.
Fallback.sqs
; *****************************************************
; ** Fallback *****************************************
; *****************************************************
(truck1 setGroupId ["Zulu","GroupColor5"])
(truck2 setGroupId ["Buffalo","GroupColor5"])
(truck3 setGroupId ["Yankee","GroupColor5"])
(truck4 setGroupId ["Kilo","GroupColor5"])
([] exec "para.sqs")
~7
Officer sideChat "Damn! everybody fall back now! Fall back to the base!!"
~10
Officer sideChat "There's more than 200 unit's here, you people will be overrun!"
~5
Officer sideChat "See you back at the base! Out"
~7
([grp4,truck1,baselog1]exec "trucktobase.sqs")
~0.1
([grp5,truck2,baselog2]exec "trucktobase.sqs")
~0.1
([grp6,truck3,baselog3]exec "trucktobase.sqs")
~0.1
([grp7,truck4,baselog4]exec "trucktobase.sqs")
grp8 move getPos Officer
exit
At the same time this script start's to make parachuters drop... well THEY DONT!!!! ARRRGGHHHHHH it worked when the code from para.sqs was in the fallback.sqs.. but not now! argh
para.sqs
; *****************************************************
; ** Para *********************************************
; *****************************************************
_specops = createGroup east;
~5
_ang = 0
para1 = "ParachuteEast" createVehicle [0,0,0]
para1 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east1 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east1 moveInDriver para1
~5
_ang = _ang + 45
para2 = "ParachuteEast" createVehicle [0,0,0]
para2 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east2 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east2 moveInDriver para2
~5
_ang = _ang + 45
para3 = "ParachuteEast" createVehicle [0,0,0]
para3 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east3 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east3 moveInDriver para3
~5
_ang = _ang + 45
para4 = "ParachuteEast" createVehicle [0,0,0]
para4 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east4 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east4 moveInDriver para4
~5
_ang = _ang + 45
para5 = "ParachuteEast" createVehicle [0,0,0]
para5 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east5 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east5 moveInDriver para5
~5
_ang = _ang + 45
para6 = "ParachuteEast" createVehicle [0,0,0]
para6 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east6 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east6 moveInDriver para6
~5
_ang = _ang + 45
para7 = "ParachuteEast" createVehicle [0,0,0]
para7 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east7 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east7 moveInDriver para7
~5
_ang = _ang + 45
para8 = "ParachuteEast" createVehicle [0,0,0]
para8 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east8 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
east8 moveInDriver para8
~5
_ang = _ang + 45
para9 = "ParachuteEast" createVehicle [0,0,0]
para9 setPos [(getPos logic select 0)+sin(_ang)*20,(getPos logic select 1)+cos(_ang)*20, getpos logic select 2]
east9 = _specops createUnit ["SoldierEB", (position player), [] ,0 ,"seargent"]
~0.1
east9 moveInDriver para9
exit
Nearer the end of fallback.sqs.. another script start's.. i made this so that it checks the vehicle's individually so they dont rely on one piece of code to make them all leave at the same time.. i wanted idividuality.
trucktobase.sqs
; *******************************************************
; ** BacktoBase *****************************************
; *******************************************************
_grp = _this select 0
_veh = _this select 1
_pos = _this select 2
(?!(alive _grp) : goto "truckmove")
(?!(alive _veh) : goto "unitmove")
goto "getin"
#truckmove
_veh sideChat "Looks like there is no one to take back to the base, out"
_veh move (getPos _pos)
@(unitReady units _veh)
exit
#unitmove
_grp sideChat "Looks like WE have to make our own way to the base, Out"
_grp move (getPos _pos)
@(unitReady units _grp)
exit
#getin
_grp move (getPos _veh)
@(unitReady units _grp)
_veh sideChat "We're ready, Out"
({_x assignAsCargo _veh}forEach units _grp)
~1
([_grp]allowGetIn true)
@(unitReady units _grp)
_veh move (getPos _pos)
@(unitReady units _veh)
exit
The problem here.. ARGHHHH ARRGGHHH lool it's this line
_veh = _this select 1
ERROR ZERO DIVISOR.. WTF?
Hope someone can really help. Cheers