0000544: [ZScript/ACS] SetTIDByRaytrace

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: 0000544: [ZScript/ACS] SetTIDByRaytrace

0000544: [ZScript/ACS] SetTIDByRaytrace

by dawnbreez » Sun Apr 30, 2017 5:32 pm

https://mantis.zdoom.org/view.php?id=544

Code: Select all

Summary	0000544: [ZScript/ACS] SetTIDByRaytrace
Description	There appears to be no way to get a nearby actor to perform actions on. This seems a little bit unnecessary at first glance--A_QuakeEx handles radius damage, you can use the custom attack functions for pushing and hurting--but there's a few more complex things that would be easier if you could raytrace to find actors. For instance, one could cause a group of nearby monsters to attack a hologram of the player instead of the player himself, without having to write DECORATE definitions for the monsters, by repeatedly firing rays at multiple angles, getting a TID for a monster hit by this ray, and using that as a reference to call A_SetPointer.
Alternatively, alternate versions of A_SetPointer and other such functions could be useful--for instance, A_SetPointerRadius, similar to A_RadiusGive. However, a solution that can be swapped in easily would be best, and setting a TID with a ray makes it possible to swap that TID in for all kinds of functions.

Top