Jump to content

Shooting Gun While Walking


Myattus

Recommended Posts

Hello and thanks for looking :)

Ive exported my Spriter animations to Construct2 via scml/scon. While there's a built-in animation for pointing a gun while walking how would I go about having the gun "kickback" when triggered? Do I animate the arm/gun separately from the body or is there some kind of "trigger" mechanic thatll allow the arm to animate independently of the walk animation? 
I hope this makes sense :) Thanks again.

Link to comment
Share on other sites

There might be possible options, both pretty darned complicated.
There is a way to override the animations control over sprites or bones so they can be controlled in real-time by C2, but I've honestly never used that feature myself. I'll bring this thread to Edgar (Spriter's programmer and the creator of the C2 plugin) to see if he can link you to further info.

Aside from that option, yes, you could separate the upper body or just the arm in Spriter to be a separate Spriter object, then anchor it to the character sprite, synchronize animations, and then add recoil animations... this option would be very time consuming, first to break up the character and their arm into separate Spriter files, then to properly event everything to stick the arm to the character Spriter object and properly synchronize everything.

Link to comment
Share on other sites

Im new to Spriter but so far Im quite impressed. I have a bunch of questions but surely figure it out the more I use it. 

Is there a way to add animations from the spriter packs to other chars? For example, run&gun doesnt have a heels dug/quick stop animation. It would be great if I could just copy that animation and bring it into my run&gun character.

Also, Ive edited some of the body parts but when I open the file in Spriter it automatically shows the previous files/partsd. I have to manually switch out the body part even if it's the same file.

I dont want this thread to be me asking you 10 different questions but Ill probably be back with more. Thanks for taking the time, I appreciate it and great job on Spriter. I really like it so far.

Link to comment
Share on other sites

Is there a way to add animations from the spriter packs to other chars? For example, run&gun doesnt have a heels dug/quick stop animation. It would be great if I could just copy that animation and bring it into my run&gun character.  

Sorry, no. Not currently. Do you have the full pack or only Essentials? I thought the full version has that animation still.

Also, Ive edited some of the body parts but when I open the file in Spriter it automatically shows the previous files/partsd. I have to manually switch out the body part even if it's the same file.

This should be impossible. If you edit the same image file, with the same name, and keep it in the same folder, it will be the new image. Are you clicking the little refresh images icon in Spriter after making the change?



I dont want this thread to be me asking you 10 different questions but Ill probably be back with more. Thanks for taking the time, I appreciate it and great job on Spriter. I really like it so far.

No problem.

Link to comment
Share on other sites

Hello again,

I have Pro and all the packs that were on the Humble Bundle a few weeks ago.

I did click the refresh button...a bunch of times with no change.  The only to get it to recognize the file as changed is to right click and swap. Im going to dig through it some more before I bother you again.

Thanks again. :)

Link to comment
Share on other sites

I did click the refresh button...a bunch of times with no change.  The only to get it to recognize the file as changed is to right click and swap. Im going to dig through it some more before I bother you again.

That should not be possible at all... clearly it considers it a new image, meaning the name of the image must be different, It cant change an image to the same image. Check to make sure your image program is not somehow slightly changing the name,

Link to comment
Share on other sites

As Mike mentioned, there are actions to override the animation in the C2 plugin.  They're under the Override Animation section in the Add Action dialog, They're pretty straightforward.  
The Override Object Animation action is the more simple of the two.  

 In your case you most likely want to change the angle of the forearm bone, or if you're not using bones, the forearm sprite.

You specify the object name from Spriter for the bone or sprite you want to change.

Specify the component (x,y,angle,x scale, etc) you want to override.  In this case, angle.

Then you set a new value, like 45, if you want it at a 45 degree angle.  You would have to figure out whatever math you wanted to use to decide what angle for any given moment.

The Override Bones With IK action does IK that is the equivalent of holding shift while changing the angle of a child bone in Spriter.
For the action, you specify the name of the child and parent bone you want to apply the IK to.  Then you give a target - where the IK joint should reach to.  In Spriter this is where your mouse pointer is when doing this type of IK.  Again, you'd have to figure out the math you wanted to use to decide where the IK target would be for any part of the recoil.

You probably won't need the last parameter,Additional child bone length, for your purposes.   This is if you want to extend (or negative to reduce) the length of the child bone.  This is useful in cases where the tip of the bone in Spriter isn't exactly the point that should be reaching for the target.


Let me know if you have any questions.

Link to comment
Share on other sites

Mike -

Apologies, the sprites were being updated. I was confusing big head with smaller head and put the new files in the wrong directory. Though in my defense, the small head is still fairly large. :) Spriter is great and the more I dig into it the more i like it. Thanks.

Lucid-

Ive tried your advice and was able to change the angle of the bone using the Override Object Animation action. My problem now is that once I override the angle the bone stays at that angle until I change it again...but it never goes back to what ever angle(s) it needs to be for each animation. For example; aim and shoot animation has the front_hand bone at ~0 degrees. If I override it -15 degrees and back again to 0 degrees (to simulate recoil) the bone stays at 0 degress for every animation afterward. I dont see an action that allows the animation to "revert" back to what they were before the override. If there is a way to revert, it would work perfectly. Ill keep at it. Thanks again for the advice.


 

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...