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
Limit on the distance for triggering SetEntityPlayerLookAtCallback
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#1
Limit on the distance for triggering SetEntityPlayerLookAtCallback

I'm playing around with an idea for getting the player's direction, using very large Script Area's (4 for now, North/South/East/West), and using the look-at callback to print a debug message. I seem to be able to activate them through walls so, that's not a problem.

But there seems to be a limit to how far away you need to be. From what I can tell testing in-game & in the level editor its 50m. Does anyone know of any way to change that? The MaxFocusDistance setting for script areas in the level editor doesn't affect it, and I haven't been able to find anything in game.cfg that would be relevant

Here's the code, if that matters...
void NavigationSetup()
    {
        SetEntityPlayerLookAtCallback("SA_Navigate_NOR", "NavigationMessageDisplay", false);
        SetEntityPlayerLookAtCallback("SA_Navigate_SOU", "NavigationMessageDisplay", false);
        SetEntityPlayerLookAtCallback("SA_Navigate_EAS", "NavigationMessageDisplay", false);
        SetEntityPlayerLookAtCallback("SA_Navigate_WES", "NavigationMessageDisplay", false);
    }

void NavigationMessageDisplay(string &in strEntity, int inState)
    {
        if (inState==1) AddDebugMessage(strEntity, false);
    }

03-22-2013, 02:14 AM
Find


Messages In This Thread
Limit on the distance for triggering SetEntityPlayerLookAtCallback - by Adrianis - 03-22-2013, 02:14 AM



Users browsing this thread: 1 Guest(s)