Changing Tags during run time

TheReconTheRecon Member Posts: 7
edited November -1 in Working with GS (Mac)
does anyone know how to set the 'code' to change a tag during run time? for example right now it has "TagA" and when it hit a trigger, It is given a new tag for example "TagB" while the game is still running.

Comments

  • TheReconTheRecon Member Posts: 7
    anyone has any idea???
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    As in collision/actor tags or just a name that is displayed?

    Ace
  • TheReconTheRecon Member Posts: 7
    actor tags. like to go to next level you need actorTagB
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I still don't really understand, but this is what I think you mean...

    In the actor that you want the tags, create a new Text attribute called 'Tag'. Have the attribute set to 'Tag1'. When it collides with another actor/you tap it/however you want to change the tag, just add a rule saying if self.Tag IS Tag1 then change attribute self.Tag to Tag2.

    Is this what you mean?

    Ace
  • micksolomicksolo Member Posts: 264
    change attribute -> self.tags to "whatever" should work.

    I just did it in my game for an actor, when the player actor collided with another actor, I changed the other actors tag to 0, then reset it next level. Good way to get around destroying and respawning actors if you don't want to reload levels.
  • TheReconTheRecon Member Posts: 7
    sorry if i phrase it wrongly but yes that is what i meant. but for some reasons it does not work.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Re-read it a few times because that will work buddy.

    Ace
  • TheReconTheRecon Member Posts: 7
    kk thanks i shall try again
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'm going to my old place in a minute which has an Internet connection so I will make a demo for you and upload it if I get an chance.

    Ace
  • TheReconTheRecon Member Posts: 7
    thank you
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I've done the template, just need an Internet connection to get it uploaded.

    Ace
  • TheReconTheRecon Member Posts: 7
    thanks but i need another actor to check if this tag is tag 2 or not
Sign In or Register to comment.