Much of my events would be simplified if I could do some of these behaviors. These are common basic logic-flow controls from any programming language and I'm curious if there's any way to replicate these with the event editor.
For example, say I have 3 types of ships, and when they press the fire button, I want them all to fire, but different objects. As it is now, I'd have to have 3 separate events that duplicate conditions and actions like so:
*Event 1*
Condition: ship pressed fire1 + ship ammo > ship Alterable Value A (ammo cost) + ship Alterable Value T (type) = 0
Actions: play ship type 0 fire sound + create ship type 0 projectile + subtract ship's ammo cost from ship's ammo count
*Event 2*
Condition: ship pressed fire1 + ship ammo > ship Alterable Value A (ammo cost) + ship Alterable Value T (type) = 1
Actions: play ship type 1 fire sound + create ship type 1 projectile + subtract ship's ammo cost from ship's ammo count
*Event 3*
Condition: ship pressed fire1 + ship ammo > ship Alterable Value A (ammo cost) + ship Alterable Value T (type) = 2
Actions: play ship type 2 fire sound + create ship type 2 projectile + subtract ship's ammo cost from ship's ammo count
As you can see, most of that is duplicated, which is more work to set up, more work to revise/update and creates more opportunity for mistakes. The only difference is the type of object it shoots and what sound it plays (this is a big problem for me, btw, I don't see any way to just say "play my fire sound" and be able to define different fire sounds - alias or macro them, so to speak).
If I could nest and use else, it would look like this:
*Event 1*
Condition: ship pressed fire1 + ship ammo > ship Alterable Value A (ammo cost)
Actions: subtract ship's ammo cost from ship's ammo count
Nest Condition: ship Alterable Value T (type) = 0
Nest Actions: play ship type 0 fire sound + create ship type 0 projectile
Else Condition: ship Alterable Value T (type) = 1
Else Actions: play ship type 1 fire sound + create ship type 1 projectile
Else Condition: ship Alterable Value T (type) = 2
Else Actions: play ship type 2 fire sound + create ship type 2 projectile
This is a simplified example, but I have some groups of events that would really benefit from this. Adding an "OR" would be great, too, for a case where, say, ship types 1 and 5 both fire the same type of projectile.
Anyone know if this is possible using existing features? If not, anyone know if of an extension that adds this?



Reply With Quote

