Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,119 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
tell if physics is enabled on an ent #304202
01/05/10 18:15
01/05/10 18:15
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
just seeking a quick answer, you guys have any idea on how to check if physics is enabled on a certain entity?

Re: tell if physics is enabled on an ent [Re: darkinferno] #304203
01/05/10 18:24
01/05/10 18:24
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
idk if there is a function or property to check this but you could set a skill of every physical entity to 1 when you enable physics on them.

Last edited by Quadraxas; 01/05/10 18:25.

3333333333
Re: tell if physics is enabled on an ent [Re: Quad] #304206
01/05/10 18:46
01/05/10 18:46
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
yes i figured and thats what i currently do, just wondering if theres another way

Re: tell if physics is enabled on an ent [Re: darkinferno] #304216
01/05/10 20:50
01/05/10 20:50
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Maybe you could use "phent_getvelocity" ?
This function returns a 1 or a 0 on sucess or fail, and the only reason
I can think of for a fail is a NON-physics object.

So, in theory, you could use
if(phent_getvelocity(my_entity, vector(0,0,0), nullvector)) { ... IS physics entity ... }
to test if it is a physics-enabled entity.

(BTW, the "vector(0,0,0)" just dumps the returned velocity into limbo if the function succeeds)


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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