(LMS) Disable give player all weapons (SOLVED)
(LMS) Disable give player all weapons (SOLVED)
Hello.
As people know, I am the creator of a wad named "DoomFighters". I've been asked many times to move the gamemode from duel to LMS. I wanted to do this; however, I reached a problem: each class is being given all of the weapons when on LMS; I don't want this, so I am hoping someone here could help me out of this situation. Whomever helps me with this, will be credited in my wad.
Thanks.
EDITED: It's solved. Thank you guys for your support!
As people know, I am the creator of a wad named "DoomFighters". I've been asked many times to move the gamemode from duel to LMS. I wanted to do this; however, I reached a problem: each class is being given all of the weapons when on LMS; I don't want this, so I am hoping someone here could help me out of this situation. Whomever helps me with this, will be credited in my wad.
Thanks.
EDITED: It's solved. Thank you guys for your support!
Last edited by Capt.J3 on Sun Sep 29, 2013 9:36 pm, edited 1 time in total.
-
TerminusEst13
- Retired Staff / Community Team Member
- Posts: 865
- Joined: Tue Jun 05, 2012 11:06 pm
RE: (LMS) Disable give player all weapons
lmsallowedweapons 0
The Ranger - New class for HeXen.
ZDoom Wars - I drew some pictures.
Samsara - Some class-based mod I guess?
Metroid: Dreadnought - I am a dumb fanboy.
DemonSteele - ~come with me to anime world~
ZDoom Wars - I drew some pictures.
Samsara - Some class-based mod I guess?
Metroid: Dreadnought - I am a dumb fanboy.
DemonSteele - ~come with me to anime world~
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: (LMS) Disable give player all weapons
Use this: http://wiki.zandronum.com/LMSFlags
Set all the weapons to false.
You can also add clearinventory() to an enter script.
edit: damnit term
Set all the weapons to false.
You can also add clearinventory() to an enter script.
edit: damnit term
Last edited by Hypnotoad on Sun Sep 29, 2013 3:12 am, edited 1 time in total.
RE: (LMS) Disable give player all weapons
Well, the thing is.. we tried this, but it didn't solve the problem. Will I need to create a script?
Last edited by Capt.J3 on Sun Sep 29, 2013 3:19 am, edited 1 time in total.
-
Catastrophe
- Retired Staff / Community Team Member
- Posts: 2571
- Joined: Sat Jun 02, 2012 2:44 am
RE: (LMS) Disable give player all weapons
Yes. Do clearinventory during the beginning of each round and then give the actual items needed.
RE: (LMS) Disable give player all weapons
Thanks. Can someone please wrote me an example on how this code would look like? ( I never created such code before. D:)Catastrophe wrote: Yes. Do clearinventory during the beginning of each round and then give the actual items needed.
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: (LMS) Disable give player all weapons
Script 1 ENTER
{
clearinventory();
giveinventory("fist", 1);
}
{
clearinventory();
giveinventory("fist", 1);
}
-
Catastrophe
- Retired Staff / Community Team Member
- Posts: 2571
- Joined: Sat Jun 02, 2012 2:44 am
RE: (LMS) Disable give player all weapons
script 1 enter
{
clearinventory();
giveinventory("stuff", 1);
}
http://zdoom.org/wiki/ClearInventory
http://zdoom.org/wiki/GiveInventory
{
clearinventory();
giveinventory("stuff", 1);
}
http://zdoom.org/wiki/ClearInventory
http://zdoom.org/wiki/GiveInventory
RE: (LMS) Disable give player all weapons
how would the code be like if you have different classes? is there a special ID or something?
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: (LMS) Disable give player all weapons
You mean if you want different classes to get different weapons?
Say you have two fighter classes, one named fighter1 and one named fighter2, with unique weapons fighter1fist and fighter2fist, you could do something like:
Say you have two fighter classes, one named fighter1 and one named fighter2, with unique weapons fighter1fist and fighter2fist, you could do something like:
Code: Select all
Script 1 ENTER
{
clearinventory();
if (CheckActorProperty(0, APROP_NameTag, "fighter1"))
{
giveinventory("fighter1fist", 1);
}
else if (CheckActorProperty(0, APROP_NameTag, "fighter2"))
{
giveinventory("fighter2fist", 1);
}
}
RE: (LMS) Disable give player all weapons
Hypnotoad wrote: You mean if you want different classes to get different weapons?
Say you have two fighter classes, one named fighter1 and one named fighter2, with unique weapons fighter1fist and fighter2fist, you could do something like:Code: Select all
Script 1 ENTER { clearinventory(); if (CheckActorProperty(0, APROP_NameTag, "fighter1")) { giveinventory("fighter1fist", 1); } else if (CheckActorProperty(0, APROP_NameTag, "fighter2")) { giveinventory("fighter2fist", 1); } }
AH! Thank you, Hypnotoad! As I promise, I will give you credit for this. What name to you prefer me to use?
- Hypnotoad
- Retired Staff / Community Team Member
- Posts: 528
- Joined: Tue May 29, 2012 8:50 pm
- Location: Britland
RE: (LMS) Disable give player all weapons
Hypnotoad is fine but no need to credit me really it's just a very simple script.
RE: (LMS) Disable give player all weapons
Well then, its up to you.
Anyways I reached yet another problem. The code works on removing the weapons, but its not giving the classes their weapons/fists. Is there something I did wrong?
Anyways I reached yet another problem. The code works on removing the weapons, but its not giving the classes their weapons/fists. Is there something I did wrong?
Spoiler: This is the Acs and the decoration code of the fighter's class (Open)
- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: (LMS) Disable give player all weapons
A simpler way to prevent the weapons from being given is to create a new player class that it not derived from DoomPlayer or HereticPlayer. This way you shouldn't need any ACS.
RE: (LMS) Disable give player all weapons
You are right, now the problem is fixed! Thank you! :DTorr Samaho wrote: A simpler way to prevent the weapons from being given is to create a new player class that it not derived from DoomPlayer or HereticPlayer. This way you shouldn't need any ACS.