Jump to content
Ghost Recon.net Forums

Trying To Destroy Radio Antennae...


Recommended Posts

I've managed to blow a couple of ADATs and then the script moves on to the next objective.

First kill all the soldiers in one area... which I guess is really not needed as it is hard to get to the radio antennae without bothering them.

I CAN blow the radio... I have made it attachable and it explodes nicely and even falls apart.

I have this set earlier in the start_mission event:

	 
<element type="MakeAttachable" attach="true" detonate_event="destroyed_radio1" name_id="radio1"/>
<element type="StartTrigger" name="t_destroyed_radio1" start_time="2"/>
[/code] then later...
[code]
<event name="add_objective4">
<element type="Objective" id="obj4" state="add" headline_id="Destroy radio" text_id="radio1" waypoint_id="Radio" waypoint="5811 -18836.07 -1407.2704"/>
</event>
This does work as I do get a msg saying the previous Obj is completed and setting the new one. I see the waypoint icon. Finally for the trigger itself:

<trigger name="t_destroyed_radio1" interval="2" preserved="false">
<condition type="UnitDestroyed" name_id="radio1" amount="all"/>
<event name="end_objective4"/>
</trigger>

<event name="end_objective4">
<element type="Objective" id="obj4" state="completed"/>
<element type="ShowMessage" msg="Radio destroyed." kind="splash"/>
</event>

[/code]

What am I doing wrong here?

Thanks

AJ

Link to post
Share on other sites

See in the first set of code where you have...detonate_event="destroyed_radio1", that is the event that it will call when the radio antenna is destroyed.

So, rather than try and fix the code as it stands, just change this to detonate_event="end_objective4" and then when it blows, it'll call that event and you do not need all the rest of the code :)

By the way, I suggest that you prefix all your event names with "e_", so that should be detonate_event="e_end_objective4".

The reason is that it makes it easier to debug. I know one of my most common errors is that I try and call a trigger which is actually an event or vice versa. Using the "t_" or "e_" makes that easy to spot and correct and saves a lod of hair pulling.

Dav

Link to post
Share on other sites

I wondered what that "detonate_event" thingee was!

Maybe sometime I could add an "index" section to the wiki so people could easily look up items like that to see what is written about them in the Grin manual. Would be pretty easy to do with Acrobat Pro. Just add a bunch of hyperlinks.

That worked.

Not sure why it didn't before... but who cares??

Now I can go back thru and "thin" it out a bit with respect to the other objectives.

Thanks again.

Link to post
Share on other sites

See in the first set of code where you have...detonate_event="destroyed_radio1", that is the event that it will call when the radio antenna is destroyed.

Dav

Is it possible to put more than one command within those quotes?


detonate_event="e_add_obj2; e_set_spawn_02"
[/code]

Link to post
Share on other sites

<_< After several tests... I realized that. But I instead opted to just lump a bunch of <elements> into my <event> in the name of brevity.

I think I will add one more objective to this map, plus a "go to extraction".... then start adding enemy vehicles that come to life when certain objectives are completed.

So back to the old wiki we go!!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...