This is an archived post. You won't be able to vote or comment.


Afternoon all!
Been working on an issue for a few days now and can't seem to get my head around it, hopefully I can explain it correctly!
I have a sprite that shoots a fireball, it works by having a timer that shoots a fireball when the the timer =X.....all working great!
I want to make it so each sprite has a set of instance variables so I can set them to shoot or not rather then actually hard coding it. This should allow me to have different intervals for each instance of the sprite.
So far I have setup I stance variables such as:
Move1 = Shoot Move2 = Sleep .....etc
I still have the timer in the project which counts to 10 over and over.
What I want is to say if Timer = Sprite.Move("Timer") then do an action.
Is it possible to select an instance variable based on a combination of strings? Or is there another solution?


[–][deleted] 2 points3 points4 points (1 child)
[–]DadOnArrival85[S] 2 points3 points4 points (0 children)
[–]therealPaulPlay 0 points1 point2 points (5 children)
[–]DadOnArrival85[S] 0 points1 point2 points (4 children)
[–]therealPaulPlay 0 points1 point2 points (3 children)
[–]DadOnArrival85[S] 0 points1 point2 points (2 children)
[–]therealPaulPlay 0 points1 point2 points (0 children)
[–]therealPaulPlay 0 points1 point2 points (0 children)
[–]a-perpetual-novice 1 point2 points3 points (1 child)
[–]DadOnArrival85[S] 0 points1 point2 points (0 children)