Upgrading An Actor From another Actor/Button

NspeelNspeel Member Posts: 17
edited March 2019 in Help Wanted

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

  • AlkaPPAlkaPP Member, PRO Posts: 194

    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.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    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.

Sign In or Register to comment.