OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: SpecterM on 29 Jul 2010, 02:00:08

Title: UAV MQ-9 invisible invincible
Post by: SpecterM on 29 Jul 2010, 02:00:08
I set up a UAV according to this wiki    http://community.bistudio.com/wiki/UAV

Id like to make it so it doesnt destroy.  Can someone help me?
Title: Re: UAV MQ-9 invisible invincible
Post by: kju on 29 Jul 2010, 09:03:42
for SP
http://community.bistudio.com/wiki/allowDamage

for MP use handleDamage
Title: Re: UAV MQ-9 invisible invincible
Post by: SpecterM on 29 Jul 2010, 13:11:40
thanks, but that didnt work.  I ended up doing this..

Code: [Select]
This flyInHeight 200; this setcaptive true
But after saved to multiplayer mission the UAV doesnt say.....

Quote
TARGET!.  That!  enemy tannk!


How about Respawning?  Is there a way to get the UAV to respawn after its destroyed?
Title: Re: UAV MQ-9 invisible invincible
Post by: nominesine on 30 Jul 2010, 12:12:05
for MP use handleDamage

What? Is? This? ICouldn't find any reference to it in the comref. Is it a new command? What does it do? Why should I avoid allowDamage in MP mode?

EDIT: I see now that it's an eventHandler. But the second question remains. I've used allowDamage several times in MP with good results, as long as the commands are issued on all machines (including the server).
Title: Re: UAV MQ-9 invisible invincible
Post by: kju on 30 Jul 2010, 19:34:03
Yes allowDamage damage is local. As long as you execute it on all machines its fine.
But for beginners the EH approach is just the one command without all the locality hassle.

In OA there is a new respawn EH:
http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers#Respawn

To hide an object use:
http://community.bistudio.com/wiki/hideObject

All commands:
http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2
Title: Re: UAV MQ-9 invisible invincible
Post by: SpecterM on 31 Jul 2010, 00:52:35
Is there a line I can put in the init to get the UAV to respawn after destruction?