Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: rollo on March 26, 2013, 12:23:57 PM
-
Hi. I have created a scene where the player drops a bomb and is set to explode after so long. My question is 2 part. Are there any examples of timer functions and if so where and secondly, I have created a scene in 3dsmax of an exploding barrel. How do I incorporate this into a new scene. In which I mean in what format. From what I can see there are 2 options. Avi or image sequence. Are they the only options. Thanks
-
hi,
for ani use png sequence is best if the animation is only for barrel..
i think for the timer u can use "sleep" on entity,
cya :)
-
cheers keybone. will check it out.
-
The WME book covers this quite well: http://res.dead-code.org/doku.php/wmebook:ch3 (http://res.dead-code.org/doku.php/wmebook:ch3)
Search for the line "Let’s move on to the last part of this chapter, which will cover the daemon issue." and start reading from there. Interestingly, the example that metamorphium used is a bomb :)
In a few words, in WME you can attach/detach any script you want at any time. Attaching a script will execute any code inside (be it event handlers, functions/procedures or just simple code). In the code inside you will have a loop that will exit when the time comes for the bomb to explode. Right after the loop (which must contain the Sleep() command so your game is not frozen) you will place the code that explodes the bomb (or executes any timed event you wish).
-
anarchist. Thanks for reply. So there is no command for a timer so just use a for loop? Will check out that link. Thx