[DECORATE] [SOLVED] How to make sv_weaponstay work on spawned weapons?
[DECORATE] [SOLVED] How to make sv_weaponstay work on spawned weapons?
I'm essentially trying to replace one weapon in the map with another weapon, and to make it configurable so I can choose what I can replace the weapons with. I thought it would be a good idea to make an actor that replaces all weapons, and would spawn a weapon depending on what I tell it to. I want this spawned weapon to remain on the ground permanently and behave like a normal weapon that was placed in the map by the mapper. Is there any way to apply sv_weaponstay behavior to spawned weapons?
I know I can apply some hax but I'm trying to keep the code simple so it can be easily extended for custom weapons. I'm relying on the tiny possibility that there is some function that allows me to have a spawned weapon treated like the weapons that are placed by the mapper.
I know I can apply some hax but I'm trying to keep the code simple so it can be easily extended for custom weapons. I'm relying on the tiny possibility that there is some function that allows me to have a spawned weapon treated like the weapons that are placed by the mapper.
Last edited by Konda on Mon Jun 06, 2016 7:50 pm, edited 1 time in total.
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
Weapons spawned via RandomSpawner respect sv_weaponstay.
I know because in my Doom64 mod a few versions ago, I made an enemy drop a RandomSpawner that dropped another RandomSpawner which spawned a chaingun, which caused the level to fill with chainguns which couldn't be picked up if you already had one, unless I turned sv_weaponstay off.
I know because in my Doom64 mod a few versions ago, I made an enemy drop a RandomSpawner that dropped another RandomSpawner which spawned a chaingun, which caused the level to fill with chainguns which couldn't be picked up if you already had one, unless I turned sv_weaponstay off.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

- Combinebobnt
- Retired Staff / Community Team Member
- Posts: 1905
- Joined: Mon Jun 04, 2012 3:37 am
- Location: Earth
- Contact:
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
Nice I will try that aenima
edit: works
edit: works
- SwordGrunt
- Forum Regular
- Posts: 377
- Joined: Thu Jun 07, 2012 8:43 pm
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
If for whatever reason you can't work with a RandomSpawner, have the actor remove its own DROPPED flag in its Spawn state, which is what lets the game know it was spawned/dropped instead of placed directly on the map. This does have its side effects since manually dropping the weapon/item would also clear its DROPPED flag, so you can make an item respawn indefinitely (and its spawn point is usually desynced) the same way you can drop weapons to get infinite ammo.
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
Alright, thanks for the info, saved me a lot of trouble. Btw, do you guys know of a way to remove an item dropped by a randomspawner without modifying the item's Decorate code? What happens to the item if the randomspawner itself is removed?
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
You can fix that one by making weapon pickups not give any ammo though.SwordGrunt wrote:the same way you can drop weapons to get infinite ammo.
[DECORATE] Re: How to make sv_weaponstay work on spawned weapons?
I correctly answered my own question here. To remove an item dropped by a randomspawner, just remove the randomspawner. So this is officially SOLVEDKonda wrote:Btw, do you guys know of a way to remove an item dropped by a randomspawner without modifying the item's Decorate code? What happens to the item if the randomspawner itself is removed?
Thank you guys again, you saved me a loooooooooot of work.