Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 6,361 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İ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 | 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