Opened 9 years ago

Closed 7 years ago

#72 closed enhancement (invalid)

Make an Hook at Position

Reported by: behemoth Owned by: Alloc
Priority: major Component: Scripts
Keywords: Cc:

Description

How can i make a Hook for a Player-Position <x> <y> <z> <radius>?
I get only the Position over the WebApi, but it is to slow and overflow. I need a permanent call for the player position for make an Event.
Please help with an Extension like this:
public bool inPosition (position, radius) {

int minPosition = (int)position - (int)radius;
int maxPosition = (int)position + (int)radius;
return position>=minPosition && position<=maxPosition;

}

to call:
if(inPosition (lastPos.x, config.radius) && inPosition (lastPos.y, config.radius) && inPosition (lastPos.z, config.radius)) {

...

}

Change History (2)

comment:1 Changed 9 years ago by Alloc

Hi there,
I'm not really sure what you want after all as you seem to mix C# and the term hook which in this environment (especially as you flagged this ticket as regarding the scripts) is for events based on the log output.

So if you want a script-hook that's a simple no: The log neither contains such info, nor would it make sense to add that info to the log: It would require writing each players position to the log all the time (aka flooding the log).

If it's about a change to the server mod: One could add player position checks but after all they would have to be called in an interval small enough to actually "catch" the player while being in that coordinate range. Depending on the requirements this could be quite stressing on the engine.

Maybe I didn't grasp what you want to achieve after all so maybe you could get more detailed here.

Regards,
Chris

comment:2 Changed 7 years ago by Alloc

  • Resolution set to invalid
  • Status changed from new to closed

Closing as per missing feedback. Also think this has been integrated in some of the server managers out there already, which is a better place for such specific features anyway imo.

Note: See TracTickets for help on using tickets.