Results 1 to 10 of 10

Thread: trigger questions

  1. #1

    trigger questions

    Hi,


    I've got 2 questions about triggers:
    1) How can I save system performance by delaying a certain time before a condition of a trigger is checked. I tried "timeout" and but it still seems to constantly check.

    2) I got 2 triggers in an area which make a marker color red or blue and display a message depending on the faction that controls this area. However, when for example an opfor group controls the area (marker turns red) and then leaves that area, when another opfor group enters again, i get the message again. I only want it only to appear once, until that area is recaptured by blufor.

    thx

  2. #2
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    1: you cant afaik, you can however use scripting instead of triggers, but performance is not an issue, even if you have 100 triggers in your mission.

    2: try seized by type trigger.
    My scripts:
    Spoiler:

    what to do when posting any kind of code dammit!!

    Any new mission editor or scripter in Arma2 should have read Mr Murrays Editing Guide Deluxe at least once, it still applies for A2 even though it was made for Armed Assault.

  3. #3
    Do you have more than 300 triggers with "large" conditions? If not, then do not worry.

    Timeout and countdown is how long until the activation wil run not the condition. I can't remember if sqf uses short-circuit evaluation, but you might want to try something like this in your condition then:
    Code:
    time > 1800 && SomeHeavyCalculation
    Then it will under no circumstance trigger until at least half an hour in the game.

  4. #4
    1. You could create the trigger via script shortly before you need it. BIS does that alot in missions. In fact, if you look at a BIS mission, there are normally very few triggers.
    hackers come in my server, make people dance

    Click to see my Rig!
    Spoiler:

  5. #5
    Corporal dematti's Avatar
    Join Date
    Mar 1 2010
    Location
    Belgium
    Posts
    90
    Author of the Thread
    Quote Originally Posted by Demonized View Post
    1: you cant afaik, you can however use scripting instead of triggers, but performance is not an issue, even if you have 100 triggers in your mission.

    2: try seized by type trigger.
    Yeah I used Seized by it doesn't work, it keeps repeating the text message.

    I only have around 50 triggers constantly working so I guess that won't be a big difference in performance...

    thanks for the suggestions guys

    edit: Double that, I have around 100 triggers, Sure this doesn't affect performance? because to me it seems it does.

    ---------- Post added at 05:54 PM ---------- Previous post was at 05:48 PM ----------

    Quote Originally Posted by Muzzleflash View Post
    Code:
    time > 1800 && SomeHeavyCalculation
    I think this only works for the beginning of the game, after 30mins it will run constantly?
    Last edited by dematti; Jun 20 2011 at 15:51.

  6. #6
    Ofcourse triggers effect performance.
    If I remeber right triggers are using waituntill command which is checked every frame, which means something like 25 to 60 times a second.
    So yes basiclly it is better to use scripted triggers using one trigger to start the other or using the while {x!=4} sleep 1; which will increase performance 25 times better then waituntil.

  7. #7
    Every single line of code or object placed is going to increase demand on the CPU, some things more than others.

    100 triggers will have an impact but some may notice it more than others and again it will also depend on what else is going on.

    By default a triggers checks every 0.5 of a sec, give or take. If you have a hundred it's possible they are all being checked at a bout the same time. If you can delay them by using the Timers I'd consider it.

    I have no problem delaying triggers using the min,med,max all set to the same time gives you a fixed delay.

  8. #8
    Corporal dematti's Avatar
    Join Date
    Mar 1 2010
    Location
    Belgium
    Posts
    90
    Author of the Thread
    Quote Originally Posted by F2k Sel View Post
    I have no problem delaying triggers using the min,med,max all set to the same time gives you a fixed delay.

    Timeout and countdown is how long until the activation wil run not the condition
    Using timeout or countdown or not using it still uses the same performance
    I can use the "time >" command but it wont matter since its such al long misssion.

  9. #9
    Sorry I thought you meant they weren't working at all.

    If all the 100 triggers are the same you could just make one trigger and just move it to different locations every so often.
    Last edited by F2k Sel; Jun 20 2011 at 16:46.

  10. #10
    Corporal dematti's Avatar
    Join Date
    Mar 1 2010
    Location
    Belgium
    Posts
    90
    Author of the Thread
    No problem, thanks, I will try that out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •