Home   Help Search Login Register  

Author Topic: Create Triggers via scripts?  (Read 1118 times)

0 Members and 1 Guest are viewing this topic.

Offline satexas69

  • Members
  • *
Create Triggers via scripts?
« on: 24 Jul 2007, 08:08:50 »
I have a serious "trigger" issue with ArmA.

I've created a really fun mission in Paraiso where there are "waves" of troops to beat.

What I do, is dynamically create troops in the city, and use a trigger with the option "Seized By Blufor" as it's condition for victory... so once we "seize" the city, the trigger fires off, and it completes an objective.

Ok, great... then I have a trigger that sees the objective done, and it again populates the city dynamically, and off we go again.

Easy right? Well, no.

Triggers seem to be "unstable". Each wave trigger that is watching the "seized by" condition is unstable,a nd is always running.. so sometimes ArmA will just "complete" a wave, even with tons of troops in the city.

So I'm thinking maybe there's a way to use a script to 'create' the trigger, so that the "next wave trigger" isn't even ON the map until I complete a wave (and thus fire off a trigger) therefore it can't screw up..?

Offline SniperUK

  • Members
  • *
  • I'm a llama!
Re: Create Triggers via scripts?
« Reply #1 on: 24 Jul 2007, 08:15:32 »
You can create triggers in a script, here is a sample where you create a trigger with the radius of 200 and the condition is east present:

nameoftrig = createTrigger["EmptyDetector",_pos];
nameoftrig setTriggerArea[200,200,0,false];
nameoftrig setTriggerActivation["EAST","PRESENT",true];
nameoftrig setTriggerStatements ["this", "(onact statement)", "(on deact statement)"]

i'm not sure what condiction siezed by blufor is, may be something like nameoftrig setTriggerActivation["SIEZED BY BLUFOR","PRESENT",true];
I could not find it in http://community.bistudio.com/wiki/setTriggerActivation.
Hope this helps.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Create Triggers via scripts?
« Reply #2 on: 24 Jul 2007, 19:07:19 »
I think his problem is just with "Seized By" triggers. I dindnt try them yet, but triggers created by scripts are not going to work better than triggers created from the editor, may be there is a real bug with "Seized By" type triggers.