Dialog Problem.

Get help using Construct 2

Post » Tue Dec 23, 2014 3:21 am

Hi guys, I have set up check points throughout my lvl, when these checkpoints are hit it adds one to a variable that i set to play certain texts for each check mark. (the only way it made since to me)
It is working fairly good except if you get to the second check point before the first text is over.

It plays both of the texts at the same time. Is there a command i can put in to cancel out the first text once the next check box is hit.??? and suggestions would be appreciated. thanks
B
7
S
1
Posts: 42
Reputation: 461

Post » Tue Dec 23, 2014 3:51 am

Really difficult without a capx, but is the text the same Text instance? If so then the old text should overwrite the last. If not then just pick the previous Text instance (give them an ID 1, 2, 3 etc for this) then clear the text for Text ID1 when you hit checkpoint 2, for example.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Dec 23, 2014 4:09 am

Yeah, you should be using the same text object, and just setting the new text when you reach the checkpoint.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Tue Dec 23, 2014 1:54 pm

As @Burvey said, you should use one text object and just set its text. By the way, I'd put the text as a variable of the checkpoint object.

And add the event:
Code: Select all
Player on collision with Checkpoint > Set checkpointDialog text to Checkpoint.text
                                      Set checkpointDialog visible

Fail proof! :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
2
Posts: 621
Reputation: 3,494

Post » Tue Dec 23, 2014 2:57 pm

Here is how i have it currently set up feel like something is a little wrong. Because it should be working smoother?

I messed it up more somehow and now its not working well at all i must be missing something.
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 42
Reputation: 461

Post » Tue Dec 23, 2014 3:36 pm

I didn't look through your code with a fine toothed comb but the one thing that jumps out at me is your use of the wait event. I believe that you should be using a timer behavior instead for that.

Also, since you're using the free version, I think you should be able to save yourself a few events by moving your events (not triggers) in 53 and 54 all up to 52. You will need to make more events for the timer behavior though if you change it out with the wait, which you should.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Tue Dec 23, 2014 4:31 pm

I will give that shot. Have not used timers much. But if it is more common to use timers for text. I will learn to do it! thank you
B
7
S
1
Posts: 42
Reputation: 461

Post » Tue Dec 23, 2014 4:35 pm

It seems to me you would save a lot of space and time, and keep your code more organized, if you created a function to show Hippy and his tips. I can help you to set this up, but I'd need to see how exactly this thing behaves. If you can share the capx, I could just add it there for you. :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
2
Posts: 621
Reputation: 3,494

Post » Tue Dec 23, 2014 5:25 pm

I would love some help, but im a little embarrassed by how spastic and unorganized all my stuff is. Its kind of a organized chaos. I am not sure i know how to set up a function like that. only been working with the program a couple weeks so still trying to figure stuff out. So i would defiantly use the help. I am going to go try and neaten everything up a little.
B
7
S
1
Posts: 42
Reputation: 461

Post » Tue Dec 23, 2014 5:44 pm

Don't worry about the mess. We've all written messy code once... :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
2
Posts: 621
Reputation: 3,494

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests