Random weapon or item spawns

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
DELTAtheDboi005
Posts: 219
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Random weapon or item spawns

Post by DELTAtheDboi005 »

Hey, just wondering:

How do you make random weapon or item spawns?

Say for example:
There's a shotgun with two fire modes, One is pellets, The other is slugs. And they are separate ammo types.

Or a chaingun with two variants, one is like an automatic grenade launcher, the other is just your standard chaingun.

I can never wrap my head around it, I've seen it in other mods, But have never done it myself. How does work exactly?.

Just curious. :?:
Blue Shadow
Posts: 5040
Joined: Sun Nov 14, 2010 12:59 am

Re: Random weapon or item spawns

Post by Blue Shadow »

Random spawning is usually done by utilizing the [wiki=Classes:RandomSpawner]RandomSpawner[/wiki] actor class.
Post Reply

Return to “Scripting”