scope
A component that allows players to use the item to zoom out. Mainly intended for firearms, but now works with other items too.
Vars | |
item_action_type | if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD. |
---|---|
range_modifier | How far we can extend, with modifier of 1, up to our vision edge, higher numbers multiply. |
tracker | Fullscreen object we use for tracking. |
tracker_owner_ckey | The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted). |
zoom_method | The method which we zoom in and out |
Procs | |
get_target | We find and return the best target to hit on a given turf. |
on_enter_new_loc | Stop scoping if the newloc we move to is not a turf |
stop_zooming | We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker. |
zoom | We start zooming by adding our tracker overlay and starting our processing. |
Var Details
item_action_type
if not null, an item action will be added. Redundant if the mode is ZOOM_METHOD_RIGHT_CLICK or ZOOM_METHOD_WIELD.
range_modifier
How far we can extend, with modifier of 1, up to our vision edge, higher numbers multiply.
tracker
Fullscreen object we use for tracking.
tracker_owner_ckey
The owner of the tracker's ckey. For comparing with the current owner mob, in case the client has left it (e.g. ghosted).
zoom_method
The method which we zoom in and out
Proc Details
get_target
We find and return the best target to hit on a given turf.
Arguments:
- target_turf: The turf we are looking for targets on.
on_enter_new_loc
Stop scoping if the newloc
we move to is not a turf
stop_zooming
We stop zooming, canceling processing, resetting stuff back to normal and deleting our tracker.
Arguments:
- user: The mob we are canceling zooming on.
zoom
We start zooming by adding our tracker overlay and starting our processing.
Arguments:
- user: The mob we are starting zooming on.