Weeping Angels
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- UltimateLorenzo
- Posts: 80
- Joined: Fri Dec 12, 2008 11:53 am
Weeping Angels
I have this idea, which I think could be a nice idea for a doom monster. Unluckly, I don't have enough knwoledge of decorate to realise it.
The idea is to create a monster like the weeping angels, the enemies in Dr Who who can move only if you don't watch them.
I don't know if this is realizable in zdoom. I suppose there is a function that verify what the player is watching in every moment, as in the automap you only have the areas you actually watched.
Is there a way to pass this information (area watched) to a decorate script so that an enemy becomes frozen?
Lorenzo
The idea is to create a monster like the weeping angels, the enemies in Dr Who who can move only if you don't watch them.
I don't know if this is realizable in zdoom. I suppose there is a function that verify what the player is watching in every moment, as in the automap you only have the areas you actually watched.
Is there a way to pass this information (area watched) to a decorate script so that an enemy becomes frozen?
Lorenzo
Re: Weeping Angels
This could be of use to someone willing to implement that.
http://zdoom.org/wiki/A_JumpIfInTargetLOS
http://zdoom.org/wiki/A_JumpIfInTargetLOS
- UltimateLorenzo
- Posts: 80
- Joined: Fri Dec 12, 2008 11:53 am
Re: Weeping Angels
I'm not so sure: this can help in determining if the monster is watching you or not. It is not the same thing as if you are watching the monster.Jimmy wrote:This could be of use to someone willing to implement that.
http://zdoom.org/wiki/A_JumpIfInTargetLOS
For example, if you have a monster behind you, he can see and attach you, but if you turn toward him, he should stop.
Lorenzo
Re: Weeping Angels
That's... pretty much what that function can be used for. Make sure you don't confuse it with [wiki]A_JumpIfTargetInLOS[/wiki].
Re: Weeping Angels
If someone makes blink.wad, they'll be my hero forever.
Re: Weeping Angels
I'd love to see the Weeping Angels. The A_JumpIfInTargetLOS is actually exactly what you'd need for it.
- UltimateLorenzo
- Posts: 80
- Joined: Fri Dec 12, 2008 11:53 am
Re: Weeping Angels
I hope you can give me some help as I don't know very well decorate...
So:
A_JumpIfInTargetLOS (str "state"[, float fov[, int flags[, float dist_max[, float dist_close]]]])
"state" is referred to a "state" of the monster, that is I should refer to the lines in the decorate that say "frozen" ???
fov, field of view, should be ... well if 0 is all around, I should put 0, right??? But overall, my fov or the monster fov?
flags: I have no idea how to use it...
dist_max and dist_close should be 0, right???
How can I be sure that it will freeze only when in my line of sight, and not in the LOS of some other enemy?
The original weeping angels can freeze each other, but i don't want this to happen to my monsters...
Lorenzo
So:
A_JumpIfInTargetLOS (str "state"[, float fov[, int flags[, float dist_max[, float dist_close]]]])
"state" is referred to a "state" of the monster, that is I should refer to the lines in the decorate that say "frozen" ???
fov, field of view, should be ... well if 0 is all around, I should put 0, right??? But overall, my fov or the monster fov?
flags: I have no idea how to use it...
dist_max and dist_close should be 0, right???
How can I be sure that it will freeze only when in my line of sight, and not in the LOS of some other enemy?
The original weeping angels can freeze each other, but i don't want this to happen to my monsters...
Lorenzo
Re: Weeping Angels
I wonder, if the monster is BEHIND you but you can actually see it from a mirror linedef in front of you... would it still move? :O
(That would be downright creepy XD)
(That would be downright creepy XD)
Re: Weeping Angels
Hmmm... would they be invulnerable when stationary (that seems appropriate when compared to the original story)? If so you'd have to find ways of killing them when you couldn't see them (I'm guessing splash damage round a corner would work) or simply run away (or keep looking at them).
Re: Weeping Angels
Also don't forget that if they gaze into each other, they turn into stone forever. ;)
Re: Weeping Angels
The Angel in the mirror wouldn't move, but the one behind you would. Anything which holds the image of an Angel is, itself, an Angel.Nash wrote:I wonder, if the monster is BEHIND you but you can actually see it from a mirror linedef in front of you... would it still move? :O
Would it be possible to replicate in Doom, though? That's the question.

Re: Weeping Angels
I suspect that the required AI simply isn't there to make a fully accurate weeping angel. However, something with a suitable feel might be possible.
Re: Weeping Angels
For A_JumpIfInTargetLOS to work properly, the creature must have a target, and that target will be the only creature that can prevent the Weeping Angel from moving (by looking at it). When the weeping angel is friendly, or engaged in infighting, its behaviour might not have the right feel at all, but used in the right places it could still work well.
About A_JumpIfInTargetLOS, I have encountered a few oddities when working with the source code. It does not appear to be a reliable "inverse" of A_JumpIfTargetInLOS:
First, not so relevant to the suggested use:
1. It will not get a player's target (whatever the player is looking at) when called from a player. (A_JumpIfTargetInLOS does this.)
1b. It will get anything stored in a player's pointers (mostly null) instead, just like it does for monsters.
(A_JumpIfTargetInLOS has special handling for players, using the aimed target instead of any other actor).
Second, quite relevant:
2. Both my attempts to use A_JumpIfInTargetLOS and my examination of the source code has led me to believe that it tests line-of-sight from target to caller, but still tests the caller's fov instead of the target's fov. Since a line (of sight) moves in both directions, this means that A_JumpIfInTargetLOS hardly adds functionality at all.
(I have submitted code that extends A_JumpIfInTargetLOS to cover both functions with the use of additional flags, which would lead to A_JumpIfInTargetLOS being deprecated.)
About A_JumpIfInTargetLOS, I have encountered a few oddities when working with the source code. It does not appear to be a reliable "inverse" of A_JumpIfTargetInLOS:
First, not so relevant to the suggested use:
1. It will not get a player's target (whatever the player is looking at) when called from a player. (A_JumpIfTargetInLOS does this.)
1b. It will get anything stored in a player's pointers (mostly null) instead, just like it does for monsters.
(A_JumpIfTargetInLOS has special handling for players, using the aimed target instead of any other actor).
Second, quite relevant:
2. Both my attempts to use A_JumpIfInTargetLOS and my examination of the source code has led me to believe that it tests line-of-sight from target to caller, but still tests the caller's fov instead of the target's fov. Since a line (of sight) moves in both directions, this means that A_JumpIfInTargetLOS hardly adds functionality at all.
(I have submitted code that extends A_JumpIfInTargetLOS to cover both functions with the use of additional flags, which would lead to A_JumpIfInTargetLOS being deprecated.)
- UltimateLorenzo
- Posts: 80
- Joined: Fri Dec 12, 2008 11:53 am
Re: Weeping Angels
Well, I thank you all for your feedback, but in truth I don't have understand yet how to implement the A_JumpIfInTargetLOS function (or whatever it is) in an decorate code
However I still hope to realize such a creature.
My idea was that they have only melee attack, and they can run very very fast.
When they become statues they are immortal, and when you don't see them, they return to hunt you.
They should not block each other...
Lorenzo

However I still hope to realize such a creature.
My idea was that they have only melee attack, and they can run very very fast.
When they become statues they are immortal, and when you don't see them, they return to hunt you.
They should not block each other...
Lorenzo
Re: Weeping Angels
I have an idea how code could flow to make this. I could also write sample code, if you want that kind of assistance.
Spoiler: My notionThey can have the ability to pass through eachother from the flag "THRUSPECIES". Check out the [wiki]Species[/wiki]-page for details on determining what creatures are the same species. (All actors of the same class are naturally the same species.)