legacywork 0 Posted November 23, 2008 Share Posted November 23, 2008 Hi guys This may seem like double posting (sorry) but I mentioned this in another thread and it got lost in the topic discussion. Below are the current objectives for a new coop mission, everthing goes well until the 4th objective ... then the script seems to hang. I have all the correct triggers in the start_game event Basically in the game: Adat1 blown .... ok, sets waypoint for adat2 (removes adat1 waypoint) Adat2 blown .... ok, sets waypoint for antenna 1 (removes adat2 waypoint) antenna1 blown .. disaster ... antenna blows but waypoint stays put ..... next waypoint not set Here's the script: <!-- Add first objective ==============--> <trigger name="t_coop_spawn" interval="2" preserved="false"> <condition type="UnitInLocation" location="coop_spawn" player_type="team_a" greater_than="0"/> <event name="e_add_objective1"/> </trigger> <event name="e_add_objective1"> <element type="Objective" id="obj1" state="add" headline_id="take out adat 1" txt_id="adat" waypoint_id="adat" waypoint="-3698.3181 -2677.5298 352.84381"/> </event> <!-- Add second objective ==============--> <trigger name="t_adat01_gone" interval="2" preserved="false"> <condition type="VehicleDestroyed" vehicle_id="adat01" amount="all"/> <event name="e_add_objective2"/> </trigger> <event name="e_add_objective2"> <element type="Objective" id="obj1" state="completed"/> <element type="Objective" id="obj2" state="add" headline_id="take out adat 2" txt_id="adat" waypoint_id="adat" waypoint="-2544.5684 -5914.2329 365.96979"/> </event> <!-- Add third Objective ... break communication link ========================================--> <trigger name="t_destroyed_adats" interval="2" preserved="false"> <if_all> <condition type="VehicleDestroyed" vehicle_id="adat01" amount="all"/> <condition type="VehicleDestroyed" vehicle_id="adat02" amount="all"/> </if_all> <event name="e_add_objective3"/> </trigger> <event name="e_add_objective3"> <element type="Objective" id="obj2" state="completed"/> <element type="Objective" id="obj3" state="add" headline_id="blow the antenna" text_id="antenna" waypoint_id="antenna" waypoint="-1054.7118 -11302.138 1112.7401"/> </event> <!-- Add fourth objective - extract =======================--> <trigger name="t_antenna_gone" interval="2" preserved="false"> <condition type="UnitDestroyed"unit_id="6289"name_id="antenna01"/> <event name="e_add_objective4"/> </trigger> <event name="e_add_objective4"> <element type="Objective" id="obj3" state="completed"/> <element type="StartTrigger" name="t_loc_extraction" start_time = "1"/> <element type="Objective" id="obj4" state="add" headline_id="extract" text_id="extract" waypoint_id="extract" waypoint="14491.94 -10856.787 361.25766"/> <element type="ShowMessage" msg="Nice job boys - now extract!" kind="splash" start_time="0"/> </event> <!--End Game =========--> <trigger name="t_objectives_complete" interval="2" preserved="false"> <if_all> <condition type = "SoldiersKilled" group_id = "patrol01" amount = "all"/> <condition type = "SoldiersKilled" group_id = "patrol02" amount = "all"/> <condition type = "SoldiersKilled" group_id = "sniper01" amount = "all"/> <condition type="VehicleDestroyed" vehicle_id="adat01"/> <condition type="VehicleDestroyed" vehicle_id="adat02"/> <condition type="UnitDestroyed" name_id="antenna01"/> <condition type="UnitInLocation" location="loc_extraction" player_type="team_a" amount="all"/> <event name="e_win"/> </if_all> </trigger> <!--Complete the game--> <event name = "e_win"> <element type="ShowMessage" msg="Well done ghosts - You won!" kind="splash" start_time="0"/> <element type = "EndRound" winner_side = "1" reason = "Well done ghosts - Let's go home!" start_time = "5"/> </event> This is really doing my head in .... so would appreciate any help Legacy Quote Link to post Share on other sites
davros 0 Posted November 23, 2008 Share Posted November 23, 2008 Hi Legacy, I do not tink that the antenna has a destroyed state...so the following will never trip, <condition type="UnitDestroyed"unit_id="6289"name_id="antenna01"/> Suggest you try the following to trigger the event after the antenna is blown. <element type="MakeAttachable" attach="true" detonate_event="e_add_objective4" name_id="antenna01"/> (or whatever the correct syntax is for this tag Have not used this method myself, but think it'll work. Dav Quote Link to post Share on other sites
legacywork 0 Posted November 23, 2008 Author Share Posted November 23, 2008 <element type="MakeAttachable" attach="true" detonate_event="e_add_objective4" name_id="antenna01"/> Dav Hi Dav Will give it a go ...... though in v2 i used an antenna from the same static group, and that did'nt have a destroyed state either .... one of the reasons i changed it to this antenna was cos someone pointed out that when the c4 detonated the antenna in v2 it was still there undamaged ...... whereas for the rs_radio_antenna it does at least destruct into several pieces ... Will try anyway ..... and let you know Legacy Quote Link to post Share on other sites
davros 0 Posted November 23, 2008 Share Posted November 23, 2008 Legacy, No issues using the new destroyable tower...but that's not the cause of the problem. I just had a look at your v2 script, the trigger in this for the antenna being destoyed was never tripped...ie. the trigger never did work. The event was still called however. The reason the event was called was because you had this code to make the antenna destroyable which says to call the event "e_destroyed_antenna01" when it's destroyed. It is this, not the trigger that calls the event "e_destroyed_antenna01". <element type="MakeAttachable" attach="true" detonate_event="e_destroyed_antenna01" name_id="antenna01"/> . . . <!-- Break Communication Link ======================--> <trigger name="t_destroyed_antenna01" interval="2" preserved="false"> <condition type="UnitDestroyed" name_id="antenna01"/> </trigger> <event name="e_destroyed_antenna01"> <element type="ShowMessage" msg="on our way ... knock out the snipers " kind="splash" start_time="0"/> <element type="Objective" id="obj2" state="completed"/> </event>[/code] Hope that makes sense. Basically, you do not need the trigger, you just need to have the right event name to call when you set the antenna to destroyed, and in v3, that's ... [code]<element type="MakeAttachable" attach="true" detonate_event="e_add_objective4" name_id="antenna01"/> Dav. Quote Link to post Share on other sites
legacywork 0 Posted November 24, 2008 Author Share Posted November 24, 2008 The reason the event was called was because you had this code to make the antenna destroyable which says to call the event "e_destroyed_antenna01" when it's destroyed. It is this, not the trigger that calls the event "e_destroyed_antenna01". <element type="MakeAttachable" attach="true" detonate_event="e_destroyed_antenna01" name_id="antenna01"/> . . . <!-- Break Communication Link ======================--> <trigger name="t_destroyed_antenna01" interval="2" preserved="false"> <condition type="UnitDestroyed" name_id="antenna01"/> </trigger> <event name="e_destroyed_antenna01"> <element type="ShowMessage" msg="on our way ... knock out the snipers " kind="splash" start_time="0"/> <element type="Objective" id="obj2" state="completed"/> </event>[/code] Hope that makes sense. Basically, you do not need the trigger, you just need to have the right event name to call when you set the antenna to destroyed, and in v3, that's ... [code]<element type="MakeAttachable" attach="true" detonate_event="e_add_objective4" name_id="antenna01"/> Dav. Yep .... that makes sense .... and once again your right it works now ..... another one for the old grey matter to store and use .. Just the sociability to amend now and should be ready....... Legacy Quote Link to post Share on other sites
davros 0 Posted November 24, 2008 Share Posted November 24, 2008 Pleasure mate...glad to be of help. One more subject for the wiki eh Dav. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.