[SOLVED]Private Variables not working in Construct Classic?

This forum is currently in read-only mode.
  • 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:

    [attachment=0:1jt4gjof][/attachment:1jt4gjof]

    Can somebody please help me with this? Thank you!

  • 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.

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Glad to hear!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)