bone behavior

For questions about using Classic.

Post » Tue Jun 12, 2012 7:25 pm

Hi,

I've set up a player with a few bones. Arms and head moves with the mouse(angle). He got a weapon that is also a bone. If I want to attach something to anything that belongs to the bone behavior(set position to "sprite") and I move via platform behavior too fast, it lags. If you jump, the bullets lags a few pixels above or underneath, depends if you jumping or falling.

Here is an example: https://dl.dropbox.com/u/26932498/bone_behavior_lag.cap

The torso is attached to the hitbox, the arm is attached to the torso. The weapon is attached to the arm. I can fix the lag, creating the bullets on an imagepoint from the hitbox, but in my engine, the arm is moving with the mouse and have lots of functions how to behave etc(the cap here is just a fast demo I created to made my point clear)..., so the imagepoint of the weapon is needed, because the weapon is moving with the mouse.

Is there any way to fix that lag between the weapon and the spawned bullets if you move to fast or jump?zyblade2012-06-12 19:26:55
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Tue Jun 12, 2012 7:34 pm

I just found out...that I have to put the platform behavior first and then add the bone behavior.

The question now is, how to switch re order of these, without(!!!!) deleting the bonebehavior with its all finished animations :C?

edit: found some interessting thread here

It's from 2009, is it hard to implement some function to rearrange the behaviors? I really spend hours to make the animations with the bone behavior :/zyblade2012-06-12 19:40:18
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Wed Jun 13, 2012 2:25 pm

You could try having an invisible "hitbox" for the player, and give that the platform behavior while positioning the bone object to it.

Objects don't add too much processing usage to a game when they aren't rendered, most games are bottleneck'd by graphical stuff.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Wed Jun 13, 2012 2:42 pm

Just in that moment you've posted, I found out, that the action "force bone repositioning" exact does remove that lag. But insteat of puttnig it at the end of the event sheet, like the wiki says, it only works, if I put it previous to the other bone events. But thanks for the hint!
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Wed Jun 13, 2012 2:44 pm

The only thing I'm now wondering is, how to fix it, that, when the bone behavior self moves the gun a few pix up or down for more realistic movement and aiming while the mouse changes his angle, the imagepoint won't change :/ And the bullets will come out below or above the gun in special angles.

edit: reuploaded the .cap with a the new issue^^. I ripped his head off, so you can see better what I mean.

Toggle the event with sprite 6 on/off to see it will happen or not.

edit2: wth "bottleneck'd" means xD, glitched up?zyblade2012-06-13 14:51:31
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Wed Jun 13, 2012 5:42 pm

The solution again is the "force bone repositioning"!!!

I'll added this one just above the bullet creation action in the same event where the bullets spawning^^

Yeeeeeah, finally !

If someone has similar problems, I added the solution also in the first post in my demo. works fine now.zyblade2012-06-13 17:42:52
B
24
S
9
G
2
Posts: 294
Reputation: 3,160


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests