Home   Help Search Login Register  

Author Topic: Vehicle Safezone Protection ?  (Read 682 times)

0 Members and 1 Guest are viewing this topic.

kujina

  • Guest
Vehicle Safezone Protection ?
« on: 12 Aug 2003, 15:32:26 »
I have finished a small C&H map - one town, a few vehicles each side (no vehicle respawn) and player spawn protection.

After lots of play testing online, it needs to have vehicle protection in the respawn areas, as I dont want normal vehicle respawn. I want to implement a way so if a vehicle is destroyed in your respawn/safezone area by the opposite team it will respawn, or as a punishment respawn as a better vehicle.

Please help as my mission wont feel finished without this feature.

...Thanks...  ;)
« Last Edit: 12 Aug 2003, 15:36:57 by kujina »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Vehicle Safezone Protection ?
« Reply #1 on: 12 Aug 2003, 19:10:50 »
Does anybody know if you can you use eventhandler "killed" (or "hit") on an empty vehicle?    The array returned by the eventhandler includes the unit that did the killing:  if it's from the opposite side then you know what to do.   If it's from the same side then you could make it respawn as a worse vehicle as punishment for them ;D
Plenty of reviewed ArmA missions for you to play

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Vehicle Safezone Protection ?
« Reply #2 on: 13 Aug 2003, 02:53:40 »
Does anybody know if you can you use eventhandler "killed" (or "hit") on an empty vehicle?

Yeap, I can confirm that it does.

I'm using it on Ammo crates (of all things ;D) to set off an 'ammo explosion' script in an outro...

So for this situation, you would simply use something like:

vehicle AddEventhandler ["Killed", {_this select 1 exec "spawnscript.sqs"}]

And the killer of the vehicle would be passed as an arguement to spawnscript.sqs ;)

kujina

  • Guest
Re:Vehicle Safezone Protection ?
« Reply #3 on: 13 Aug 2003, 04:52:52 »
Thanks for the replys so far guys!

Forgive me but I'm pretty new to mission editing so I need to get this clear, step by step.
The following is what I think I need to do and questions I have. ???

A. Am I right in thinking I need to name the vehicles I want this to take effect on i.e - V1,V2,V3 etc?

B. create a trigger and place it in the safezone areas. Enter vehicle AddEventhandler ["Killed", {_this select 1 exec "spawnscript.sqs"}] in the On Activation box
    Question 1: What should I select in the Activation drop down box?
    Question 2: Do I need to type anything else in the Condition and On Deactivation boxes?

C. create a script - this is what I have so far...
       
;--------------------------------------------------
?!(local Server): Goto "end"
_vcl = _this select 0
_respawndelay = 10

#start
~1
?(Canmove _vcl):Goto "start"

~_respawndelay
deleteVehicle _vcl
createUnit Unit name?
goto "end"

#end
Exit
;--------------------------------------------------


Also I dont know what you mean by "the killer of the vehicle would be passed as an arguement"?