[engine] Allow custom clock within a scenario
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[engine] Allow custom clock within a scenario
Hey,
What I have recently come across with is that I cannot initiate an event at a completely random time. At selecting, during movement, before an attack, etc. these are all available, but only if I specifically make an event for that.
Easiest example: We have a map, with a rain effect. And we want to play a thunder sound (and maybe flash the screen) a couple of times during the scenario.
The idea is to introduce a new [event] name=time elapsed X.
An inner clock of the game would start at the begginning of the scenario. When X time has elapsed, the [event] would fire. Regardless of what is happenning at the game right then.
The measure should probably be seconds, miliseconds available with dotting.
The following tags would of course be neccessary:
[set_clock] value=sets the time to a given value. Setting it to 0 obviously equals something like [reset_clock].
[set_clock] add= adds the given signed value to the timer.
Then the above mentioned example would work like:
This would make the screen flash white with thunder every 42 seconds. If I want to make the looping time change after each flash, the value to which I reset the clock would be a random variable. (ranging from 0 to 41.9, obviously. Setting it to 41.9 could cause severe eye damage though... ).
I'm sure it could prove useful with a lot of interface actions. Not sure how events like this would affect if units and sides and stuff like this were modified, as this event could take place anytime - during movement, during a fight...anywhere, anytime. To prevent bugs, maybe it could be limited to be allowed to fire only when nothing is happenning (the player or the AI is browsing for the next unit to select).
What do you think?
What I have recently come across with is that I cannot initiate an event at a completely random time. At selecting, during movement, before an attack, etc. these are all available, but only if I specifically make an event for that.
Easiest example: We have a map, with a rain effect. And we want to play a thunder sound (and maybe flash the screen) a couple of times during the scenario.
The idea is to introduce a new [event] name=time elapsed X.
An inner clock of the game would start at the begginning of the scenario. When X time has elapsed, the [event] would fire. Regardless of what is happenning at the game right then.
The measure should probably be seconds, miliseconds available with dotting.
The following tags would of course be neccessary:
[set_clock] value=sets the time to a given value. Setting it to 0 obviously equals something like [reset_clock].
[set_clock] add= adds the given signed value to the timer.
Then the above mentioned example would work like:
Code: Select all
[event]
name=time elapsed 42
first_time_only=no
{FLASH_WHITE (thunder.ogg)}
[set_clock]
value=0 # add=-42 would yield the same result
[/set_clock]
[/event]
I'm sure it could prove useful with a lot of interface actions. Not sure how events like this would affect if units and sides and stuff like this were modified, as this event could take place anytime - during movement, during a fight...anywhere, anytime. To prevent bugs, maybe it could be limited to be allowed to fire only when nothing is happenning (the player or the AI is browsing for the next unit to select).
What do you think?
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: [engine] Allow custom clock within a scenario
Or just like select event, doing game changes causes oos.
- skeptical_troll
- Posts: 500
- Joined: August 31st, 2015, 11:06 pm
Re: [engine] Allow custom clock within a scenario
I cannot guarantee it cause I never tried myself, but [sound_source] has a 'delay' and 'chance' tags which can help you achieve what you want. This of course would only do for the sound part, not the lightning effect.
Re: [engine] Allow custom clock within a scenario
Not sure if [sound_source] would do it...but I'll try.
Anyway, this idea is more than just sounds, it could come in handy for a couple of interface actions. And game-changes, with the same effect as select events, then.
Hell, it could even be used to create scenarios which run for actual time, not only turns. Sure this could go annoying if not perfected, but it could be done.
Anyway, this idea is more than just sounds, it could come in handy for a couple of interface actions. And game-changes, with the same effect as select events, then.
Hell, it could even be used to create scenarios which run for actual time, not only turns. Sure this could go annoying if not perfected, but it could be done.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny