Would Streamer dynamic areas do it?
#1

Hello, hope you all doing great,
so I want to make a fast looting system, by fast I mean, to get the system working on as less lag as possible, optimization is important of course, well, then what would be the great way to check if a player near a certain item?

Method 1

Loop through all items and use IsPlayerInRangeOfPoint at each instance to check if the player's near the item or not

Method 2

Create tiny dynamic areas with streamer at each item's location, and check if a player near the item if they triggered the dynamic area assigned to that item

What could work better you guys?!
Thanks in advance
Reply
#2

There's also a limit of how many maximum areas there can be, also you can use iterator for that speed.
Reply
#3

Quote:
Originally Posted by Logic_
Посмотреть сообщение
There's also a limit of how many maximum areas there can be, also you can use iterator for that speed.
And what's that limit?

OT: Method 2
Reply
#4

Method 3:
Create dynamic area
Set dynamic area EXTRA_ID (extraid = itemid + extraid_offset)

Next use loop for
GetPlayerDynamicAreas
GetPlayerNumberDynamicAreas

Get itemid from area extra id (itemid = extraid - extraid_offset)

The fastest method that exists.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)