How do I move an object to different layers?

Get help using Construct 2

Post » Wed Feb 03, 2016 5:50 pm

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.
B
5
S
1
Posts: 73
Reputation: 521

Post » Wed Feb 03, 2016 5:59 pm

Try
Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Else
    -> Move Object to Layer 2
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Feb 03, 2016 6:06 pm

7Soul wrote:Try
Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Else
    -> Move Object to Layer 2


It says that Else is not valid.
B
5
S
1
Posts: 73
Reputation: 521

Post » Wed Feb 03, 2016 8:09 pm

gomotion100 wrote:
7Soul wrote:Try
Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Else
    -> Move Object to Layer 2


It says that Else is not valid.


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

Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Object is on Layer 2(invert)
    -> Move Object to Layer 2
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,862

Post » Wed Feb 03, 2016 9:24 pm

gomotion100 wrote:
7Soul wrote:Try
Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Else
    -> Move Object to Layer 2


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:

Image
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Feb 03, 2016 10:24 pm

chadorireborn wrote:
gomotion100 wrote:
7Soul wrote:Try
Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Else
    -> Move Object to Layer 2


It says that Else is not valid.


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

Code: Select all
If Space pressed
  Object is on Layer 2
    -> Move Object to Layer 4
  Object is on Layer 2(invert)
    -> Move Object to Layer 2


Okay, thank you.
B
5
S
1
Posts: 73
Reputation: 521


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests