How to put an actor on top layer with code ?

moiavmoiav Member Posts: 7
edited November -1 in Working with GS (Mac)
hi everybody, i have a problem with my game.
in my game i have 3 actor that i can drag.
when i drag an actor i want that is on top/front of layer.
i want the actor to be on top from the auther but dont find the attribute to do that. Anyone knows ?
thank

excuse me for my bad english, i m french :)

Comments

  • yunxhinyunxhin Member Posts: 14
    you can arrange your actor at the layer setting.
    but i dont know if we can arrange layer inside the game.
    anyone have clue bout this?
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    Make a boolean called Spawn

    First on the actor that you want to trigger event
    IF touch is pressed

    Change attribute game.spawn TO true

    Make a new actor - Make it transparent
    Put this actor in the desired layer. with the following rule

    IF attribute game.spawn is true
    Put in Spawn behavior
    Spawn what ever you want

    iam sure tshirtbooth got a more elegant way of doing it.
    but this will work in the meantime
  • moiavmoiav Member Posts: 7
    thanks for all this answers !!
    i will try the solution of Brynjebams and i wait the video of Tshirtbooth:)

    thanks.
  • moiavmoiav Member Posts: 7
    thanks for all this answers !!
    i will try the solution of Brynjebams and i wait the video of Tshirtbooth:)

    thanks.
Sign In or Register to comment.