this is a math problem more less..
now i have a boat - it has 6 weapon levels.
level 1 - shoot forward
level 2 - shoot forward and left at the same time
level 3 - shoot forward left and right at the same time
level 4 - shoot forward different bullets
level 5 - shoot forward and left different bullets
level 6 - forward left and right different bullets.
now i'm tryin' to optimize this code as much as i can and i've already reduced code from 6 subevents to 3,
but i can't figure how to translate weapon level (1,2,3,4,5,6) to number of bullets (1,2,3,1,2,3). any ideas?
also how would i use the 1,2,3,1,2,3 for shooting in angles (1 - forward, 2 - forward and left, 3 - forward left and right)?
Develop games in your browser. Powerful, performant & highly capable.
variable: numberofbullets = 1;2;3;1;2;3
set currentnumberofbullets to: int(tokenat(numberofbullets, weaponlevel-1, ";"))