I need help on command to spawn thing
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!)
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!)
-
- Posts: 53
- Joined: Fri Dec 16, 2016 2:50 pm
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Brazil, São Paulo, Campinas
I need help on command to spawn thing
How to make a command that every time the player join it generates an object eg friend monster?
-
- Posts: 38
- Joined: Thu Mar 08, 2018 3:40 am
Re: I need help on command to spawn thing
I think you could accomplish this with a ZScript EventHandler. Try overriding PlayerEntered and then looking up the player object as described on that wiki page. Something like this might work but I haven't tested it:
Code: Select all
void PlayerEntered(PlayerEvent e) {
PlayerInfo player = players[e.PlayerNumber];
player.mo.Spawn("DoomImp", (0.0, 0.0), NO_REPLACE);
}
-
- Posts: 53
- Joined: Fri Dec 16, 2016 2:50 pm
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Brazil, São Paulo, Campinas
Re: I need help on command to spawn thing
thanks for help