Hi all! I have a function that applies damage to all players within a certain radius.
This works great for players. I grab all players with
var PlayerList : []agent = GetPlayspace().GetPlayers()
iterate over each ones position, and compare that to the distance of the damage radius. I noticed that creature_spawner_devices
have two events that I can subscribe to, SpawnedEvent
and EliminatedEvent
each providing the creature that was spawned/eliminated
Within my damage function, I modified the array such that
set PlayerList += SpawnedCreatures
From there, I’m calling the following.
for (TargetPlayer : PlayerList):
if (TargetCharacter := TargetPlayer.GetFortCharacter[]):
I noticed that the .GetFortCharacter method fails – this makes sense to me, but, if that’s the case, how else can I damage agents via Verse? agent
doesn’t implement the damageable interface, which means I can’t call Damage
.
Any ideas? I’m trying to avoid using damage volume devices, as I can’t dynamically spawn those, and my experience uses a lot of dynamically spawned damage volumes.