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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 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
PhysX, setting flags #385718
10/22/11 15:51
10/22/11 15:51
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
For my player_movement, I use multiply flags.

Quote:
pXent_setbodyflag(me, NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT, 1);


and

Quote:
pXent_setbodyflag (my, NX_BF_DISABLE_GRAVITY | NX_BF_FROZEN_ROT,1);


If the players movement_state is 0, the player should not be able to tilt or roll.

If the players my.movement_state is 1, the player should not be able to tilt, roll, pan or to use gravity.

movement_state 0:
Quote:
if (my.movement_state == 0)
{
pXent_setbodyflag(my, NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT, 1);
}


movement_state 1:
Quote:
if (my.movement_state == 1)
{
pXent_setbodyflag (my, NX_BF_DISABLE_GRAVITY | NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT | NX_BF_FROZEN_ROT,1);
}


The problem is, when I switch the movement_states the pXent_setbodyflags only add etch other.
Which means, when the player at the beginning the movement_state 0 has, but switches to movement state 1, will the player lose the ability to rot or have gravity, which the player should have in movement state 0!

Any ideas how I can set the flags right, so that the flags from the flags from movement_state 1 doesn't count for movement_state 0 and the same in reverse?

Last edited by Random; 10/22/11 15:58.


Re: PhysX, setting flags [Re: Random] #385719
10/22/11 16:00
10/22/11 16:00
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
I found out grin

Quote:
if (my.movement_state == 1)
{
pXent_setbodyflag (my, NX_BF_DISABLE_GRAVITY | NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT | NX_BF_FROZEN_ROT,1);
}


Quote:
if (my.movement_state == 0)
{
pXent_setbodyflag (my, NX_BF_DISABLE_GRAVITY | NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT | NX_BF_FROZEN_ROT,0);

pXent_setbodyflag(me, NX_BF_FROZEN_ROLL | NX_BF_FROZEN_TILT, 1);
}


You can reset the flags by setting 0 instead of 1 at the end of the function cool



Re: PhysX, setting flags [Re: Random] #386056
10/27/11 16:38
10/27/11 16:38
Joined: Oct 2011
Posts: 5
Fortaleza - CearĂ¡ Brazil
E
Estevoo Offline
Newbie
Estevoo  Offline
Newbie
E

Joined: Oct 2011
Posts: 5
Fortaleza - CearĂ¡ Brazil
noone help in this goddam* forum!!!

Re: PhysX, setting flags [Re: Estevoo] #386059
10/27/11 16:59
10/27/11 16:59
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: Estevoo
noone help in this goddam* forum!!!


What? He has helped himself.

Re: PhysX, setting flags [Re: Estevoo] #386063
10/27/11 17:49
10/27/11 17:49
Joined: Feb 2010
Posts: 886
Random Offline OP
User
Random  Offline OP
User

Joined: Feb 2010
Posts: 886
Do you what to explain it to you.
I mean that with the flag settings?




Moderated by  HeelX, Spirit 

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