OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: gothicv on 06 Jun 2003, 01:10:27

Title: How do I make people jump out of their vehicles to attack?
Post by: gothicv on 06 Jun 2003, 01:10:27
Say in my mission, I have some dudes patrolling thru a town in a UAZ, how would I make them jump out and slaughter the enemy when they saw him??
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: LCD on 06 Jun 2003, 01:19:00
make detection triger ;) name it (in da name field - not da text field) - make da trig bout 50-50 size nd put in it UAZ_DETECT = true

now make da next script

Code: [Select]
_trig = _this select 0
_UAZ = _this select 1
#loop
_trig setpos getpos _UAZ
~1
? UAZ_DETECT : goto "engage"
goto "loop"

#engage
_ppl = crew _UAZ
"unassignvehicle _X" foreach _ppl
"[_X] order getin false" foreach _ppl
"_X setcombatmode {red}" foreach _ppl
"_X setbehaviour {danger}" foreach _ppl
@ "_X in _UAZ" count _ppl < 1
~1
"_X reveal (_trig select 0)" foreach _ppl
exit

exec it

[nameoftriger,nameofUAZ] exec "scriptname.sqs"

i didnt check it but it shud work - plzreport ny erors

LCD OUT
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: _Ross_ on 06 Jun 2003, 01:48:05
set a moving trigger over the unit, and set the trigger to activate if you detect the enemy, write the script 'unitname' leavevehicle 'vehiclename';
unitname setbehaviour "combat"

if ur attacking, simply give them a transport unload waypoint

to go more in depth, out all the units in the back of the vehicle in a group, and give the leader a seek and destroy waypoint. in all of the sodiers initilizations, write:
'soldiername' moveincargo 'vehiclename'
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: Messiah on 06 Jun 2003, 01:50:51
as far as i remember i'm pretty sure that if an enemy is detected then the soliders disembark at their own accord?

maybe its happened... im mad... ofp has fried my brain  ::)
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: LCD on 06 Jun 2003, 02:02:01
@ mezzy - it hapens somtimes - not realy relaible

LCD OUT
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: gothicv on 06 Jun 2003, 03:11:04
woah - a moving trigger? Explain please!
Title: Re:How do I make people jump out of their vehicles to attack?
Post by: LCD on 06 Jun 2003, 03:13:35
it moves w/ regular setpos command ;)

just exec da script ;D

LCD OUT