Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
BadCompany

Monster Spawner

Recommended Posts

Hi...

I work on a Monster Spawner,
but I didn't know, how the random generator does it.
For a example, I would more "IWarlord666" spawning.
How I can do it?

Here a piece from DECORATE:

ACTOR MonsterDropper
{
Radius 4
Height 8
Speed 10
Scale 0.7
+NOTARGET
+FRIENDLY
PROJECTILE
+FLOORCLIP
States
{
Spawn:
BOSF ABCD 4
Loop
Death:
TNT1 A 0
FIRE A 2 A_PlaySound("weapons/monspwnx")
FIRE BC 2
TNT1 A 0 A_Jump(43, 7)
TNT1 A 0 A_Jump(43, 8)
TNT1 A 0 A_Jump(43, 9)
TNT1 A 0 A_Jump(43, 10)
TNT1 A 0 A_Jump(43, 11)
TNT1 A 0 A_Jump(43, 12)
TNT1 A 0 A_Jump(255, 9)
GRNE A 0 A_SpawnItem("FireWyvern2",1,0,0)
TNT1 A 0 A_Jump(255, 10)
GRNE L 0 A_SpawnItem("TorturedSoul2",1,0,0)
TNT1 A 0 A_Jump(255, 6)
GRNE L 0 A_SpawnItem("SImp2",1,0,0)
TNT1 A 0 A_Jump(255, 4)
GRNE L 0 A_SpawnItem("IWarlord666",1,0,0)
TNT1 A 0 A_Jump(255, 2)
GRNE L 0 A_SpawnItem("StoneImp2",1,0,0)
FIRE DEFGH 2
TNT1 A -1
Stop
}
}

Thanks for incoming help. ;-)

Share this post


Link to post

Don't bother reinventing the wheel and use a custom BossEye:

ACTOR MonsterSpawner : BossEye replaces BossEye
{
	DropItem "FireWyvern2"
	DropItem "TorturedSoul2"
	DropItem "SImp2"
	DropItem "IWarlord666", 255, 30
	DropItem "StoneImp2"
}
That's just an example.The IWarlord666 is 30 more likely to spawn than any of the other actors (it'll appear on average 30 out of 34 times, while each other will appear only 1 out of 34 times).

Learn to use both that and the very similar RandomSpawners, they've been created to simplify a lot this kind of things. If you're not modding for Skulltag, you might want to put the DropItem list in a replacement for SpawnShot instead.

(Skulltag 98a, which will be released tomorrow, will support custom BossEyes and RandomSpawners, however it will not support custom SpawnShots as it's a more recent ZDoom improvement.)

Share this post


Link to post

ACTOR MonsterSpawner : RandomSpawner
{
	DropItem "FireWyvern2"
	DropItem "TorturedSoul2"
	DropItem "SImp2"
	DropItem "IWarlord666", 255, 30
	DropItem "StoneImp2"
}

ACTOR MonsterDropper
{
	Radius 4
	Height 8
	Speed 10
	Scale 0.7
	+NOTARGET
	+FRIENDLY
	+FLOORCLIP
	Projectile
	States
	{
	Spawn:
		BOSF ABCD 4 
		Loop
	Death:
		FIRE A 2 A_PlaySound("weapons/monspwnx")
		FIRE BC 2
		FIRE D 2 A_SpawnItem("MonsterSpawner",1,0,0)
		FIRE EFGH 2
		Stop
	} 
}

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
Sign in to follow this  
×