Jump to content
Sign in to follow this  
krzychuzokecia

Blue "Target" object - reviving

Recommended Posts

Hi!

I've got a problem with a blue "Target" object - the one which falls when shoot several times. I want it to pop-up again, using radio-activated trigger and a "this SetDamage 0" command but... nothing happens! Probably target's damage is set to "0" (fully functional), but this command doesn't affect object's position - it's still laying "dead".

Any ideas how to force Target to stand up?

Share this post


Link to post
Share on other sites
using radio-activated trigger and a "this SetDamage 0" command

I don't think this is not going to work in those circumstances -> Name the target.

You should wait for the target to complete its falling over animation (at least two seconds; three would be better for the smoke to clear) before it can return upright.

Share this post


Link to post
Share on other sites
Hi!

I've got a problem with a blue "Target" object - the one which falls when shoot several times. I want it to pop-up again, using radio-activated trigger and a "this SetDamage 0" command but... nothing happens! Probably target's damage is set to "0" (fully functional), but this command doesn't affect object's position - it's still laying "dead".

Any ideas how to force Target to stand up?

Hi krzychuzokecia;

Rage is correct, this works you only made a small mistake.

Name the target object (i used target1 in my test)

In the trigger "on activation" field put: "target1 setdamage 0"

You can also make the activation "Repeatedly" and it will reset on each radio call.

Share this post


Link to post
Share on other sites

Yup, guys, You've found my mistake - it dawned on me this morning and I was like "argh! So stupid!" :D

My thinking was something along lines of "if I'll put a radio-activated trigger, it should work on any unit in it's activation field" - thing is I forgot that radio activation "blocks" activation field...

The only gripe I have now is that I've to name every Target object that I want to be "reusable" - I don't see any way to make this process (finding objects and adding them to array) automatic.

Share this post


Link to post
Share on other sites

You can find the targets classname and then run a "find nearest" function (search OFPEC) based on that. It would take ages to search the whole map, but if they were in clusters...

Or Option B - via their Init lines

1. Open mission.sqm with a text editor

2. Add the following to one of the first Items in the class Vehicle section of the mission:

<arrayname> = []

3. Run a search for "TargetE" (the classname of the object)

4. Add the following to the Init line in each instance:

<arrayname> = <arrayname> + [this]

5. Check it has been applied correctly in the mission editor, and remove it from any targets you don't want included

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  

×