The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
[SOLVED] How to get distance to enemy?
Mafiyia Offline
Junior Member

Posts: 7
Threads: 4
Joined: Jan 2017
Reputation: 0
#1
[SOLVED] How to get distance to enemy?

I'm creating an add-on mod where I would like to get the distance to an enemy. After researching the documentation I have been trying to use the Player_GetDistanceToEntity(const tString &in asEntity) function where asEntity is the entity's name. But I'm having a hard time figuring out what I should use as the entity's name.

For example in Chapter 1 in Upsilon Awake there is an enemy according to the Wiki called 'Construct'. I've used Construct, construct, construct_theta, infected_robot, etc. as input into the function but I always get a entity does not exist in my debug messages.

I even tried loading up the map in the Level Editor to see if I could find it, but the map is so cluttered that it made this task pretty much impossible.

So does anyone know where I could find what the asEntity names should be or any better methods to find the distance to enemy?
(This post was last modified: 01-30-2017, 10:31 PM by Mafiyia.)
01-27-2017, 07:53 PM
Find


Messages In This Thread
[SOLVED] How to get distance to enemy? - by Mafiyia - 01-27-2017, 07:53 PM
RE: How to get distance to enemy? - by Romulator - 01-27-2017, 09:47 PM
RE: How to get distance to enemy? - by Abion47 - 01-27-2017, 11:59 PM



Users browsing this thread: 1 Guest(s)