Browsing PAC3's section
← Back to ACE
🔁

Mirrored article

This page is synced automatically from wiki.pac3.info (last synced 7 hours ago). Edits made here will be overwritten on the next sync — contribute on the source wiki instead.

Ranger

Ranger

📁 EventUpdated 1 day ago•3 views
event , ranger Ranger Triggers based on distance. Ranger casts a ray starting at the location of the parent model, in the direction of the red positional arrow. Distance is the max length of the ray.

event ,
ranger

Ranger

Triggers based on distance. Ranger casts a ray starting at the location of the parent model, in the direction of the red positional arrow. Distance is the max length of the ray. Compare is the distance you want to compare to using an operator . The event shows a distance preview while editing.

Operator

above

Ranger set to above will hide attached parts when the distance to an object is higher than compare .

below

Ranger set to below will hide attached parts when the distance to an object is lower than compare .

This behavior can be inverted by using invert .

Arguments

name type description

distance

number The max length of the ray. Needs to be higher than compare . The actual value only matters when using npcs_and_players_only (BUG?).

npcs_and_players_only

boolean Ignores world collision. Only triggers when a player or an NPC is detected.

compare

number The number that you want to compare the distance to.

Usage & Examples

Basic usage

- Add a dummy model to your outfit and attach the ranger event to it.

- Use the dummy to set a direction of the ranger. (Red arrow means forward )

- Enable affect children only and attach other parts to the event.

Simple ranger

Set distance to 200, compare to 100, operator to above, the event will trigger when an object appears closer than 100 units away from you.

Download: event_ranger.txt

Similar Events

- Collide

- Is Touching

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.