Spoiler:Code: Select all
////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////// MINE LAYER /////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// ACTOR LandMineLayer : Weapon 25084 { SpawnId 200 Inventory.PickupMessage "You got some Landmines!" Inventory.PickupSound "misc/w_pkup" Weapon.AmmoType "Mines" Weapon.AmmoGive 5 Weapon.AmmoUse 1 Weapon.AmmoType2 "Mines" Weapon.AmmoUse2 1 Weapon.SisterWeapon "PowerLandMineLayer" States { Spawn: MINE A -1 Loop Ready: LAYR A 1 A_WeaponReady Loop Deselect: LAYR A 0 A_Lower LAYR A 1 A_Lower Loop Select: LAYR A 0 A_Raise LAYR A 1 A_Raise Loop AltFire: LAYR B 8 A_PlaySound("weapons/minebeep") LAYD ABCDE 1 TNT1 A 10 LAYT A 1 A_PlaySound("weapons/minethrow") LAYT BCDEFGH 1 LAYT I 1 A_FireCustomMissile("Landmine2",0,1,0,8) LAYT JKLMNOPQR 1 TNT1 A 10 LAYU ABCDE 1 LAYR A 6 Goto Ready Fire: LAYR B 8 A_PlaySound("weapons/minebeep") LAYD ABCDE 1 TNT1 A 5 TNT1 A 9 A_FireCustomMissile("Landmine3",0,1,0,0) LAYU ABCDE 1 LAYR A 4 Goto Ready } } ACTOR Landmine { Radius 5 Height 5 Mass 1000000 Health 20 Damage 10 SeeSound "weapons/tink" ExplosionDamage 384 ExplosionRadius 160 DONTHURTSHOOTER Speed 0 +NOBLOOD -SHOOTABLE +MISSILE States { Spawn: MINE A 0 A_Gravity MINE AB 5 Loop Death: MISL B 0 A_PlaySound("weapons/mineexpl") MISL B 8 A_Explode MISL C 6 MISL D 4 Stop } } ACTOR Landmine2 { Radius 5 Height 5 Mass 1000000 Health 20 Damage 10 SeeSound "weapons/tink" DONTHURTSHOOTER Speed 15 +NOBLOOD -SHOOTABLE +MISSILE +DOOMBOUNCE States { Spawn: MINE A 0 A_Gravity MINE AB 5 Loop Death: MINE A 0 A_SpawnItem("Landmine") Stop } } ACTOR Landmine3 : Landmine2 { Speed 2 } ACTOR Mines : Ammo 25085 { SpawnId 201 Inventory.Amount 2 Inventory.MaxAmount 20 Ammo.BackpackAmount 5 Ammo.BackpackMaxAmount 40 Inventory.PickupMessage "Picked up some Landmines." Inventory.PickupSound "misc/i_pkup" Inventory.Icon MINEA0 States { Spawn: MINE B -1 Stop } }
Land Mine + Coop
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Land Mine + Coop
Is it possible to create a Land Mine that works in Coop-mode? Meaning that teammates won't make the mines explode. Here is the code that I have at the moment but these landmines are not coop-friendly. This is high essential for Stronghold
Spoiler:
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Re: Land Mine + Coop
If you can make new playerclasses, try giving the mine the GHOST flag and give the player's class the THRUGHOST flag.
^Don't forget to clear and add that playerclass in keyconf!
If you can't afford to make changes to the playerclasses, you can give all the players an inventory item that gives the flag when they enter the game.
Code: Select all
actor DoomPlayer2 : DoomPlayer
{
+THRUGHOST
}If you can't afford to make changes to the playerclasses, you can give all the players an inventory item that gives the flag when they enter the game.
Re: Land Mine + Coop
Shouldn't that be the other way around?
Like giving the player the GHOST flag, and the mine the THRUGHOST flag.
Like giving the player the GHOST flag, and the mine the THRUGHOST flag.
- Cutmanmike
- Posts: 11354
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
- Contact:
Re: Land Mine + Coop
Maybe. I can't check right now though.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Land Mine + Coop
That sounds like a plan, but what's right now? 