0 Favourites

How do I get 'Else' to work?

  • 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.

    (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'!)

    Any suggestions?

    EDIT: Fixed the event sheet image.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.

  • You want Else in each condition block:

  • Thanks all, I think I figured it out using your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
4,517 857,579
Tinimations's avatar
Unread sticky
1,586 437,376
matriax's avatar
Unread hot topic
378 33,279
part12studios's avatar