Little problem

Get help using Construct 2

Post » Thu Jun 07, 2012 3:07 pm

hello,

I have a little problem ....

Here's the event ... When I click on a tree "Castor" goes to the tree and indicated the fact disappear (from a distance) .... its going down the ....But if I arrived before clicking on several tree (it goes to the last mentioned) all the trees that I select are destroyed ... then I want to delete the last

I think the problem is "set to IdUnique sprite UID" because it takes the ID for each click

This is what gives his





Mrx322012-06-07 15:13:36
B
6
Posts: 31
Reputation: 862

Post » Thu Jun 07, 2012 3:31 pm

Your IDUnique variable should be a single global variable, and not an instance variable in each "Sprite".
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Thu Jun 07, 2012 3:41 pm

Ok thank you problem solved ...

But now the same problem appears if the beaver had the misfortune to touch (when it is waiting 3 sec) the tree but the problem does not occur when it does not touch any tree ...


But in any case thank you and why it makes me his with an instance variable ...


Edit: I think I should put a global variable reset somewhere ...Mrx322012-06-07 15:52:15
B
6
Posts: 31
Reputation: 862


Return to How do I....?

Who is online

Users browsing this forum: Callan S, gamecorpstudio, getplay, Kagubro and 14 guests