Cant change weapons with a custom weapon

Discuss all aspects related to modding Zandronum here.
Post Reply
Screenracer
 
Posts: 69
Joined: Mon May 27, 2013 5:29 pm

Cant change weapons with a custom weapon

#1

Post by Screenracer » Sat Jun 01, 2013 4:13 pm

Title.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Cant change weapons with a custom weapon

#2

Post by Watermelon » Sat Jun 01, 2013 4:21 pm

Did you put

Code: Select all

Weapon.SlotNumber [# here]
?

(Decorate)
Last edited by Watermelon on Sat Jun 01, 2013 4:21 pm, edited 1 time in total.

Screenracer
 
Posts: 69
Joined: Mon May 27, 2013 5:29 pm

RE: Cant change weapons with a custom weapon

#3

Post by Screenracer » Sat Jun 01, 2013 4:30 pm

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
}
}

User avatar
ArcheKruz
 
Posts: 63
Joined: Wed Oct 31, 2012 8:17 am
Location: Hong Kong

RE: Cant change weapons with a custom weapon

#4

Post by ArcheKruz » Sat Jun 01, 2013 7:44 pm

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.

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: Cant change weapons with a custom weapon

#5

Post by Qent » Sat Jun 01, 2013 7:48 pm

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.

Screenracer
 
Posts: 69
Joined: Mon May 27, 2013 5:29 pm

RE: Cant change weapons with a custom weapon

#6

Post by Screenracer » Sat Jun 01, 2013 10:37 pm

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.

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: Cant change weapons with a custom weapon

#7

Post by Qent » Sat Jun 01, 2013 10:45 pm

Takes it? Can you see it if you enter printinv in the console?

Screenracer
 
Posts: 69
Joined: Mon May 27, 2013 5:29 pm

RE: Cant change weapons with a custom weapon

#8

Post by Screenracer » Sat Jun 01, 2013 11:35 pm

Qent wrote: Takes it? Can you see it if you enter printinv in the console?
Yes.

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: Cant change weapons with a custom weapon

#9

Post by Qent » Sun Jun 02, 2013 1:01 am

Would you mind sharing some version of the mod?

HexaDoken
Forum Regular
Posts: 352
Joined: Wed Jul 04, 2012 8:27 am
Location: Void. Russian Void.

RE: Cant change weapons with a custom weapon

#10

Post by HexaDoken » Sun Jun 02, 2013 5:53 am

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.

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: Cant change weapons with a custom weapon

#11

Post by Qent » Sun Jun 02, 2013 5:57 am

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....
Last edited by Qent on Sun Jun 02, 2013 6:03 am, edited 1 time in total.

HexaDoken
Forum Regular
Posts: 352
Joined: Wed Jul 04, 2012 8:27 am
Location: Void. Russian Void.

RE: Cant change weapons with a custom weapon

#12

Post by HexaDoken » Sun Jun 02, 2013 6:14 am

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).

Post Reply