2 big problems in contruct : slowing a project.

This forum is currently in read-only mode.
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • I think there is a big problem in construct that bothers me tremendously in creating video games:

    You want to create an object, say Tutu example. Then we want after 5 seconds to destroy it.

    If you have an object, it works no worries, because the object being the only object of its type, it will be created and then destruction. But if you have the same type of objects in the scene, and you create an object, if you say to destroy the object, it will destroy the object of the same type!

    It should therefore be a very important feature in my opinion: it may affect the setting or take actions on the last object created in the statement block !!!!!

    In addition: If we do an event like this:

    weapon.Value ('dammage') Equal to 3: then => set weapon.Value ('dammage') to 4

    It works! Changes the value of private variable for objects affected by the condition.

    but if we do now:

    weapon.Value ('dammage') Equal to 3:

    Wait 3000 ms

    then => set weapon.Value ('dammage') to 4

    Any Weapon objects, even if they do not meet the condition, go to their private variable dammage affect the value 4.

    These are two big problems that put big stick in the wheels

    As part of my project I create for the fireball attack multiple enemies, I wish I could create fireball every few seconds and can identify each of them separately in order to destroy them after a period Certainties time, yet I have no way to do that.

  • You really need to do understand picking. In your case you're using the Wait object, well, you're out of luck. A wait action breaks all previous picking. Therefore all instances of the object will be affected.

    As an alternative I would suggest using a private variable, calling it 'Lifetime' or something else that makes sense. You set it to an inital value of 5000 to get the 5 seconds you want (I like to measure time in ms), then have an event that always substracts 1000*TimeDelta from that PV.

    Have another event that destroys the object when the PV is <= 0, and there you have it. A perfectly working 5 second timer without any picking issues.

  • Ok thanks, d you have an example .cap to give to me please ?, i will better understand

  • I think this issue is important enough to go a bit into detail about it, so here you go:

    We Construct Blog - Forum rescue #002: Timer

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks i will test this !

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