Destroy created Object?

0 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Create Object A at (x,y) works just fine. Click on Object A > Destroy Object A doesn't work. Neither does moving it. I click on Object A at (x,y) and it doesn't destroy it. Destroy means Destroy, so why does the created object, an instance of Object A, stay active even though Click on Object A > Destroy Object A ?

  • Object A was created at (x,y) I have it set so when you click on Object A, it destroys Object A. I am clicking on the Object A that was created at (x,y) so why is it not being destroyed? Destroy means Destroy. So Destroy Object A should Destroy Object A. So why is the Destroy function broken?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Object A that was created at (x,y) is still Object A. So why is Destroy broken and fails to Destroy Object A at (x,y)

  • Aw...It was the Random function. I had to do Trigger Once while True. I figure Construct 2 checked the Random number and did it once. I did not put in a loop, but it looped it anyways. I think what happned was... Clicking destroyed the object, but since it was if Random = x then Create Object A at (x,y), as soon as Object A was destroyed, it created another Object A.

  • you dont need to use random x to destroy an object if u have also the condition on clicked object... what happened was when u clicked a random X position was selected... from the width of the layout... and ur sprite was not on that X position... just use the mouse or the touch condition on object clicked or on object touched... then sprite.destroy... also you may want to next time to not post a new reply to your own post but edit the first one until u get a response. otherwise you will be flagged as spamming the board.

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