Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Trigger dont work  (Read 3237 times)

0 Members and 1 Guest are viewing this topic.

Offline dale0404

  • Members
  • *
Trigger dont work
« on: 19 Jul 2008, 11:08:52 »
Hiya gents and ladies.

I am very new to the mission editing side of life and this is my first mission I have tried to make.  Everything works ok apart from one of the triggers.  The trigger is supposed to initiate when all the bad guys are dead in an area.



The text for On Act is: {player sidechat format["%1 All Rogue Elements have been eliminated.  Proceed to the extraction point.",_x]} foreach thislist

I have tested this with just one bad guy in the area.  As soon as I kill him the trigger is supposed to activate but nothing happens.  Is the dead body still being counted or am I doing something completely wrong?

Now, if I change the type from 'None' to an ending then the trigger activates but the mission ends which obviously I dont want.

Thanks

Dale

Offline i0n0s

  • Former Staff
  • ****
Re: Trigger dont work
« Reply #1 on: 19 Jul 2008, 12:15:53 »
When no one is present, "thislist" will be empty. And forEach [] will result in doing nothing.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Trigger dont work
« Reply #2 on: 19 Jul 2008, 12:35:51 »
What ionos said. You are overcomplicating things, since all you need is:
Code: (On Act) [Select]
player sidechat "All Rogue Elements have been eliminated.  Proceed to the extraction point."
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline dale0404

  • Members
  • *
Re: Trigger dont work
« Reply #3 on: 20 Jul 2008, 00:02:10 »
Cool gents, thankyou, works prefectly now.  I always try to over complicate things, ask the wife!

Just one more thing if I may.  I have 3 objectives in the mission which are all hyperlinked in the mission briefing.  How do I get the little 'o' symbol to turn into a tick once the objective has been completed?

Screenshot below:



Thanks

Dale

Offline schuler

  • Contributing Member
  • **
Re: Trigger dont work
« Reply #4 on: 20 Jul 2008, 02:06:14 »
hi dale, i think this should work like SP does, forgive me if iam wrong.
In the tigger add or change  these;;;;;;

edited::::::::
On Activation:    "1" objStatus "DONE"; obj_1_done=true;
 Type: End1 or none


In your briefing you should see something like this change it appropriately

<p><a name = "OBJ_1"></a>Destroy <a href="marker:m4">safe houses.</a>
</p>
<hr>

Note change the m4 this is the marker part to your marking on the map editer
Have a look at this too http://www.ofpec.com/ed_depot/beginners/ExampleMission.zip
This for more on Triggers, Scripts & addAction in MultiPlayer http://www.ofpec.com/ed_depot/the_files/download.php?id=545

hope thats enough help you get going  :)
cheers schuler
« Last Edit: 20 Jul 2008, 16:41:07 by schuler »
Semper Fi

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Trigger dont work
« Reply #5 on: 20 Jul 2008, 11:38:36 »
You need to set the name of the mission in the editor, so it doesn't come up as the filename ("Rogue%20Elements%20(Coop08)"). You do this by double-clicking on the blue Intel window on the top right of the editor screen.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline dale0404

  • Members
  • *
Re: Trigger dont work
« Reply #6 on: 20 Jul 2008, 14:31:30 »
Thanks for the help gents, really appreciated but....

I still cant get the trigger to update as ticked on the briefing within the map screen.

This is the code from the briefing:

<!---------------------------------------------------->
<!-- Objectives                                     -->
<!---------------------------------------------------->
<!-- Objective 1 -->
<p><a name="obj_1"></a><a href="marker:Insert">Insert here by helicopter.</a>
</p>
<hr>

This is what I put in the On Act field: 1 objStatus "DONE"; obj_1_done=true; player sidechat "We have reached the Insertion Point"

This is the error I get:  objstatus: Type Number, string expected

Please help!

Thankyou

Dale

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Trigger dont work
« Reply #7 on: 20 Jul 2008, 15:22:02 »
Sorry, I missed that one. For some reason, the object number needs to be a string, not a number:
Code: [Select]
"1" objStatus "DONE"
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline schuler

  • Contributing Member
  • **
Re: Trigger dont work
« Reply #8 on: 20 Jul 2008, 16:48:37 »
hey spooner, check my post quickly in case i missed something, I edited it to a string. there is no other posts in arma about the ticking off that i noticed. just want to make sure its correct if someone searches the topic later.
cheers schuler
Semper Fi

Offline dale0404

  • Members
  • *
Re: Trigger dont work
« Reply #9 on: 20 Jul 2008, 19:26:37 »
Gents thats brill, works perfectly now. Thankyou but I am sure I will be adding to this thread in the future, if you dont mind of course!  :D