Repeating Triggers

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.

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.

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
To: 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 (Messages@forums.vassalengine.org)
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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…??

Thus spake “danjaman”:

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
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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 shts and gggles 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 -
-

I can give a no black holes guarantee ;) I test on mine first…

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.