random lines (help)

when i click the play button it changes scene (my drawing scene) and then it istantly make a line on the drawing scene without me drawing one, so how do i fix this issue?

Comments

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

    What is your rule for changing scenes? What is your rule for drawing lines?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Simple Gamer ArtsSimple Gamer Arts Member, PRO Posts: 305
    edited July 2018

    @fthd1999 I;ve encountered that issue as well in the past. There are two ways of dealing with it.


    ----simple way:----

    • when you press play button to change scene, put it on "release" instead of "press" / "inside," ect... (if it doesn't work, then forget that and try second way)


    ------second way is a little more complicated but it's the PRO way to go:----

    • create an invisible actor called "tap-to-draw"
    • drag it onto the drawing scene (make it big enough to cover the whole scene)
    • create a game integer called game.attribute.taptodraw

    • inside this tap-to-draw actor, create a rule that says, when touch is inside, change attribute "game.attribute.drawunlock" to game.attribute.drawunlock +1

    • inside the play-button actor create a rule that says, when touch is inside, change attribute "game.attribute.drawunlock" to game.attribute.drawunlock +1

    • in the actual drawing mechanism rule, add an extra condition that says when game.attribute.drawunlock = 2 (then you can draw)

    • inside this tap-to-draw actor, create a rule that says, when "game.attribute.drawunlock = 2, destroy

    • In order for everything to reset itself over and over again, in the scene with the "play-button" inside the "play-button" actor, simply drag a a change attribute: "game.attribute.drawunlock" to 0

    This will do it!

Sign In or Register to comment.