Discuss all aspects related to modding Zandronum here.
-
Fabysk
- Forum Regular
- Posts: 469
- Joined: Sat Sep 22, 2012 8:17 pm
- Location: In a house...duhh
#1
Post
by Fabysk » Wed Dec 18, 2013 11:43 pm
Recently, I was able to implement the Black Ops 2 weapons into Project 115 with full success. But when I get killed while aiming down the sights, the game crashes

. I'm not sure what the problem is here , but if anyone can help, that would be great.
Code: Select all
ACTOR Type25 : Weapon 20006
{
Spawnid 202
Weapon.AmmoType "Type25Ammo"
Weapon.AmmoGive 999
Weapon.AmmoUse 1
Weapon.SlotNumber 5
Inventory.PickupSound "misc/w_pkup"
AttackSound "weapons/TYPE25"
Decal "BulletChip"
+NOAUTOFIRE
States
{
Spawn:
MGU3 A -1
Loop
Ready:
TPH1 A 1 A_WeaponReady
Loop
Deselect:
TPH1 A 1 A_Lower
Loop
Select:
TPH1 A 1 A_Raise
Loop
Fire:
TPH1 A 0 A_SetPitch (pitch-2.0)
TPH1 A 1 A_GunFlash
TPH1 B 2 A_FireBullets(5, 1, 1, 2, 0, 1)
TPH1 A 1 A_ReFire
goto Ready
AltFire:
TPH1 B 0 A_GiveInventory("sightsType25")
TPH1 B 0 A_SelectWeapon("sightsType25")
TPH1 A 0 A_Lower
Loop
}
}
actor sightsType25 : Weapon 20007
{
Decal "BulletChip"
Weapon.AmmoType "Type25Ammo"
Weapon.AmmoGive 999
Weapon.AmmoUse 1
AttackSound "weapons/TYPE25"
Weapon.AmmoGive 0
States
{
Select:
TPH1 C 0 A_ZoomFactor(1.5)
TPH1 C 1 A_Raise
Loop
Ready:
TPH1 C 1 A_WeaponReady
Loop
AltFire:
TPH1 C 0 A_ZoomFactor(1.5)
TPH1 C 0 A_Takeinventory("sightsType25")
TPH1 C 1 A_SelectWeapon("Type25")
Goto Deselect
Deselect:
TPH1 C 0 A_Lower
Loop
Fire:
TPH1 C 0 A_SetPitch (pitch-1.4)
TPH1 C 1 A_GunFlash
TPH1 D 2 A_FireBullets(2, 1, 1, 2, 0, 1)
TPH1 C 1 A_ReFire
Goto Ready
}
}
-
Ænima
- Addicted to Zandronum
- Posts: 3583
- Joined: Tue Jun 05, 2012 6:12 pm
#2
Post
by Ænima » Wed Dec 18, 2013 11:44 pm
-
Fabysk
- Forum Regular
- Posts: 469
- Joined: Sat Sep 22, 2012 8:17 pm
- Location: In a house...duhh
#3
Post
by Fabysk » Wed Dec 18, 2013 11:49 pm
Ænima wrote:
Probably that.
No luck, that didn't work :(
EDIT: I figured out the problem. Thanks anyways Ænima
Last edited by
Fabysk on Thu Dec 19, 2013 12:14 am, edited 1 time in total.
-
Ænima
- Addicted to Zandronum
- Posts: 3583
- Joined: Tue Jun 05, 2012 6:12 pm
#4
Post
by Ænima » Thu Dec 19, 2013 12:12 am
Fabysk wrote:
Ænima wrote:
Probably that.
No luck, that didn't work :(
No I mean that's what's causing the crash. There has to be a state with at least 1 tic duration in a Deselect state somewhere. When you die, you don't switch to another weapon, but your current weapon loops its Deselect state. Since yours has zero delay, it causes a crash.
Last edited by
Ænima on Thu Dec 19, 2013 12:13 am, edited 1 time in total.
-
Fabysk
- Forum Regular
- Posts: 469
- Joined: Sat Sep 22, 2012 8:17 pm
- Location: In a house...duhh
#5
Post
by Fabysk » Thu Dec 19, 2013 12:36 am
Ænima wrote:
No I mean that's what's causing the crash. There has to be a state with at least 1 tic duration in a Deselect state somewhere. When you die, you don't switch to another weapon, but your current weapon loops its Deselect state. Since yours has zero delay, it causes a crash.
I just realized that; with a surprise seeing that it was supposed to be at 1. I'm getting better at DECORATE little by little. Thanks for the help
