Help with System "Create Object" Action

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

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

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

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