NPC (boolean) counter

Get help using Construct 2

Post » Thu Mar 29, 2012 9:17 am

Hey Guys,

I can't quite figure this out. I tried to do a search, but couldn't find what I wanted.

Problem: I'd like to award 1 point for each NPC the player talks to the first time.

So, I set an boolean instance variable for the NPC. When the player talks to the NPC it sets the boolean to True. (I called the boolean "SpokenTo")

The I have an event:

System| For each NPC
NPC| Is SpokenTo
-> Add 1 to Score



But the counter continually goes up after speaking with the NPC. I tried a "trigger once when true" condition, but it didn't work.

Sorry, I don't have a capx to share, but I can make one if necessary.

Edit: I should also note that each NPC has a unique instance variable (in my case, each NPC has a unique name). breravin2012-03-29 09:39:18
B
7
S
1
Posts: 24
Reputation: 935

Post » Thu Mar 29, 2012 9:43 am

Heh, I sort of answered my own question with my last edit. It's a bit more manual that I'd like, but gets the job done :)

B
7
S
1
Posts: 24
Reputation: 935


Return to How do I....?

Who is online

Users browsing this forum: dieblume86, Kagubro, Yahoo [Bot] and 2 guests