Help with System "Create Object" Action

Just started using Construct 2? Post your questions here

Post » Fri Aug 08, 2014 12:53 am

Hello,

I don't know if this is a silly question but I'm having trouble with using the System "Create Object" command creating the object over and over instead of just once.

my Event looks like this:
System < distance(player.x, player.x, npc.x, npc.y) > 200
System < Create Object < DialogBubble

Else < Destory DialogBubble

When I test this...it's creating the Dialog Bubble over and over and over until I get further enough away to trigger the Destroy command.
B
12
S
3
G
1
Posts: 35
Reputation: 838

Post » Fri Aug 08, 2014 1:24 am

Events run about 60 times a seconds, so this is going to repeat 60 times a second UNLESS you add extra code to keep track of your current state. In this case add the extra condition: 'Compare two values' with DialogBubble.Count = 0
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Fri Aug 08, 2014 1:53 am

blackhornet wrote:Events run about 60 times a seconds, so this is going to repeat 60 times a second UNLESS you add extra code to keep track of your current state. In this case add the extra condition: 'Compare two values' with DialogBubble.Count = 0


Thanks so much! I have trouble with what type of values are available for objects. Any chance of directing me where they are documented in the manual?
B
12
S
3
G
1
Posts: 35
Reputation: 838

Post » Fri Aug 08, 2014 2:08 am

A "trigger once while true" condition might also work here.

In the manual, search for these:
common conditions, common actions, common expressions
system conditions, system actions, system expressions..
B
86
S
43
G
71
Posts: 601
Reputation: 43,619


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests