How do I move an object to different layers?

From the Asset Store
112 High-Quality destruction sounds for videogames
  • I've been trying to do this for an hour.

    I have two events.

    If Space pressed

    Object is on Layer 2

    ->Trigger Once ----> Move Object to Layer 4

    If Space pressed

    Object is on Layer 4

    ->Trigger Once ----> Move Object to Layer 2

    No amtter what the trigger is, the object won't do anything.

  • Try

    If Space pressed
      Object is on Layer 2
        -> Move Object to Layer 4
      Else
        -> Move Object to Layer 2[/code:3l00yix4]
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try

    > If Space pressed
      Object is on Layer 2
        -> Move Object to Layer 4
      Else
        -> Move Object to Layer 2[/code:1xl2bcen]
    

    It says that Else is not valid.

  • > Try

    >

    > > If Space pressed
    >   Object is on Layer 2
    >     -> Move Object to Layer 4
    >   Else
    >     -> Move Object to Layer 2[/code:37yr5ttw]
    > 
    
    It says that Else is not valid.
    

    If else is not valid then just change it to this:

    If Space pressed
      Object is on Layer 2
        -> Move Object to Layer 4
      Object is on Layer 2(invert)
        -> Move Object to Layer 2[/code:37yr5ttw]
  • > Try

    >

    > > If Space pressed
    >   Object is on Layer 2
    >     -> Move Object to Layer 4
    >   Else
    >     -> Move Object to Layer 2[/code:kycxom1x]
    > 
    
    It says that Else is not valid.
    

    Make sure you are applying it to the right event. If you add it to the "space pressed", it isn't valid, but it is to the Layer condition. The Else event should be directly below and at the same spacing as the event:

  • >

    > > Try

    > >

    > > > If Space pressed
    > >   Object is on Layer 2
    > >     -> Move Object to Layer 4
    > >   Else
    > >     -> Move Object to Layer 2[/code:35s0mmqn]
    > > 
    > 
    > It says that Else is not valid.
    > 
    
    If else is not valid then just change it to this:
    
    [code:35s0mmqn]
    If Space pressed
      Object is on Layer 2
        -> Move Object to Layer 4
      Object is on Layer 2(invert)
        -> Move Object to Layer 2[/code:35s0mmqn]
    

    Okay, thank you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)