Hi, I'm back... AGAIN, with another question for the SAME MP MAP...
AIEEEEEEEEEEEEEE
So, I am working on dynamically creating the units in the "intense combat areas" (major bases, cities) when a west player gets within 1500m of it. I have the actual trigger part down. I have the creating of the units (BAS Government Soldiers. I have the creating of the vehicles (BAS Government ZU-23s). I just can't get said soldiers to get in said ZU-23s as gunner/commander. Here's the code I'm using:
trigger calls this file, "spawn_lbase.sqs", no arguments passed to it, uses pre-placed markers on the map (will probably switch to gamelogics so that players don't know the exact positions of these units beforehand)
; spawn_lbase.sqs
; spawns units at the base in zone L
; SERVER ONLY
? (!local Server) : exit
_thenewpos = getMarkerPos "newtrigpos"
l1 = group l1_0
;_tempveh setDir 315
_tempveh = "BAS_GZU23" createVehicle getMarkerPos "pm_l1_2"
_tempveh setDir 45
~0.5
"BAS_GovernmentSoldier" createUnit [getPos _tempveh, l1, "_tempobj = this", 0.75]
[_tempobj] join grpNull
_tempobj assignAsCommander _tempveh
"BAS_GovernmentSoldier" createUnit [getPos _tempveh, l1, "_tempobj = this", 0.75]
[_tempobj] join grpNull
_tempobj assignAsGunner _tempveh
;_tempveh setDir 135
;_tempveh setDir 225
; "_x setMarkerPos _theNewPos" forEach ["pm_l1_1", "pm_l1_2", "pm_l1_3", "pm_l1_4"]
deleteVehicle l1_0
seen here:
pre-placed gamelogic Server for determining server-side or client-side
pre-placed unit l1_0
pre-placed markers pm_l1_1 to pm_l1_4 (only using #2 for making the vehicle... simple copy-pasting or maybe even some kinda loop with an array to place more, but I must get it right here first)
what happens for me with this, running it in preview mode from the mp mission editor (not from the Mission Editor in the root menu, but in the multiplayer menu), the gun gets made, the guys get made, then they just stand there. sometimes theyll move around a bit because my test guy (enemy to them) is within sight...
any help is appreciated
thanks,
-kyle
ps i think this is the third thread about the SAME MISSION in 2 or 3 days... i cant remember anymore. the first one was really stupid. the second one was with the unit arrays (but using this new way i dont even need that) then theres this one
rarrrrrrrrrrrrrrrrgh