# Repeating Triggers

**URL:** <https://forum.vassalengine.org/t/repeating-triggers/1289>\
**Category:** Feature Requests\
**Created:** [November 25, 2008, 2:14pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289 "2008-11-25T14:14:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [November 25, 2008, 2:14pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/1 "2008-11-25T14:14:44Z")

</div>

Most games have some sort of dice, generators displaying a random graphic or something similar.

For example, I have a button that I click to display a random graphic. If the random graphic is the same as the graphic already there, nothing appears to happen and the only clue you have that the button actually worked is via a report in the chat window.

I got to thinking it would be cool to have a trigger trait that you could set to repeat a number of times and have a time interval between each execution.

For example, if I set such a trait for the above example, I could set it to execute a random graphic 10 times with 0.2 seconds between each execution. So, over the course of 2 seconds, the players will see various graphics flash by and finally stop on a specific graphic. Naturally, reporting would be suppressed until the final result.

Not only would it provides some sort of animation but it would be obvious to the players that the button worked.

---

<div class="post-metadata">

**Author:** ![danjaman](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@danjaman](https://forum.vassalengine.org/u/danjaman)\
**Post date:** [June 8, 2009, 7:55pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/2 "2009-06-08T19:55:03Z")

</div>

Yeh I tried to do something with repeated triggers, going back and forth between a Door, with opening layers and a console with flashing lights as it opened; but it zipped through the frames so fast it seemed to just be either open or closed…

In terms of a timer though I think you can improvise, set a DP called ‘timer’ and add increments via trigger (timer \< 1000) until it reaches 1000 then trigger a frame change, then again and again until it finds conclusion, I’m gonna test this premise and get back to you…

HAS TO BE DONE WITH A SEPARATE PIECE WORKING IN TANDEM(I think). ie Global key common, property matches, in my case, console = 1 and it fires back a reply to Door = 1, back and forth with another simple DP start/stop once the door is fully open it sends change to STOP. Open = 1.

If you click the console again it starts the thing in the opposite direction.

That is afterall what a timer does… its better to have a manager to bounce the commands off of though else you need even more complex trait combo’s on the animated one…

I will post my findings.

---

<div class="post-metadata">

**Author:** ![Tim\_M](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/tim_m/32/2_2.png) [@Tim\_M](https://forum.vassalengine.org/u/Tim_M)\
**Post date:** [June 8, 2009, 8:34pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/3 "2009-06-08T20:34:05Z")

</div>

it is unlikely 1000 will be significant enough. I tried this once be fore with a count to 100 and 200 and still discerned no difference - your processor is able to count too fast.  
What is ideally needed is a “Wait” trait that allows you to insert a pause of a specified time by developer before what ever is being done resumes

From: danjaman [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
To: [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
Sent: Monday, June 8, 2009 2:55:09 PM  
Subject: [Feature Requests]Re: Repeating Triggers

Yeh I tried to do something with repeated triggers, going back and forth between a Door, with opening layers and a console with flashing lights as it opened; but it zipped through the frames so fast it seemed to just be either open or closed…

In terms of a timer though I think you can improvise, set a DP as timer and add increments via trigger until it reaches 1000 then trigger a frame change, then again and again until it finds conclusion, I’m gonna test this premise and get back to you…

That is afterall what a timer does… its better to have a manager to bounce the commands off of though else you need even more complex trait combo’s on the animated one…

I will post my findings.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org) ([Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org))  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![danjaman](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@danjaman](https://forum.vassalengine.org/u/danjaman)\
**Post date:** [June 8, 2009, 10:19pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/4 "2009-06-08T22:19:47Z")

</div>

Well, property variables can go into the Millions, so it could be just a matter of finding the right range; but as you say this will be effected by people processors and will not look consistent and therefor I realise, a pretty poor work around unless you crank it up; but then what looks even passable on my Pentium D will probably done in a flash on Core Duo or Quad…

If only we all had Pentium Ones, the ones with MMX obviously (we don’t wanna go too crap now do we…??)… they used to do clock cycle timers in some software back then… thats why you get super fast motion unless you emulate old crappy games sometimes…

Probably get a way with 500,000,000 count on those puppies… I just figured using two pieces in tandem would double the process and of course there is the traffic inbetween them to kill a microsecond or two…

Or perhaps… I could GM my eyes to pick up more than 24 frames a second… I wonder…??

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 8, 2009, 10:49pm UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/5 "2009-06-08T22:49:36Z")

</div>

Thus spake “danjaman”:

> [@](#):
>
> Well, property variables can go into the Millions, so it could be just a matt  
> er of finding the right range; but as you say this will be effected by people  
> processors and will not look consistent and therefor I realise, a pretty poo  
> r work around unless you crank it up; but then what looks even passable on m  
> y Pentium D will probably done in a flash on Core Duo or Quad…

Trying to turn a loop into a timer is a really, really bad idea, as the  
duration of the loop will depend entirely on the speed of the machine  
it’s running on. And if you don’t care about getting consistent results  
across machines, then you should ask yourself whether a timer is what you  
really wanted in the first place.

–  
J.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![danjaman](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@danjaman](https://forum.vassalengine.org/u/danjaman)\
**Post date:** [June 9, 2009, 10:51am UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/6 "2009-06-09T10:51:03Z")

</div>

> [@](#):
>
> I realise, a pretty poor work around

just quote myself there… I was just gonna test it is all.

And yes a timer is exactly what I need. As long as the result is consistent to within a range, I don’t mind… its nasty, messy, probably unusable; but I am a curious personality and even if it fries my CPU for some inexplicable reason, I will do this anyway for the sheer sh_ts and g_ggles of it…

If I open a Black hole, soi be it.

Anyway I have a mate who can test on a high end machine… and by the time something so fast comes out I need to change it perhaps Vassal will support animation anyway…

---

<div class="post-metadata">

**Author:** ![Dezartfox](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@Dezartfox](https://forum.vassalengine.org/u/Dezartfox)\
**Post date:** [June 10, 2009, 12:16am UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/7 "2009-06-10T00:16:08Z")

</div>

> [@danjaman](#):
>
> > [@](#):
> >
> > I realise, a pretty poor work around
> 
> just quote myself there… I was just gonna test it is all.
> 
> And yes a timer is exactly what I need. As long as the result is consistent to within a range, I don’t mind… its nasty, messy, probably unusable; but I am a curious personality and even if it fries my CPU for some inexplicable reason, I will do this anyway for the sheer sh_ts and g_ggles of it…
> 
> If I open a Black hole, soi be it.
> 
> Anyway I have a mate who can test on a high end machine… and by the time something so fast comes out I need to change it perhaps Vassal will support animation anyway…

Is that mate me \<_\<  
I’ve already caused several black holes… no more the government said -_-

---

<div class="post-metadata">

**Author:** ![danjaman](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@danjaman](https://forum.vassalengine.org/u/danjaman)\
**Post date:** [June 10, 2009, 10:35am UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/8 "2009-06-10T10:35:02Z")

</div>

I can give a no black holes guarantee ![;)]( "Wink") I test on mine first…

---

<div class="post-metadata">

**Author:** ![viewofheaven](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/v/b487fb/32.png) [@viewofheaven](https://forum.vassalengine.org/u/viewofheaven)\
**Post date:** [October 18, 2011, 7:00am UTC](https://forum.vassalengine.org/t/repeating-triggers/1289/9 "2011-10-18T07:00:57Z")

</div>

> [@uckelman](#):
>
> Trying to turn a loop into a timer is a really, really bad idea, as the  
> duration of the loop will depend entirely on the speed of the machine  
> it’s running on.

Hi Joel. I’ve added a feature request for this. I believe I have fleshed out the idea adequately to allow the developers to do this within an hour or so. (if not, tell me to flesh it out more). The request is at [here](https://forum.vassalengine.org/t/animation-done-with-triggeraction/4371/1).
