Ok I am having a new problem

Get help using Construct 2

Post » Mon Nov 02, 2015 6:06 am

If you were following my other post I am stuck on the function part of enemy code to attack.

So far i have created this crappy frames animation for each enemy attack so that I could test how well the picking event was running for each enemy in a turnbase. I got all the action down that isnt the issue.

What is puzzling me the most is that After the picking and the action i get it to call a function Let say Attack or acidneedle or do nothing. basically three separate action with three function to start animation. Apparently I cannot get the function after the event to keep the UID picked it like it completely forgets what function to operate on so instead of doing animation to the picked it does it all of the enemy.

I tried using other sprite to store the UID number, I tried using the same event for the first time picking, I tried overlapping sprite as another condition. Nuthing is working It only run the function to all enemy instead of the picked out one from the first set of event. I am at lost Is there any thing i can try,

If I need to i can post capx to show what i mean. unless if i am going the wrong way to implement this part.
B
52
S
24
G
6
Posts: 391
Reputation: 7,845

Post » Mon Nov 02, 2015 6:35 am

Yes, you have to re-pick the sprite in the function. Set one of the function's parameters to the Sprite's UID, then in the function "Pick by UID" and use that parameter.
B
233
S
62
G
33
Posts: 902
Reputation: 40,398

Post » Mon Nov 02, 2015 4:51 pm

Thx you @paradox i didnt know i had to repick em again I figured that when calling an function with a picking already would let the engine know keep that picking.

yeah you were right All i did was copy n paste all my original picking code and it seem to work I now know how dumb this engine can be and ill be sure to include every picking event
B
52
S
24
G
6
Posts: 391
Reputation: 7,845


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests