Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Possible to set an radius to an object?
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Possible to set an radius to an object?

Now that you can use GetEntityPos and GetPlayerPos it should be relatively simple to make. You can use a timer loop to update the checker. It probably won't need a higher frequency than 1 second update time.

I haven't thought out exactly how this would work, but if you experiment with those functions you might figure something out. Basically, create a variable for the position of the player and the position of the entity (enemy). Do some calculations to determine the difference in those two. If that difference exceeds what radius you need, run your things.

02-27-2015, 11:40 PM
Find


Messages In This Thread
RE: Possible to set an radius to an object? - by Mudbill - 02-27-2015, 11:40 PM



Users browsing this thread: 5 Guest(s)