Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: Rotating a bone with mouse [Re: Dico] #455321
10/16/15 20:25
10/16/15 20:25
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
The bone has to be reseted before animation.

Re: Rotating a bone with mouse [Re: txesmi] #455325
10/16/15 21:37
10/16/15 21:37
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
So, I went ahead and tried this:

Code:
...

#define BEND_WAIST    skill17

...

action player_code()
{
   ...

   ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
                             //    given to the "waist" bone in MED.
   my.BEND_WAIST += 5 * mouse_force.y;

   ...

   while(1)
   {
      ...

      ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));

      ...

      wait(1)
   }
}



Still nothing is happening when I move my mouse up and down.

I do notice that after I place the two bones in the player model and save it, all animations are not working at all. For example, when the player moves forward, the player is not moving its body like it is walking. It is just a stiff standing body moving forward with no animation. Same thing if I click my left mouse button which normally showed an attack animation. It is not there anymore.

I wonder if this has something to do with my the player model is not bending forward or backward at the waist when moving the mouse up or down?

Last edited by Ruben; 10/16/15 21:39.
Re: Rotating a bone with mouse [Re: Ruben] #455326
10/16/15 21:44
10/16/15 21:44
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
add this in loop
my.BEND_WAIST += 5 * mouse_force.y;

Re: Rotating a bone with mouse [Re: Dico] #455327
10/16/15 21:47
10/16/15 21:47
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
when the model just animated with vertex and you add a bone , the vertex animation will removed and the new animation with bone will work . so you need to totaly animate your player with bone then the animation will work

Re: Rotating a bone with mouse [Re: Dico] #455328
10/16/15 22:11
10/16/15 22:11
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Originally Posted By: Dico
add this in loop
my.BEND_WAIST += 5 * mouse_force.y;

Did it:

Code:
...

#define BEND_WAIST    skill17

...

action player_code()
{
   ...

   ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
                             //    given to the "waist" bone in MED.

   ...

   while(1)
   {
      ...

      my.BEND_WAIST += 5 * mouse_force.y;
      ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));

      ...

      wait(1)
   }
}



...still nothing.

Re: Rotating a bone with mouse [Re: Ruben] #455329
10/16/15 22:44
10/16/15 22:44
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
can you zip your work and send it to me

Re: Rotating a bone with mouse [Re: Ruben] #455330
10/16/15 22:45
10/16/15 22:45

M
Malice
Unregistered
Malice
Unregistered
M



Lets do some debugging

We are going to check if the bone functions are failing
Code:
...

#define BEND_WAIST    skill17

...

action player_code()
{
   ...
var this=0;
var that =0 ; 
var more =0; 

  this= ent_bonereset(my,"Bone"); // It appears that "Bone" is the default name
                             //    given to the "waist" bone in MED.

   ...

   while(1)
   {
      ...

      my.BEND_WAIST += 5 * mouse_force.y;
      that=ent_bonerotate(me, "Bone", vector(0,my.BEND_WAIST,0));

      ...
      DEBUG_VAR(this,50);
      DEBUG_VAR(that,100);

      wait(1)
   }
}



You should see 2 red numbers on scene, YOU SHOULD NOT see 0(zero's)
If you see 0(zero's) than THIS or THAT is failing

Last edited by Malice; 10/16/15 22:47.
Re: Rotating a bone with mouse [Re: ] #455331
10/16/15 23:29
10/16/15 23:29
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
@ Malice: Wow, that is amazing! I see two red "1" values on the screen. I guess that means that the ent_bonereset() and ent_bonerotate() functions are not failing, correct?

Strange that I cannot find the "DEBUG_VAR()" function in the SED help index.

Re: Rotating a bone with mouse [Re: Ruben] #455332
10/17/15 00:18
10/17/15 00:18

M
Malice
Unregistered
Malice
Unregistered
M



Yes they are NOT failing.. Odd!

http://www.conitec.net/beta/macros.htm

please look in the manual under the 'Percompiler' section for the link to "macro's" --

EDIT - perhaps the problem is the vector (x,my.BEND_WAIST,z);
maybe move the my.BEND--- to the x place.

Last edited by Malice; 10/17/15 00:21.
Re: Rotating a bone with mouse [Re: ] #455333
10/17/15 00:27
10/17/15 00:27

M
Malice
Unregistered
Malice
Unregistered
M



One idea - are any vertics actual attached to the bone? You can place a bone without binding it in med. You may have done so.

another test -
ent_bonerotate(my,"bone",vector(0,5*time_step,0));

You should see movement!

Page 2 of 4 1 2 3 4

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1