[SOLVED]Private Variables not working in Construct Classic?

For questions about using Classic.

Post » Thu Oct 09, 2014 1:54 am

Hello everyone, I've come across CC on the internet the other day and decided to finally start making my game on it since it was very decent freeware. The problem that's stumping me right now is my dialouge system. What I did was give the NPC I want to talk to in level 1 a private variable called "TalkedTo" and it is initially set to zero. Here's my dialouge events on my event sheet:
Untitled.png

Can somebody please help me with this? Thank you! :)
You do not have the required permissions to view the files attached to this post.
Last edited by Foxtail Boyd on Sun Nov 23, 2014 2:53 pm, edited 1 time in total.
B
5
S
1
Posts: 16
Reputation: 419

Post » Thu Oct 09, 2014 11:41 am

Is the problem that it stays 0 or that it instantly jumps to 2? Odds are your code is triggering all three events because they are in that order, try putting them in reverse order (so talked = 2, then talked = 1, then talked = 0) and see if that helps, as events run from top to bottom.
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545

Post » Tue Nov 11, 2014 2:02 pm

Put the 'TalkTo' variable on Diamonds instead of on PurpleSmart. It serves as a counter to the phrase Diamonds speaks to you, correct?

Try that, and post results.
B
25
S
8
G
7
Posts: 184
Reputation: 6,040

Post » Sun Nov 23, 2014 2:54 pm

Jayjay wrote:Is the problem that it stays 0 or that it instantly jumps to 2? Odds are your code is triggering all three events because they are in that order, try putting them in reverse order (so talked = 2, then talked = 1, then talked = 0) and see if that helps, as events run from top to bottom.

Thank you sooo much, this really helped me. :D
B
5
S
1
Posts: 16
Reputation: 419

Post » Mon Nov 24, 2014 5:31 am

Glad to hear! :)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
41
G
17
Posts: 2,204
Reputation: 19,545


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest