Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 877 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
function ragdoll help!! #265268
05/11/09 16:06
05/11/09 16:06
Joined: Jul 2008
Posts: 191
M
MDMDFSS Offline OP
Member
MDMDFSS  Offline OP
Member
M

Joined: Jul 2008
Posts: 191
Im trying to make a deathfunction (Wenn the actor/player dies he turns into a regdoll) but I don`t know how.
I begone like this: (sorry for my bad englisch)

_______________________________________________________________

void setLimit

STRING* head_mdl = "head.mdl"; // head
STRING* torso_mdl = "torso.mdl"; // upper body
STRING* abs_mdl = "abs.mdl"; // middle body
STRING* pelvis_mdl = "pelvis.mdl"; // lower body
STRING* leftarmup_mdl = "arm_up_left.mdl"; // left arm
STRING* leftarmdown_mdl = "arm_down_left.mdl";
STRING* rightarmup_mdl = "arm_up_right.mdl"; // right arm
STRING* rightarmdown_mdl = "arm_down_right.mdl";
STRING* leftlegup_mdl = "leg_up_left.mdl"; // left leg
STRING* leftlegdown_mdl = "leg_down_left.mdl";
STRING* rightlegup_mdl = "leg_up_right.mdl"; // right leg
STRING* rightlegdown_mdl = "leg_down_right.mdl";

function ragdoll1
{
???
_______________________________________________________________

How can I put everything together?

Can somebody please help me?


Last edited by MDMDFSS; 05/11/09 16:07.
Re: function ragdoll help!! [Re: MDMDFSS] #265293
05/11/09 18:47
05/11/09 18:47
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
I have finished my system today(needs some tweaking).
Its hard to explain, but i can give you some hints:
For every bone you want to be a part of the ragdoll model, you have to create a model(with similar sizes of the region its atached to). This model is a physik objekt an joined to other
Physikmodel bones, in the same order, the bones are connected on your model.

Then you have to update the rotation of a bone by reading the angle of the given constraint.

Oh i see i am going to confuse everyone with my way of explanation.

Play around with joints of physik models. Its the main part wink

GREETS
RACKSCHA


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: function ragdoll help!! [Re: Rackscha] #265477
05/12/09 17:08
05/12/09 17:08
Joined: Jul 2008
Posts: 191
M
MDMDFSS Offline OP
Member
MDMDFSS  Offline OP
Member
M

Joined: Jul 2008
Posts: 191
So I must connect everithing.

Ok I try action head (the head first)

function ragdoll
{

you = ent_create(temp_string,my.x,attach_shadow)
//the pysics
phent_settype(my,PH_RIGID,PH_BOX);
phent_setgroup(my,1);
phent_setmass(my,0.5,PH_BOX);
phent_setfriction(my,88);
phent_setelasticity(my,25,10);
phent_setdamping(my,25,25);

//how can I creat the head and set the head in the right place?
//With this?:
(1,0,0),nullvector,nullvector);



Last edited by MDMDFSS; 05/12/09 17:12.
Re: function ragdoll help!! [Re: MDMDFSS] #265488
05/12/09 18:08
05/12/09 18:08
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
At first, you have to use the you pointer when calling the phent_ functions not the my pointer.
Ok how do you want to create it? One normal model, with invisible physik bones atached to it, or just a stickman like charaktere where you see every part?


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: function ragdoll help!! [Re: Rackscha] #265490
05/12/09 18:19
05/12/09 18:19
Joined: Jul 2008
Posts: 191
M
MDMDFSS Offline OP
Member
MDMDFSS  Offline OP
Member
M

Joined: Jul 2008
Posts: 191
A normal model with invisible physik bones.

Re: function ragdoll help!! [Re: MDMDFSS] #265505
05/12/09 19:55
05/12/09 19:55
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Ok, now you have bones added to your model in med right?
Ok, use vec_for_bone to get a position of a bone and add the physik bones to it. The difficult part(which doesnt work 100% in my code) is to update the rotation of the angles in the right way. you'll have to figure it out wink


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: function ragdoll help!! [Re: Rackscha] #265642
05/13/09 13:43
05/13/09 13:43
Joined: Jul 2008
Posts: 191
M
MDMDFSS Offline OP
Member
MDMDFSS  Offline OP
Member
M

Joined: Jul 2008
Posts: 191
Yes my model has bones. (now...)

//more ditail

void setLimit(VECTOR* vec1, VECTOR* vec2);

//a new vector

VECTOR temp_head;

//a define for bodyparts

#define bodyPart skill1

STRING* head_mdl = "head.mdl"; // head
STRING* torso_mdl = "torso.mdl"; // upper body
STRING* abs_mdl = "abs.mdl"; // middle body
STRING* pelvis_mdl = "pelvis.mdl"; // lower body
STRING* leftarmup_mdl = "arm_up_left.mdl"; // left arm
STRING* leftarmdown_mdl = "arm_down_left.mdl";
STRING* rightarmup_mdl = "arm_up_right.mdl"; // right arm
STRING* rightarmdown_mdl = "arm_down_right.mdl";
STRING* leftlegup_mdl = "leg_up_left.mdl"; // left leg
STRING* leftlegdown_mdl = "leg_down_left.mdl";
STRING* rightlegup_mdl = "leg_up_right.mdl"; // right leg
STRING* rightlegdown_mdl = "leg_down_right.mdl";

function ragdoll1
{
//So the vec_for_bone...:

//first the head
vec_for_vertex(temp, temp_head, 23);
temp_head = ent_create(head_mdl, temp, 0);
//I think that cold work as limit
setLimit(vector(0,1,0), vector(-40,40,0));
BodyPartInit(25, temp_head);
________________________________________________________________________________

Cold that work?

Last edited by MDMDFSS; 05/13/09 19:41.
Re: function ragdoll help!! [Re: MDMDFSS] #265681
05/13/09 16:36
05/13/09 16:36
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
It seems you are using a Ragdoll template(maybe the one from helghats? hope i wrote your name right wink )


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: function ragdoll help!! [Re: Rackscha] #265717
05/13/09 19:43
05/13/09 19:43
Joined: Jul 2008
Posts: 191
M
MDMDFSS Offline OP
Member
MDMDFSS  Offline OP
Member
M

Joined: Jul 2008
Posts: 191
No im using the cranesimulation (1prise last year).
Then the crane is somthing like a ragdoll...

But is that code right or not? (rightnow i meen)

Last edited by MDMDFSS; 05/13/09 19:43.
Re: function ragdoll help!! [Re: MDMDFSS] #265743
05/13/09 21:42
05/13/09 21:42
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
I dont know what the last line EXACTLY does. But as far as i can see its ok.


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | 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