Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
scifista42

DECORATE monster questions (gimmicky)

Recommended Posts

1. When my custom monster #1 dies, it spawns another custom monster #2. When monster #2 spawns, I want it to immediately enter See state and go after the player, even if monster #1 was previously infighting with another random monster. Otherwise I want to left infighting / idling / waking-up mechanics absolutely untouched. Is there a simple way?

2. The same monster #2 spawns as non-solid and non-shootable, walks around for a moment (without attacking) and after a while it becomes solid and shootable and able to attack. Problem is, it often materializes inside another monster or thing and becomes stuck. Is there a simple way to check if it has enough free space for "materialization"?

Share this post


Link to post

the first one is quite easy, let's say we want a imp that spawn an angry imp on death:

the function you want is a_spawnItemEx (so you can control exactly where to spawn him, in this case is centred into the #1 imp body)
code---------------------

ACTOR ImpDropper : DoomImp
{
States
{
Death:
TROO I 8
TROO J 8 A_Scream
TROO K 6
TROO L 6 A_NoBlocking
TROO L 0 A_SpawnItemEx ("AngryImp")
TROO M -1
Stop
XDeath:
TROO N 5
TROO O 5 A_XScream
TROO P 5
TROO Q 5 A_NoBlocking
TROO RST 5
TROO T 0 A_SpawnItemEx ("AngryImp")
TROO U -1
Stop
}
}

ACTOR AngryImp : DoomImp
{
-SOLID
-SHOOTABLE
States
{
Spawn:
See1:
TROO AABBCCDD 3 A_Chase //change values here as needed
TROO A 0 A_ChangeFlag ("SOLID",true)
TROO A 0 A_ChangeFlag ("SHOOTABLE",true)
See:
TROO AABBCCDD 3 A_Chase
Loop
{

end code-----------

you can adjust the 2 sees states accordind to your needs.

the second isn't that easy, i remember gggmork trying to do something similar (checking if an actor is inside another or in the void), but i can't remember rigth now if he managed to get it right, i'll have to search a little bit for this.

Share this post


Link to post

Sorry, you didn't really solve my problem. I can spawn the monster #2 from #1, but if monster #1 doesn't target the player (but another monster), monster #2 won't target the player either. I want #2 to immediately start chasing the player, always and no matter what.

I know of the hacky spawn-a-dummy-checker solution, in fact I independently discovered it myself years ago. I was just asking if there's any obviously simple way to go around it.

Share this post


Link to post

Of course that I'm glad you've provided help to me, thanks for trying. :) What I've found isn't perfect, but sufficient enough. Still looking for an answer to the latter problem, if there is one.

Share this post


Link to post
scifista42 said:

I already tried it with A_Chase, but then the monster entered an Idle state instead of walking.

You need the "see" state first, so it can see the player and then start chasing it.

I think if you spawn a non shootable actor with see state and clear target, it will be enough to make it chase players, as it cant be hurt by others. You can also add +NOTARGETSWITCH flag, so it will chase the player even if it is hit after being shootable.

Share this post


Link to post

Nothing what you said helped me to advance any further (but thanks anyway). ClearTarget makes the monster idle until it sees the player, that's not what I want. By "entered an Idle state instead of walking" I meant that the monster with cleared target refused to walk around, and went to Idle state instead. Making the monster "Wander" around is already good. I'm still stuck with the other problem (making the monster solid), but actually I haven't tried anything since I've last posted here.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×