Jump to content
Sign in to follow this  
Nemorz

Trigger Help - Remove AI after

Recommended Posts

Trying to setup a very basic trigger for mines at the moment for a 2 man co-op I'm setting up for me and a friend.

I know I'm missing something and I know I'm a complete noob, but when I respawn I instantly blow up (Nem is obviously my playable character)

Condition: isPlayer Nem

Act: Nem setDamage 1

Whereas this little trigger I made for AI Aircraft seems to work, for removing AI once they have made their waypoints.

Condition: this

Act: boom1 setDamage 1; boom2 setDamage 1; boom3 setDamage 1

However when I set the mine to the same as the AI Aircraft one, I just hear the explosion right away but it won't damage me.

Could someone tell me what I'm missing here?

Also, how do I execute .sqf files as I tend to get them all saying "x.sqf not present" even though it's in my mission folder. If there is a much easier solution to destroying AI units after they've completed their missions/waypoints I would appreciate that also.

Thanks.

Share this post


Link to post
Share on other sites

{
if (count crew _x > 0) then {
	{
		deletevehicle _x;
	} foreach crew _x;
};
deletevehicle _x;
} foreach [boom1, boom2, boom3]

Might put you on the right track.

Why would you want to kill the player when they become... a player. If you could explain what your trying to do with the Nem then maybe we could help you.

Relevant BIKI:

http://community.bistudio.com/wiki/alive

http://community.bistudio.com/wiki/setDamage

http://community.bistudio.com/wiki/isPlayer

http://community.bistudio.com/wiki/deleteVehicle

Share this post


Link to post
Share on other sites

Basically I've setup a very basic minefield, when a player enters the trigger it will kill the player and make an explosion sound. It is VERY simple :P

The trigger for AI is self explanatory, as I don't want aircraft that have done their flyovers/combat manouvers to remain on the map for lag reasons.

As for the .sqf files, I'm also unsure as to how to activate them, I have them in the mission folder with the code I require and I'm sure it's something like [] execVM "briefing.sqf" but I don't know where to put that line (in my units init maybe?)

Thanks for the line so far, I will try this out, but does it have to go into it's own script and be execed through the On Act section of my trigger?

Share this post


Link to post
Share on other sites

Hi!

I'm trying to do the same thing but my problem is more basic. I'm new to scripting in general and have a lot of confusion about what goes where.

For instance, I tried the:

Condition: this

Act: boom1 setDamage 1; boom2 setDamage 1; boom3 setDamage 1

To delete a few A-10s but apparently I don't understand enough to pull it off. If someone would be so kind as to explain exactly where everything goes to get this to work? What field, what box, if I need an aircraft name how do I get it? etc... pointing the way to a guide that does this instead of just explaining what does what would be most welcome. (I see a lot of x=myplane exec (fornummeys.sps)) and what not but I never see how you actually implement that. How to you associate x to the plane in question? I never see that explained.

So basic basics. If someone can point me to walkthroughs, ARMA1 or otherwise I'd appreciate it. Otherwise just setting me on the path to getting the above to work would be appreciated.

Thank you again!

Share this post


Link to post
Share on other sites

You need to name each plane also, with "boom1" "boom2" etc, that way when the plane/chopper/vehicle with that tag passes onto the trigger it will explode.

Place a trigger with "this" in the Condition field and "boom1 setDamage; boom2 setDamage 1" etc. Then waypoint your named units (that you want to explode) into your trigger.

There is a better way somehow, but this seems to work for what I want it to do as all my planes/choppers do what they're supposed to at the beginning of my map, then the straggler(s) can fly off to the kill trigger.

I still also need answers on how to execute all of these .sqf files. Is description.ext and briefing.sqf automatic?

Share this post


Link to post
Share on other sites

Ok the disconnect was coming with the naming. I hqvnt figured out how to name objects yet. Uh... Don't suppose I could get a hint? I know it's probably obvious.

Share this post


Link to post
Share on other sites

In the editor, in the object's properties window, there should be a name field (on the right hand side below all the unit type, rank, etc... stuff).

Names only contain letters, numbers, and underscores (no spaces), and must start with a letter (just like any global variable).

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

In ArmA2 you can use the command setHit to damage a part of an vehicle. Try out.

vehicle player setHit ["engine", 1]

Share this post


Link to post
Share on other sites

I wonder if that means we can stop the notorious chopper engine stoppage but still have the damage. Thanks for the notification of that command Imutep.

ArmA2 is bringing lots of surprises. :yay:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×