Talking to NPCS

Get help using Construct 2

Post » Sun Mar 31, 2013 7:34 am

I'm wondering some opinions on the best way to do this. Currently, I'm creating a blank sprite on each npcs and pinning it the npc. I then set a "if player < 100 pixels from NPC, on SPACE, do the following lines of dialogue".   The only issue I come up with this is if 2 npcs are next to each other, it kind of freaks out.

This is more of a general question; does anyone have any thoughts on the best way to accomplish an rpg style npc dialogue event?
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Sun Mar 31, 2013 10:17 am

Have the player click directly on the NPC?
B
14
S
3
G
3
Posts: 89
Reputation: 2,750

Post » Sun Mar 31, 2013 10:22 am

Mouse is disabled
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Sun Mar 31, 2013 10:23 am

[QUOTE=ome6a1717] The only issue I come up with this is if 2 npcs are next to each other, it kind of freaks out. [/QUOTE]

You could add 'pick closest NPC to player x,y' condition and you'll get only one NPC talking.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Sun Mar 31, 2013 10:31 am

Hey Vee,

I currently have an exclamation point sprite pop up when you're < 100 pixels from an npc. The pick nearest works with the dialog, but unfortunately doesn't set the ! sprites visible/invisible correctly when I use 'pick closest NPC'. That's why I was hoping of possibly figuring out a way to use Pin UIDs, but to no avail.
B
22
S
3
Posts: 451
Reputation: 2,135

Post » Sun Mar 31, 2013 10:53 am

[QUOTE=ome6a1717] Hey Vee,

I currently have an exclamation point sprite pop up when you're < 100 pixels from an npc. The pick nearest works with the dialog, but unfortunately doesn't set the ! sprites visible/invisible correctly when I use 'pick closest NPC'. That's why I was hoping of possibly figuring out a way to use Pin UIDs, but to no avail.[/QUOTE]

You could place the ! sprite in container with the NPC sprite. Then, it would be automatically picked with the NPC and you could refer to it without need to separately pick it.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Sun Mar 31, 2013 11:19 am

Would I still be able to use the NPC family this way?
B
22
S
3
Posts: 451
Reputation: 2,135


Return to How do I....?

Who is online

Users browsing this forum: GSquadron, jeffige, MarkThomas, MisterAqua, Nifl, paala, TD Bauer and 21 guests