How do I play animation on click via spriter plugin?

Get help using Construct 2

Post » Sun May 22, 2016 2:31 pm

hi, I'm using BrashMonkey's scml plugin which allows you to put your spriter project into construct 2.
more info can be found here if you're interested: viewtopic.php?t=75748&start=0

everything is working fine, other an issue with playing an animation when RMB is clicked. Its for shooting a gun.
the animation jitters for a moment but stays on idle.

I'm doing it like so >On Right Mouse Clicked > Set animation "SHOOT"

does anyone know of a way to make this work? I think im not setting it up right & need to further convince the system to do what I want - im just not sure how to go about that.
if this isnt enough info ill upload my .capx

any help appreciated - thanks
B
5
S
2
Posts: 9
Reputation: 433

Post » Sun May 22, 2016 8:48 pm

You probably have some overriding idle animation logic. But yes this is kinda impossible without the .capx, cut it down and link! :D
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187

Post » Mon May 23, 2016 11:41 am

true, here's the .capx (it might be a bit messy - this is my first project with c2

https://www.dropbox.com/s/82f9agiw6m3bg ... .capx?dl=0

Might be a big ask but i have another issue ive just run into if you're able to help with it:

I want the bullets to be able to pass across my character if they happen to come in contact with her - rathe r than having to guide it over her..
i did this with a simple 'On Collision with PlayerBox disable bullet collisions' although this makes the bullets stop dissapearing when they collide with the vortex....
B
5
S
2
Posts: 9
Reputation: 433

Post » Mon May 23, 2016 12:22 pm

Pretty good guess. Event 27 your idle animation logic is always playing when you right click and overrides the shooting animation. If you disable this you'll see it go into the shoot animation on right click. You'll need to split scenarios so that when you are going to shoot, the idle animation does not apply. At the moment it plays whenever the player is touching the floor and the stutter jump you are seeing is the jump to start with 40ms blend logic or resetting of the idle animation.

For the bullets passing through, the idea sounds good. Just make sure to enable bullet collision again when not in contact with the player. It will need some fine tuning though I guess.
B
46
S
16
G
74
Posts: 2,089
Reputation: 44,187


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, evillair, NumberOne, Solomon and 6 guests