Are any of these action functions implementable?
Action Functions:
A_Displace(mode,tid): the calling actor moves another actor to it's position. Uses the mode (0 for use tid, 1 for parent, 2 for child) paramenters or the tid of the actor to determine which actor(s) to move. If the calling actor is solid, then the actor being moved will be displace to as close to the calling actor as possible (kinda like how A_SpawnItem will spawn a item close to the calling actor as possible if there isn't enough room so the two dont overlap).
A_SynchMomentum(bool momx, bool momy, bool momz): This action makes an actor spawned copy the specified momentums of the parent. Thus if the parent changes directions, so will the children. The various boolean specicfies which momentum to synch up and which not to.
A_Ressurect: Ressurects the calling actor
A_Explode(radius, damage, hurt shooter, FULLDAMAGE): Just an additional parameter to the A_Explode. If FULLDAMAGE is set to 1, everything in the blast radius takes the full explosion damage regardless of how close or far away the actor is from the calling actor.
Properties
Lifetime (tics): Once a actor is awakened, the actor will have a timer that counts down in tics. When the tics become 0, the actor is killed. (Edge has something like this)
Flags:
+RAISESPECIES: If a monster has A_VileChase and a heal state, it will ressurect monster of it's species only.
+DISLOYAL: Monster with this flag will attack any other actor that isn't part of it's species randomly once awakened.
+CHECKSIGHT: If a monster with this flag on is chasing after a target, and the target goes out of the monster's sight, the monster will stop until the target reappears or it gets a new target.
+IGNOREMASS: Meant for projectiles. A projectile with this flag on that collides with an actor will push that actor back reguardless of it's mass (as if the target has 0 mass).
+CRUSH: Im not sure if this is in yet, but if not then this acts as an instant kill to all non-Boss and actors within the +DONTCRUSH flag on.
Several Action Functions, properties, and flags?
Moderator: GZDoom Developers
Re: Several Action Functions, properties, and flags?
Better call it A_Resurrect.Eriance wrote:A_Ressurect: Ressurects the calling actor

- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
Re: Several Action Functions, properties, and flags?
LifeTime can be done with ReactionTime and A_Countdown. The rest will be WFDS as DECORATE isn't being expanded anymore.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Several Action Functions, properties, and flags?
no.Eriance wrote:Are any of these action functions implementable?
Action Functions:
A_Displace(mode,tid): the calling actor moves another actor to it's position. Uses the mode (0 for use tid, 1 for parent, 2 for child) paramenters or the tid of the actor to determine which actor(s) to move. If the calling actor is solid, then the actor being moved will be displace to as close to the calling actor as possible (kinda like how A_SpawnItem will spawn a item close to the calling actor as possible if there isn't enough room so the two dont overlap).
noA_SynchMomentum(bool momx, bool momy, bool momz): This action makes an actor spawned copy the specified momentums of the parent. Thus if the parent changes directions, so will the children. The various boolean specicfies which momentum to synch up and which not to.
Thing_Raise(0)A_Ressurect: Ressurects the calling actor
maybe.A_Explode(radius, damage, hurt shooter, FULLDAMAGE): Just an additional parameter to the A_Explode. If FULLDAMAGE is set to 1, everything in the blast radius takes the full explosion damage regardless of how close or far away the actor is from the calling actor.
maybeProperties
Lifetime (tics): Once a actor is awakened, the actor will have a timer that counts down in tics. When the tics become 0, the actor is killed. (Edge has something like this)
WFDSFlags:
+RAISESPECIES: If a monster has A_VileChase and a heal state, it will ressurect monster of it's species only.
absolutely not+DISLOYAL: Monster with this flag will attack any other actor that isn't part of it's species randomly once awakened.
WFDS or use A_CheckSight+CHECKSIGHT: If a monster with this flag on is chasing after a target, and the target goes out of the monster's sight, the monster will stop until the target reappears or it gets a new target.
Absolutely not because it's a perfect means to mess things up big time.+IGNOREMASS: Meant for projectiles. A projectile with this flag on that collides with an actor will push that actor back reguardless of it's mass (as if the target has 0 mass).
WFDS+CRUSH: Im not sure if this is in yet, but if not then this acts as an instant kill to all non-Boss and actors within the +DONTCRUSH flag on.
Re: Several Action Functions, properties, and flags?
Graf, I know this has been WFDS'd but I thought I'd just point out that A_CheckSight does not handle any information regarding the caller's current target; all it does is jump if there is LOS between the calling actor and any player. It can't be used for the implementation described.Graf Zahl wrote:WFDS or use A_CheckSight+CHECKSIGHT: If a monster with this flag on is chasing after a target, and the target goes out of the monster's sight, the monster will stop until the target reappears or it gets a new target.
Since this is a common misconception, perhaps a generic A_JumpIfSight action function would be a good idea anyway?

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Several Action Functions, properties, and flags?
I still won't add any more DECORATE features unless I know where ZDoom is going with Doomscript although right now my feeling is that it's going nowhere at all.
Re: Several Action Functions, properties, and flags?
Just to add to this in case anybody is wondering... The reason this has been so harshly rejected is that it would provide the potential for ZDoom to have to iterate through every monster in the level and have that monster look through every other monster in the level to check to see if it's in sight (By performing a CPU intensive LOS check) and not same species.Graf Zahl wrote:absolutely not+DISLOYAL: Monster with this flag will attack any other actor that isn't part of it's species randomly once awakened.
Right now, all the monsters care about are players. That means that there are a maximum of (actors in level) * 8 iterations every tic to check for LOS. The way "DISLOYAL" would work would require (actors in level) * (8 + actors in level - 1) iterations, or roughly the square of the number of actors present. In a decent sized map with 100 monsters, it would require over 10,000 LOS checks per tic. (compared to 800 or less)
Hopefully you understand why this might be a problem.
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
Re: Several Action Functions, properties, and flags?
It's worse than that. The code would need to check if the actor is of the same species as the current one. So, although this will reduced the amount of times the LOS check is iterated, this offset by the fact each time a LOS check is done, a species check is done as well.HotWax wrote:Just to add to this in case anybody is wondering... The reason this has been so harshly rejected is that it would provide the potential for ZDoom to have to iterate through every monster in the level and have that monster look through every other monster in the level to check to see if it's in sight (By performing a CPU intensive LOS check) and not same species.Graf Zahl wrote:absolutely not+DISLOYAL: Monster with this flag will attack any other actor that isn't part of it's species randomly once awakened.
Right now, all the monsters care about are players. That means that there are a maximum of (actors in level) * 8 iterations every tic to check for LOS. The way "DISLOYAL" would work would require (actors in level) * (8 + actors in level - 1) iterations, or roughly the square of the number of actors present. In a decent sized map with 100 monsters, it would require over 10,000 LOS checks per tic. (compared to 800 or less)
Hopefully you understand why this might be a problem.
Re: Several Action Functions, properties, and flags?
A species check consists of "If my->species == his->species, ignore", which would translate in machine code to about 3-4 commands. Modern processors would blast through those checks in a fraction of a second.TheDarkArchon wrote:It's worse than that. The code would need to check if the actor is of the same species as the current one. So, although this will reduced the amount of times the LOS check is iterated, this offset by the fact each time a LOS check is done, a species check is done as well.
On the other hand, a LOS check takes a significant amount of time to perform (significant naturally meaning a slightly longer fraction of a second) and many thousands of them per tic could easily add up to reduced performance even with a good CPU.