Embedded Rule to Change Scene Requires An Additional click to Go To Next Scene

WhymmWhymm Member, PRO Posts: 1
edited March 2015 in Tech Support

What the title says.

rule on touch
interpolate alpha to 1
rule on alpha is 1
change scene

I have to click on the screen again after the alpha reaches 1 before it'll start the next scene.

What I've had to do is instead of using the embedded rule to change scene, I toggled a boolean attribute and then had a external rule that detects the toggle change to change the scene like so:

rule on touch
interpolate alpha to 1
set attribute to true

rule attribute is true
change scene

Comments

  • gamestewgamestew Member Posts: 11

    I think GS has a hard time reconciling(get) alpha. so you need to make it atatribute based like this :
    If touched and Transparency = 1 then make transparency=0

    and a separate rule, that says, if transparency is>= 1 change self.alpha to 1
    (alpha in GS is on a scale from .01-1.00

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

    rule on touch
    interpolate alpha to 1
    rule on alpha is 1
    change scene

    You're telling the actor to Interpolate its self.Color.Alpha value when Touch is Pressed. If you click on the actor, it's not going to change to 1 instantly. You'd have to hold down the mouse/tap until it reaches 1.

    If you want the actor to always interpolate self.Color.Alpha to 1 when clicked, set it up like this:

    When Touch is Pressed
         Change attribute self.boolean to true

    When self.boolean is true
         Interpolate self.color.Alpha to 1

    When self.color.Alpha = 1
         Change Scene

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

Sign In or Register to comment.