How do I get 'Else' to work?

Get help using Construct 2

Post » Thu Aug 11, 2016 6:01 pm

Let me explain, I'm working on a top-down game. In the HUD there are coordinates and a 'Location Name' text object. Just as a placeholder whilst I get all of the mechanics working I'm testing between three locations, the Spawn, the Safe House and the Wilderness. My character detects where he is by overlapping objects, meaning that I have invisible sprites that the character overlaps to tell him where he is.

At the moment the only two specific locations are the Spawn and the Safe House, I'm trying to get the character to automatically locate empty areas as 'Wilderness' using the Else event. It works when there's only one specified location, but when I add any more it won't automatically set empty areas to Wilderness. It just doesn't detect anything, it get stuck on whatever location he was last on; but I can still walk between specified locations with it telling me what it is, just not the Wilderness.

Image
(The Blue is the Safe House, the Yellow is the Spawn and the empty grey is just nothing: where the character is supposed to figure out it's 'Wilderness'!)

Image

Any suggestions?
EDIT: Fixed the event sheet image.
----------

If you need a hand with anything, just drop me a PM.
B
8
S
2
Posts: 29
Reputation: 560

Post » Thu Aug 11, 2016 6:47 pm

Well I am partially not sure what you are trying to do. However, I can tell you that the "Else" condition only works when it connects to a System condition and not any other (at least that is what I know). If you tried to connect Else to any other object other than the System it won't activate at all. What you can do however is put a condition for each state or lack there of.

For example, what I see here is that Character is overlapping Spawn or Safehouse. If you want to add a condition where anything else other than the previous ones, just add the above two conditions into one and invert them (right click a condition and choose invert). So it should read:
Character is overlapping Safe House (x)
Character is overlapping Spawn (x)

The (x) denotes the inverted condition.

Hope that helps or makes sense.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Thu Aug 11, 2016 6:59 pm

You want Else in each condition block:
Image
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Thu Aug 11, 2016 11:12 pm

Thanks all, I think I figured it out using your help. :)
----------

If you need a hand with anything, just drop me a PM.
B
8
S
2
Posts: 29
Reputation: 560


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 31 guests