iAmCodeMonkey666 Posted June 29, 2010 Okay, so I wrote some code to make a weapon for my fantasy game, but for some reason the weapons fire and flash states will not execute when the player presses the fire button. The weapons ready state and spawn states are working. My code for the weapon is as follows... //1 - Jade Wand ACTOR JadeWand : Weapon 20021 { Inventory.PickupMessage "Jade Wand Added To Inventory" Inventory.PickupSound "inv/weaponPickup" Weapon.SlotNumber 1 Weapon.AmmoGive 10 Weapon.AmmoUse 1 Weapon.AmmoType "Clip" States { Ready: JADE A 1 A_WeaponReady Loop Select: JADE A 1 A_Raise Loop Deselect: JADE A 1 A_Lower Loop Fire: JADE B 0 A_GunFlash JADE B 3 A_PlaySound("weap/jadeFire", CHAN_WEAPON) JADE A 0 A_ReFire Goto Ready Flash: JADE B 1 Bright A_Light1 JADE B 1 Bright A_Light2 Goto LightDone Spawn: JDWD A -1 Stop } } If anyone wants to refine this further, that is fine with me. 0 Share this post Link to post
GreyGhost Posted June 29, 2010 Start by posting the DECORATE script (within code tags), that might be all we need to see. 0 Share this post Link to post
iAmCodeMonkey666 Posted June 30, 2010 GreyGhost said:Start by posting the DECORATE script (within code tags), that might be all we need to see. what do the code tags look like? 0 Share this post Link to post
GreyGhost Posted July 1, 2010 iAmCodeMonkey666 said:what do the code tags look like? [code] [/code] - they're handy if you want/need to preserve the formatting of quoted text. <script language="Javascript"> <!-- alert("Hello world!"); //--> </script> Try replacing Goto LightDone with Stop 0 Share this post Link to post
Graf Zahl Posted July 1, 2010 GreyGhost said:[code] [/code] - they're handy if you want/need to preserve the formatting of quoted text. <script language="Javascript"> <!-- alert("Hello world!"); //--> </script> Try replacing Goto LightDone with Stop Not a good idea. The LightDone state resets the weapon's extra light and stops the animation immediately. That's certainly not the problem here. 0 Share this post Link to post
Gez Posted July 1, 2010 You are aware that your attack state does not actually contain an attack, right? It just displays the muzzle flash and play a sound, but it does not fire a hitscan or shoot a projectile or anything else that can actually damage foes. 0 Share this post Link to post
GreyGhost Posted July 1, 2010 Graf Zahl said:The LightDone state resets the weapon's extra light and stops the animation immediately. That's something new I've learnt today. 0 Share this post Link to post
iAmCodeMonkey666 Posted July 1, 2010 Thanks for the replies. I managed to fix the problem myself shortly after posting this thread. 0 Share this post Link to post