How do I Make creating object for short time

  • Hi,

    Let me explain you what is my problem ! I'm trying to make a little plateform game; in this game my Super-Hero can creat litle plateform under is feet. So I made a Sprite "Created_Plateform".

    Hero is on jump Spawn Created_Plateform

    'Created_Bloks' = 0 Then Set 'Created_Bloks' to 1

    Space pressed

    And

    'Created_Bloks' = 1 Then Wait 2 Seconds

    Destroy "Created_Bloks"

    Set 'Created_Bloks' to 1

    The first time it works perfectly but the second time if I let space pressed it spawn many bloks !!!!

    And secondly, I created a sprite ''DIE" when my hero touch it the sceen scroll to this block and the screen shake but if i dont touch it scroll is disable but the screen doesn't follow my hero !!

    Here is the document !!Sorry for my english, and thaks a lot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try it like that, you need 1 boolean variable, can be a player instance var. call it canCreatePlatform for example.

    Player > On Jump> Set canCreatePlatform to true.

    Player > On Jump--------------------------- canCreatePlatform = 1---------> Set canCreatePlatform to 0

    Space pressed ------------------/ Create platform under hero's feet.

    Player > On landed > Set canCreatePlatform to 0

    Platform > On created > Wait 2 seconds.

    Destroy

    As for the scroll, I don't know what is happening. Are you using System> set scroll to object (Hero)??

  • Thanks !

    EDIT: It works !!

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