Page MenuHomeFeedback Tracker

[Feature Request] Event handlers for lasers
New, NormalPublic

Description

Currently there are no event handlers for handling laser designator events.

Examples:
An EH that triggers when the laser is activated (using Fired/FiredMan perhaps)
An EH that triggers when the target is being lased (perhaps both for the "firer" and the "target"?)
An EH when laser target is lost

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 created this task.Mar 4 2022, 5:07 PM
Leopard20 updated the task description. (Show Details)
  1. I'd leave Fired and FiredMan untouched for backwards compatibility
  2. getShotParents and objectParent working with lasers could be a good idea if laser entity stores this stuff
  3. I'd make it easy and just do a global MEH, something like LaserCreated and ensured Deleted works with laser entity, so you can track when its deleted
dedmen added a subscriber: dedmen.Tue, Apr 8, 3:49 PM

I'm firin mah lazor!

Entity event for laser-designator (not gun laser) on/off easy, with local effect. (FireLaser)
EH trigger when the lazed target changes, doesn't seem too hard (TrackerLaser).
There is also generally the LaserTarget entity, which is network synced and knows its owner. but objectParent/getShotParents does not support LaserTarget owner. I guess objectParent makes most sense, thats easy to add.

Not sure what you mean with target is lost, when laser aims into air?
Could make the activated be LaserTargetChanged, objNull when off.

Leopard20 added a comment.EditedTue, Apr 8, 4:30 PM

It's been so long that I don't even remember what this was about :)

but by target lost, I think I just meant being deleted (iirc I didn't know at the time that laser target was an object)

Could make the activated be LaserTargetChanged, objNull when off.

Yeah this is fine. Tho when it says "changed" it should pass both current and prev target, no? (I mean the object that's being lased, not the "dot" target)

Maybe target lost is the moment when you lase the sky and laser object stops following your aim but remains in the last place?

NikkoJT added a subscriber: NikkoJT.Wed, Apr 9, 5:47 PM

Maybe target lost is the moment when you lase the sky and laser object stops following your aim but remains in the last place?

Does it still do that after the fix for T71322?

NikkoJT removed a subscriber: NikkoJT.Wed, Apr 9, 5:47 PM