CaptainManiac Posted April 11, 2018 This RPG,i tried to make its HS optional but it either crashes or gets stuck.What to do?!I cannot even find the reason.i am so stupid :( :( :( actor SeekerBazooka : Weapon Replaces RocketLauncher { scale 0.75 radius 20 height 16 inventory.pickupmessage "You got the RPG with Optional Heat Seeking!" weapon.selectionorder 2500 weapon.kickback 100 weapon.ammotype "rocketammo" weapon.ammouse 1 weapon.ammogive 8 +WEAPON.EXPLOSIVE //+WEAPON.NOAUTOFIRE states { Ready: RPGA A 1 RPGA A 1 A_WeaponReady loop Deselect: RPGA A 1 A_Lower NULL AA 0 A_LOWER loop Select: RPGA A 1 A_Raise NULL AA 0 A_RAISE loop AltFire: RPGA A 0 RPGA A 0 A_JumpIfInventory("WeaponHSMode",1,"TurnOffHS") RPGA A 0 goto TurnOnHS TurnOnHS: RPGA A 0 RPGA A 0 A_JumpifInventory("WeaponHSMode",1,"Ready") RPGA A 0 A_GiveInventory("WeaponHSMode") RPGA A 0 A_Print("Heat Seeking Mode ON",1.0,"DBIGFONT") RPGA A 0 RPGA A 0 goto Ready TurnOffHS: RPGA A 0 RPGA A 0 A_TakeInventory("WeaponHSMode") RPGA A 0 A_Print("Heat Seeking Mode OFF",1.0,"DBIGFONT") RPGA A 0 RPGA A 0 goto Ready Fire: RPGA A 1 RPGA A 1 A_JumpIfInventory("WeaponHSMode",1,"HSFire") NULL A 0 A_PlayWeaponSound("SEEKLAUNCH") RPGA B 2 bright A_FireCustomMissile ("NormalRocket",0,1,9,-2) RPGA C 2 bright RPGA DEFEDHG 2 RPGA A 8 RPGA A 0 A_PlayWeaponSound("RPGOPN") RPGA IJKLM 2 RPGA M 7 RPGA A 0 A_PlayWeaponSound("RPGLAD") RPGA NOON 2 RPGA M 7 RPGA A 0 A_PlayWeaponSound("RPGOCLS") RPGA MLKJI 2 RPGA A 4 RPGA A 0 A_ReFire Goto ready HSFire: RPGA A 1 A_JumpIfInventory("WeaponHSMode",0,"Fire") NULL A 0 A_PlayWeaponSound("SEEKLAUNCH") RPGA B 2 bright A_FireCustomMissile ("seekerRocket",0,1,9,-2) RPGA C 2 bright RPGA DEFEDHG 2 RPGA A 8 RPGA A 0 A_PlayWeaponSound("RPGOPN") RPGA IJKLM 2 RPGA M 7 RPGA A 0 A_PlayWeaponSound("RPGLAD") RPGA NOON 2 RPGA M 7 RPGA A 0 A_PlayWeaponSound("RPGOCLS") RPGA MLKJI 2 RPGA A 4 RPGA A 0 A_ReFire("Fire") Goto ready Spawn: RPGA Z -1 Stop } } THIS STUCKS WHEN THE HEATSEEK MODE IS IN THE IVNENTORY Is there any saving grace for it? 1 Quote Share this post Link to post
0 kb1 Posted April 11, 2018 I'm not very versed in Decorate, but the Spawn line struck me as odd, with RPGA Z -1 Stop Go to state Z and, -1, stay there forever? What does "Stop" do? Without really knowing what I'm doing, I can make a suggestion: Reduce the complexity of the weapon, changing it more and more so that its code looks like a functioning weapon. Continue this process until it starts working, then work backwards until you identify the exact line where it fails. Hopefully, that will give you the info you need to proceed. When you figure it out, please post your fix - I'd be interested to know what fixes it. 1 Quote Share this post Link to post
Question
CaptainManiac
This RPG,i tried to make its HS optional but it either crashes or gets stuck.What to do?!I cannot even find the reason.i am so stupid :( :( :(
actor SeekerBazooka : Weapon Replaces RocketLauncher
{
scale 0.75
radius 20
height 16
inventory.pickupmessage "You got the RPG with Optional Heat Seeking!"
weapon.selectionorder 2500
weapon.kickback 100
weapon.ammotype "rocketammo"
weapon.ammouse 1
weapon.ammogive 8
+WEAPON.EXPLOSIVE
//+WEAPON.NOAUTOFIRE
states
{
Ready:
RPGA A 1
RPGA A 1 A_WeaponReady
loop
Deselect:
RPGA A 1 A_Lower
NULL AA 0 A_LOWER
loop
Select:
RPGA A 1 A_Raise
NULL AA 0 A_RAISE
loop
AltFire:
RPGA A 0
RPGA A 0 A_JumpIfInventory("WeaponHSMode",1,"TurnOffHS")
RPGA A 0
goto TurnOnHS
TurnOnHS:
RPGA A 0
RPGA A 0 A_JumpifInventory("WeaponHSMode",1,"Ready")
RPGA A 0 A_GiveInventory("WeaponHSMode")
RPGA A 0 A_Print("Heat Seeking Mode ON",1.0,"DBIGFONT")
RPGA A 0
RPGA A 0
goto Ready
TurnOffHS:
RPGA A 0
RPGA A 0 A_TakeInventory("WeaponHSMode")
RPGA A 0 A_Print("Heat Seeking Mode OFF",1.0,"DBIGFONT")
RPGA A 0
RPGA A 0
goto Ready
Fire:
RPGA A 1
RPGA A 1 A_JumpIfInventory("WeaponHSMode",1,"HSFire")
NULL A 0 A_PlayWeaponSound("SEEKLAUNCH")
RPGA B 2 bright A_FireCustomMissile ("NormalRocket",0,1,9,-2)
RPGA C 2 bright
RPGA DEFEDHG 2
RPGA A 8
RPGA A 0 A_PlayWeaponSound("RPGOPN")
RPGA IJKLM 2
RPGA M 7
RPGA A 0 A_PlayWeaponSound("RPGLAD")
RPGA NOON 2
RPGA M 7
RPGA A 0 A_PlayWeaponSound("RPGOCLS")
RPGA MLKJI 2
RPGA A 4
RPGA A 0 A_ReFire
Goto ready
HSFire:
RPGA A 1 A_JumpIfInventory("WeaponHSMode",0,"Fire")
NULL A 0 A_PlayWeaponSound("SEEKLAUNCH")
RPGA B 2 bright A_FireCustomMissile ("seekerRocket",0,1,9,-2)
RPGA C 2 bright
RPGA DEFEDHG 2
RPGA A 8
RPGA A 0 A_PlayWeaponSound("RPGOPN")
RPGA IJKLM 2
RPGA M 7
RPGA A 0 A_PlayWeaponSound("RPGLAD")
RPGA NOON 2
RPGA M 7
RPGA A 0 A_PlayWeaponSound("RPGOCLS")
RPGA MLKJI 2
RPGA A 4
RPGA A 0 A_ReFire("Fire")
Goto ready
Spawn:
RPGA Z -1
Stop
}
}
THIS STUCKS WHEN THE HEATSEEK MODE IS IN THE IVNENTORY
Is there any saving grace for it?
Share this post
Link to post
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.