Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Getspritephysicson()

Author
Message
Captain Ouais
21
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 9th Mar 2020 17:53
Hello !

There is no command to know if a sprite is physic or not !

If we apply a pulse by mistake, it crashes: p

Would it be possible to have this kind of instruction ?

Thanck
I do what i do !!!
blink0k
Moderator
12
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Mar 2020 21:32
You could SetErrMode(0) then execute GetSpritePhysicsVelocityX() then GetErrorOccured() to determine if an error occurred and if the sprite has physics or not.
I guess you could combine them in a function called GetSpritePhysicsOn(), just make sure you reset SetErrorMode() to it's original value when you're finished.
Captain Ouais
21
Years of Service
User Offline
Joined: 12th Dec 2003
Location: France
Posted: 11th Mar 2020 16:41
Thank you, it's a good idea!
a dedicated instruction will still be more practical: p
I do what i do !!!

Login to post a reply

Server time is: 2025-06-25 20:41:54
Your offset time is: 2025-06-25 20:41:54