How would this 'decision tree' look like in pawn ?
#4

Since we don't have 100 cases and ifs, I think the if-structure is good. With indentation you can clearly see what's where + an editor with more than just standard functions would make it well organzized (letting you snap in single functions/areas).

But I'm just saying that because I don't think there is another efficient way
A switch-case wouldn't work out because you don't have only numbers here, but conditions (except the 'states').

The only alternative are jumps, but they will make it a chaos.


Problem is, you don't have all the information you need at one place (e.g. in one timer callback), meaning you get some information from callbacks (like shots) but some are only accessible through a timer.

So splitting it up to as many callbacks as possible is the most efficient way, but not that easy.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)