Upgrading An Actor From another Actor/Button
Alright So only a few more small kinks to work out in my game...
In my game you buy Actors (Multiples of the same 4 actors) which attack enemies
-So you could have a quantity of 4 "Actor A" and 4 "Actor B"
Right Now I have the function:
When Actor A if < touch is pressed > do < Spawn Actor "Upgrade Button" >
What Im looking to do is:
When Actor "Upgrade Button" < Touch is pressed > do < Change Attribute > Actor A self.attribute.upgrade =1
I cant find a way for one actor to change the attribute to another actor tho…
I have tried making it a global attribute but what happens when I hit the "Upgrade Button" it upgrades EVERY SINGLE "Actor A" on the screen. I'd really prefer it only influence a single "Actor A" instead of "Actor A" as a whole...
I cant think of a way around this dilemma
@tatiang recommendations?
Comments
Create a local attribute for you Actor A, let's say ID, so you can have Actor A ID=1, ID=2, ID=3, and ID=4.
When Upgrade Button = 1, Actor A ID=1 then upgrade this actor, and so on for the other actors.
My Gamesalad Games On App Store:
Greedy Chubby: https://itunes.apple.com/us/app/greedy-chubby/id834371213?ls=1
I edited your post to add spaces before and after each < or > symbol. Without those, the forums software formats the post and removes information.
I'll send you a private message.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User