Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

im literally miserable over this right now so im going to try to ask for help

this is in construct 2


sprite has a text instance variable named 'dialog' that's just set to some chatter. if you want to copy it for testing just put in filler text.

sprite font and dialog box are set on layer dialog, everything else is on the main layer.

so the idea here is that when the player is no longer overlapping the sprite, the dialog goes invisible, right?? but it doesn't. it just hangs there. i want it to go away. it wont let me make an 'else' variable that turns the layer invisible. i cant figure that one out either.

I haven't used construct 2, but it seems there isn't an event that tells the dialog box to go away after it comes up. As it is, the condition "playerBox is not overlapping Sprite" is under the Keyboard "E" pressed event. Does your dialog box go away if you press E and your player isn't overlapping the sprite?

the dialogue box is on layer 'dialogue', so the idea is that it's supposed to go away by making the entire layer it's on invisible when you're no longer overlapping the npc sprite.

to answer your second question, not it does not. it doesnt go away even if you disable pressed E either. if you disable pressed E, the dialogue appears when you overlap the sprite and stays when you are no longer overlapping the sprite, even though that's the condition for the layer to turn invisibile again.

(+1)

huh. i got it working by removing "is not overlapping sprite" as a sub event and making it its own event

not ideal ebcause i wanted to have two separate dialogue npcs (one for units and one for lore tablets so i could make their boxes different) but i guess it'll do

hi!! whats happening here is that "not overlapping" is a condition underneath a key press + overlapping. the whole group of events only fires on a key press with the overlapping condition, but not overlapping will never fire bc it would only be checked if the above conditions were true!! im not too sure what you need exactly eith the two diff npcs but is it possible to solve with booleans--either one or the other or both can be used to toggle the layer's visibility?