actor WeaponSpawner : RandomSpawner
{
+NEVERRESPAWN //I think this flag is useless, but keep it just in case
DropItem "BayonetRifle", 255, 2
DropItem "Emperor", 255, 2
DropItem "Shotgun", 255, 10
DropItem "SuperShotgun", 255, 8
DropITem "EmeraldSplash", 255, 4
DropItem "Chaingun", 255, 5
DropItem "RocketLauncher", 255, 4
DropItem "CryoBow", 255, 4
DropItem "PlasmaRifle", 255, 3
DropItem "Flamer", 255, 1
DropItem "BowSimple", 255, 1
DropItem "Chainsaw", 255, 3
DropItem "ReflectSword", 255, 3
DropItem "BFG9000", 255, 2
}
ACTOR WeaponSpawnerNew : BrainStem 1112
{
Radius 20
Height 4
+NOBLOCKMAP
+MOVEWITHSECTOR
+NOCLIP
States
{
Spawn:
SOUL A random(1, 140) //Sprite is just a way to see if it spawned correctly
Goto Death
Death:
TNT1 A 0 A_SpawnItemEx("WeaponSpawner")
TNT1 A 0 A_SpawnItemEx("WeaponRespawner", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER) //Tried fixing the "Following" problem by making the making either one of the two a master or child, but it didn't work
TNT1 A 0
Stop
}
}
ACTOR WeaponRespawner : CustomInventory
{
Inventory.PickupMessage " "
Inventory.PickupSound "misc/p_pkup"
Inventory.Maxamount 0
-COUNTITEM
+INVENTORY.QUIET
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
States
{
Spawn:
MEGA A 1 //Sprite is just a way to see if it spawned correctly
Loop
Pickup:
TNT1 A 1 A_SpawnItemEx("WeaponSpawnerNew")
TNT1 A 0
Stop
}
}
I'm making a spawner that creates random weapons and made this. Basically, the Initial Spawner (WeaponSpawnerNew) spawns the Random one (WeaponSpawner) and a Respawner (WeaponRespawner), which, when picked up along with the weapon spawned, spawns the Initial Spawner again.
This works good, but there's a slight problem: everytime the Respawner summons the Initial Spawner, it respawns in a (seemingly) random point around the player (probably because it's an inventory actor?). How do I fix this?
Question
Gianluco
actor WeaponSpawner : RandomSpawner { +NEVERRESPAWN //I think this flag is useless, but keep it just in case DropItem "BayonetRifle", 255, 2 DropItem "Emperor", 255, 2 DropItem "Shotgun", 255, 10 DropItem "SuperShotgun", 255, 8 DropITem "EmeraldSplash", 255, 4 DropItem "Chaingun", 255, 5 DropItem "RocketLauncher", 255, 4 DropItem "CryoBow", 255, 4 DropItem "PlasmaRifle", 255, 3 DropItem "Flamer", 255, 1 DropItem "BowSimple", 255, 1 DropItem "Chainsaw", 255, 3 DropItem "ReflectSword", 255, 3 DropItem "BFG9000", 255, 2 } ACTOR WeaponSpawnerNew : BrainStem 1112 { Radius 20 Height 4 +NOBLOCKMAP +MOVEWITHSECTOR +NOCLIP States { Spawn: SOUL A random(1, 140) //Sprite is just a way to see if it spawned correctly Goto Death Death: TNT1 A 0 A_SpawnItemEx("WeaponSpawner") TNT1 A 0 A_SpawnItemEx("WeaponRespawner", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER) //Tried fixing the "Following" problem by making the making either one of the two a master or child, but it didn't work TNT1 A 0 Stop } } ACTOR WeaponRespawner : CustomInventory { Inventory.PickupMessage " " Inventory.PickupSound "misc/p_pkup" Inventory.Maxamount 0 -COUNTITEM +INVENTORY.QUIET +INVENTORY.AUTOACTIVATE +INVENTORY.ALWAYSPICKUP States { Spawn: MEGA A 1 //Sprite is just a way to see if it spawned correctly Loop Pickup: TNT1 A 1 A_SpawnItemEx("WeaponSpawnerNew") TNT1 A 0 Stop } }
I'm making a spawner that creates random weapons and made this. Basically, the Initial Spawner (WeaponSpawnerNew) spawns the Random one (WeaponSpawner) and a Respawner (WeaponRespawner), which, when picked up along with the weapon spawned, spawns the Initial Spawner again.
This works good, but there's a slight problem: everytime the Respawner summons the Initial Spawner, it respawns in a (seemingly) random point around the player (probably because it's an inventory actor?). How do I fix this?
Edited by GianlucoShare this post
Link to post
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.