by Arctangent » Sun Mar 24, 2019 1:06 am
Cherno wrote:Quite possible via zScript. Call A_Wander, and in Tick(), get the nearest corpse and if it's within a certain distance (radius, for example), resurrect.
Using Tick() is not only completely unlike how the Archvile's resurrection works, but it also means the actor would interrupt its other states to raise a monster - including its own Death state - if proper checks aren't put into place.
It would make far more sense to write up, say, a A_VileWander for the actor, which does the corpse detection, then calls A_Wander if it doesn't find anything.
[quote="Cherno"]Quite possible via zScript. Call A_Wander, and in Tick(), get the nearest corpse and if it's within a certain distance (radius, for example), resurrect.[/quote]
Using Tick() is not only completely unlike how the Archvile's resurrection works, but it also means the actor would interrupt its other states to raise a monster - including its own Death state - if proper checks aren't put into place.
It would make far more sense to write up, say, a A_VileWander for the actor, which does the corpse detection, then calls A_Wander if it doesn't find anything.