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

Wake up on spawn?

Recommended Posts

I have made a decorate weapon that changes the enemy into a different enemy, but the only problem I'm running into is when the new enemy spawns. When the new enemy appears, it is idle; therefore an easy target for the player. Is it possible to make it spawn active?

Here are the relevant bits of code:

...
{
Death.Morph:
      FATB G 3 A_Die
      TNT1 A 0 A_UnSetSolid
      TNT1 A 0 A_CustomMissile("AlienMorpher",0,0,0,0)
      Stop
}

ACTOR AlienMorpher{

  States
        {
        Spawn:
         ...
         TNT1 A 1 A_SpawnItem("MorphedBadassAlien",0,0,0,0)
        Stop
        }
}


ACTOR MorphedBadassAlien //This Actor is 'asleep' when it is spawned
{
	Game Doom
	PainChance 255
	Monster
        ...
	States
	{
	Spawn:
		GRNT AB 5 A_Look
		Loop
	See:
		GRNT AABBCCDD 2 A_Chase
		Loop
        ...
	}
}

Share this post


Link to post
Patrick said:

I have made a decorate weapon that changes the enemy into a different enemy, but the only problem I'm running into is when the new enemy spawns. When the new enemy appears, it is idle; therefore an easy target for the player. Is it possible to make it spawn active?

Here are the relevant bits of code:

...
{
Death.Morph:
      FATB G 3 A_Die
      TNT1 A 0 A_UnSetSolid
      TNT1 A 0 A_CustomMissile("AlienMorpher",0,0,0,0)
      Stop
}

ACTOR AlienMorpher{

  States
        {
        Spawn:
         ...
         TNT1 A 1 A_SpawnItem("MorphedBadassAlien",0,0,0,0)
        Stop
        }
}


ACTOR MorphedBadassAlien //This Actor is 'asleep' when it is spawned
{
	Game Doom
	PainChance 255
	Monster
        ...
	States
	{
	Spawn:
		GRNT AB 5 A_Look
		Loop
	See:
		GRNT AABBCCDD 2 A_Chase
		Loop
        ...
	}
}


Not a coder, but maybe the code that's commented "//This Actor is 'asleep' when it is spawned" has some kind of relevance to your problem???

Share this post


Link to post

Perhaps: remove the 'Loop' in the Spawn states.

Or you might need to augment the Spawn states with an action which makes him walk around.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×