How should I do it?
My goal is to create a player class that loses weapons everytime he advances from a map to another
Scripts affecting custom player classes
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!)
- m8f
-
- Posts: 1445
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
- Contact:
Re: Scripts affecting custom player classes
ACS: ClearInventory + CheckClass.
ZScript: this + operator A is "B"
Edit: ACS is wrong! To get player's class, use https://zdoom.org/wiki/GetActorClass
ZScript: this + operator A is "B"
Edit: ACS is wrong! To get player's class, use https://zdoom.org/wiki/GetActorClass
Last edited by m8f on Thu Feb 14, 2019 5:00 am, edited 1 time in total.
Re: Scripts affecting custom player classes
Check class only lets me check if the class is valid, how do I actually check if the player is currently using a specific class?
Last edited by Grey-Wolf on Wed Feb 13, 2019 1:19 pm, edited 2 times in total.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Scripts affecting custom player classes
If we're talking about ACS, then you want [wiki]CheckActorClass[/wiki].
Re: Scripts affecting custom player classes
Actually, I solved it like this:
if(GetPlayerInfo(PlayerNumber(), PLAYERINFO_PLAYERCLASS) == 4)
{
By the way this was an old question, didn't really want to put anyone's attentiont to this right now.
if(GetPlayerInfo(PlayerNumber(), PLAYERINFO_PLAYERCLASS) == 4)
{
By the way this was an old question, didn't really want to put anyone's attentiont to this right now.