Page 1 of 1

Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 4:13 pm
by Screenracer
Title.

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 4:21 pm
by Watermelon
Did you put

Code: Select all

Weapon.SlotNumber [# here]
?

(Decorate)

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 4:30 pm
by Screenracer
Watermelon wrote: Did you put

Code: Select all

Weapon.SlotNumber [# here]
?

(Decorate)
Yes, heres my M16 code that im having problems with.

Actor M16 : Weapon 17000
{
Obituary "%o was mowed down by %k's M16."
AttackSound "Weapons/M16GFIR"
Inventory.PickupMessage "You got the assault rifle!"
Weapon.SlotNumber 4
Weapon.KickBack 100
Weapon.AmmoType "Clip"
Weapon.AmmoUse 1
Weapon.AmmoGive 20
Decal "BulletChip"
States
{
Ready:
M16G A 1 A_WeaponReady
Loop
Deselect:
M16G A 1 A_Lower
Loop
Select:
M16G A 1 A_Raise
Loop
Fire:
M16F AB 2 bright A_FireBullets (3,1.6,-1,4,"BulletPuff")
M16F A 0 A_ReFire
Goto Ready
Flash:
TNT1 A 2 bright
Stop
Spawn:
M16P A -1
Stop
}
}

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 7:44 pm
by ArcheKruz
Did you have problems switching to, or switching away from the weapon? Also, if you have added the slot definitions to the keyconf lump, don't.

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 7:48 pm
by Qent
If you are playing with another mod that has a KEYCONF lump, then it will clobber your Weapon.SlotNumbers, and you will have to make your own KEYCONF lump.

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 10:37 pm
by Screenracer
No im making my own mod and im having troubles switching to the M16, when I pick it up and switch from it to my pistol and try to switch back to it its not even in the arms numbers, the game takes it like I have never picked it up.

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 10:45 pm
by Qent
Takes it? Can you see it if you enter printinv in the console?

RE: Cant change weapons with a custom weapon

Posted: Sat Jun 01, 2013 11:35 pm
by Screenracer
Qent wrote: Takes it? Can you see it if you enter printinv in the console?
Yes.

RE: Cant change weapons with a custom weapon

Posted: Sun Jun 02, 2013 1:01 am
by Qent
Would you mind sharing some version of the mod?

RE: Cant change weapons with a custom weapon

Posted: Sun Jun 02, 2013 5:53 am
by HexaDoken
From my experience using the keyconf method of defining weapon slots is considerably less prone to bugging out than defining slots through Weapon.SlotNumber. So I pretty much recommend that over the decorate property.

If you define through keyconf and things still don't work, then yeah, uploading the mod in question would be welcome.

RE: Cant change weapons with a custom weapon

Posted: Sun Jun 02, 2013 5:57 am
by Qent
The reason I use Weapon.SlotNumber is to make my mods play nicely with other weapon mods: two KEYCONFs need a third KEYCONF to reconcile them, but Weapon.SlotNumber is very unobtrusive. Unfortunately being nice sometimes means you get walked all over and need to patch in a new KEYCONF anyway....

RE: Cant change weapons with a custom weapon

Posted: Sun Jun 02, 2013 6:14 am
by HexaDoken
Last time I tried running a Weapon.SlotNumber mod over a KEYCONF mod I ended up being unable to select any weapon whatsoever. With both mods being KEYCONF, only the weaponset from the last mod is selectable, but that's already a considerable improvement compared to walking around and trying to fight with A Big Nothing.

Plus, to be honest, once again from my experience, even if you get both weaponsets to work technically, they usually don't work well gameplay-wise(read: clusterfuck).