Construct Classic question about trigger sets

For questions about using Classic.

Post » Tue Sep 23, 2014 6:09 am

I am making a small demo rpg to show some people the construct engine and i have it set up so that there are several tooltips that pop up depending on where the player is standing. so far i have 2 triggers set up:

player is overlapping object 1
---set tooltip text to "blah blah blah"
else
---set tooltip text to ""

player is overlapping object 2
---set tooltip text to "blah blah blah 2"
else
---set tooltip text to ""

when I set up the first one it worked fine, when i set up the second one it worked fine but it broke the first one because only the second one shows the text. im guessing there is some kind of conflict where it is bypassing the first one altogether so is there some kind of extra trigger or something i need to put in before i can add more tooltips? thanks for the help in advance.
B
6
Posts: 30
Reputation: 292

Post » Tue Sep 23, 2014 12:32 pm

discoverthecurse wrote:I am making a small demo rpg to show some people the construct engine and i have it set up so that there are several tooltips that pop up depending on where the player is standing. so far i have 2 triggers set up:

player is overlapping object 1
---set tooltip text to "blah blah blah"
else
---set tooltip text to ""

player is overlapping object 2
---set tooltip text to "blah blah blah 2"
else
---set tooltip text to ""

when I set up the first one it worked fine, when i set up the second one it worked fine but it broke the first one because only the second one shows the text. im guessing there is some kind of conflict where it is bypassing the first one altogether so is there some kind of extra trigger or something i need to put in before i can add more tooltips? thanks for the help in advance.


I am not a CC user, but I would guess that setting the tooltip text actually replace the contents of it, so when the player overlaps both of them, the first one occurs, and in the same tick the second one occurs, replacing the text from the first one.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Tue Sep 23, 2014 3:55 pm

It doesn't work because of your second else. If you're over object 1 the first event works and sets the text, but then event 2 runs and since you're not over object 2 it sets the text to "".

Do this instead.

always
--- set text to ""

player is overlapping object1
--- set text to "object1"

player is overlapping object2
--- set text to "object2"
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Tue Sep 23, 2014 9:16 pm

Thanks R0J0. that was a really easy and quick fix
B
6
Posts: 30
Reputation: 292


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests