Monster run away from player

Discuss all aspects related to modding Zandronum here.
Post Reply
bleson
 
Posts: 65
Joined: Thu Dec 20, 2012 7:15 am
Location: Australia
Contact:

Monster run away from player

#1

Post by bleson » Wed Jan 09, 2013 11:42 am

I need to make a monster run away [from the player]. The only thing I could find on the internet about this is a ZDoom flag called "FRIGHTENED", which doesn't actually work when tested with Zandronum (or I'm doing it wrong).
Do you know of any alternatives?

EDIT: Yes I've heard of the method of giving it a negative speed and reversing the sprites to create the illusion of running away, but that isn't suitable in my situation I'm afraid. Its facing direction does matter.
Last edited by bleson on Wed Jan 09, 2013 1:03 pm, edited 1 time in total.

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Monster run away from player

#2

Post by Ivan » Wed Jan 09, 2013 1:41 pm

Check if the monster is frightened in it's missile/melee state, then if so, force it to run away. (AFAIK, you gotta define a new state that is different than see state otherwise it has a chance to enter infinite loop, that is, this new state doesn't make the monster go to it's melee/missile states)
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

bleson
 
Posts: 65
Joined: Thu Dec 20, 2012 7:15 am
Location: Australia
Contact:

RE: Monster run away from player

#3

Post by bleson » Wed Jan 09, 2013 3:35 pm

Just to make sure, having the "FRIGHTENED" flag causes Zandronum to crash with an error message suggesting that it's an invalid identifier.

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Monster run away from player

#4

Post by Ivan » Wed Jan 09, 2013 3:52 pm

Really? Damn. You can check how KDIZD did it, they had a terror sphere which had the same effect on monsters. That should give you an idea, as I know it works in Zandronum. (At least 80% sure it works :P)
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Monster run away from player

#5

Post by Ænima » Wed Jan 09, 2013 5:54 pm

Give PowerFrightener
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Monster run away from player

#6

Post by Torr Samaho » Wed Jan 09, 2013 9:05 pm

bleson wrote: Just to make sure, having the "FRIGHTENED" flag causes Zandronum to crash with an error message suggesting that it's an invalid identifier.
FYI, this is not a crash. Zandronum informs you that the supplied DECORATE code is erroneous and exits gracefully.

MAST0D0N
 
Posts: 64
Joined: Wed Jul 18, 2012 12:41 pm
Location: Korea

RE: Monster run away from player

#7

Post by MAST0D0N » Wed Jan 09, 2013 9:10 pm

There is a command to make monsters run away, and the command is "Anubis" :>

User avatar
Combinebobnt
Retired Staff / Community Team Member
Posts: 1905
Joined: Mon Jun 04, 2012 3:37 am
Location: Earth
Contact:

RE: Monster run away from player

#8

Post by Combinebobnt » Wed Jan 09, 2013 9:47 pm

+FRIGHTENED works just fine in my wads for me.

bleson
 
Posts: 65
Joined: Thu Dec 20, 2012 7:15 am
Location: Australia
Contact:

RE: Monster run away from player

#9

Post by bleson » Thu Jan 10, 2013 2:10 am

Yep, sorry, my mistake!
+FRIGHTENED does work.

So I'd use A_ChangeFlag ("FRIGHTENED", 1) in its See state for it to run away, right?

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: Monster run away from player

#10

Post by Ænima » Thu Jan 10, 2013 2:34 am

Correct.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Post Reply