@Mixel I'll need to think about it.
---
Daily check in.
- One minor fix. The auto fade ins/fade outs doesn't override the music volume variable. As a bonus to that, the fade in of music should never become louder than what you've set the music volume (so if you set your music to play at half volume, the fading in and fading out will never make it play at full volume).
- One minor optimization to Scorpion's virtual machine CPU, hopefully that won't mess anything up.
- One major new feature: The "For each actor" command under conditional.
Consider this case: You've got a smart bomb in your game that damages or destroys all enemies on screen. Implementing something like that before would have been tricky, using OnTimers and such.
We can now simply do something like:
Foreach actor of type "enemy_type_1" execute "damage_enemy_codeblock"
We can also run Foreach on ALL actors instead of a specific type, and then use the destination codeblock itself to do different actions based on the type of actor.
It should in theory be possible to do counts of actors this way, for example:
ActorCount = 0
foreach actor of type all, execute CountActor
And then "CountActor" would be just "ActorCount += 1"
Note that this only applies to "live" actors, it doesn't work on actors that have been recycled off screen.
|