User Tools

Site Tools


4rpl:commands:refreshunitloscache

This is an old revision of the document!


Index

RefreshUnitLosCache

RefreshUnitLosCache(<-unit)

Description

Causes the unit to perform line of sight calculations based on the LOS settings. The results are stored and used by APIs like FindEnemy. The LOS cache should be updated when the unit is moved, but not more frequently than necessary.

The range of the unit is also a major factor in the performance intensity of calling this method. It is highly discouraged to use this method for any unit with a range larger than 100. If you however still do, the best way to deal with the performance intensity is to have each unit call RefreshUnitLosCache at a slightly different frame from each other to prevent major stutters.

Examples

RefreshUnitLOSCache(self)

Index

4rpl/commands/refreshunitloscache.1648011106.txt.gz · Last modified: 2025/02/14 14:56 (external edit)