Function to check player distance?

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Function to check player distance?

Postby Ricochet » Sat Aug 11, 2012 6:55 pm

I want to program my monsters to do different attacks based on how far away the player is. For example, a sniper would use their sniper rifle if the player is far away, but would chase and melee the player if they are closer.
So, is there a function that checks the player's distance from the actor?
User avatar
Ricochet
 
Joined: 06 Aug 2012

Re: Function to check player distance?

Postby chopkinsca » Sat Aug 11, 2012 7:19 pm

Assuming you are using decorate: A_JumpIfCloser
User avatar
chopkinsca
"." is too short
 
Joined: 11 Dec 2003

Re: Function to check player distance?

Postby Ricochet » Sat Aug 11, 2012 7:26 pm

Thanks, that's all I needed :)
User avatar
Ricochet
 
Joined: 06 Aug 2012


Return to Editing

Who is online

Users browsing this forum: Google [Bot] and 6 guests