Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → What If() Statement...
What If() Statement...
2005-06-22, 8:09 AM #1
What If() statement do I need to determine if a player is in the air? (I.E. Fell off a ledge, Jumping)

Thanks!

ReT
2005-06-22, 11:11 AM #2
I think that should cover everything...
if(!((GetAttachFlags(player) & 0x1) || (GetAttachFlags(player) & 0x2)) && !(GetSectorFlags(GetThingSector(player)) & 0x2) )

The stuff highlighted green checks to make sure you're not underwater (judging by the force jump cog, checking the attach flags would work fine except if you're underwater -- you're not attached to anything, but you're also not in the air)

[edit] had one too many parenthases... :o fixed
May the mass times acceleration be with you.
2005-06-23, 10:53 AM #3
Thanks!

↑ Up to the top!