Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
CaptainManiac

Reload offsets confusion.How i believe myself that i can.Shite

Question

MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",2,14)
 MISG B 0 A_JumpIfInventory("RLauncherSHots",3,14)
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("RocketAmmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto Ready
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready

 

 

so this is the reload state.I need for the classic Rocket launcher to reload after 5 shots and less and reload whenever there is 1 to 5 shots,but shit,how can I make sure the needed offset is reached and he frame won't fall too far or too close or pass the targer frames.I am so stupid.an someone help me with this confusion?

Share this post


Link to post

11 answers to this question

Recommended Posts

  • 0
Spoiler

 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",2,"MyLabel1")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",3,"MyLabel2")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready
MyLabel1:
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("RocketAmmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto Ready
MyLabel2:
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready 

 

 

Share this post


Link to post
  • 0
19 minutes ago, scifista42 said:
  Hide contents


 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",2,"MyLabel1")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",3,"MyLabel2")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready
MyLabel1:
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("RocketAmmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto Ready
MyLabel2:
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready 

 

 

This be likE?Thanks.Maybe this is better than offsetting.Thanks so much

Share this post


Link to post
  • 0

@scifista42 I see a logic error: MISG B 0 A_JumpIfInventory("RLauncherSHots",2,"MyLabel1") will jump to MyLabel1 if there are 3 RLauncherSHots because 3 >= 2, so you will never get to MyLabel2 because you can only get to the next line if there are 0 or 1 RLauncherSHots. Swapping those two lines will fix that problem.

Share this post


Link to post
  • 0

@scifista42 @Empyre i made logical blocks for all cases from one to four shots ans left the original reload state reload the maximum shots.But i wanna prevent the rocket ammo to be wasted when firing because it seems that an ammo is depleted when firing and also in reloading.I need to prevent it from depleting when firing.How?

Share this post


Link to post
  • 0

In the section where you are declaring flags and stuff before the states:

weapon.ammouse 0

Share this post


Link to post
  • 0

Fo

Just now, CaptainManiac said:

just this for both fire and altfire?

For altfire:

weapon.ammouse2 0

Share this post


Link to post
  • 0

I did it.I will do it also for the revolver.I did it the same with multiple reload states for each shot from 1 to 6,state for just one shot to all 6 shots.

Share this post


Link to post
  • 0

Reload:
RVLV A 0 A_JumpIfInventory("HasAlreadyreloaded",1,"Ready")
RVLV A 0 A_JumpIfInventory("RevolverShots",1,"ReloadOneSHot")
RVLV A 0 A_JumpIfInventory("RevolverShots",2,"Reload2SHots")
RVLV A 0 A_JumpIfInventory("RevolverShots",3,"Reload3SHots")
RVLV A 0 A_JumpIfInventory("RevolverShots",4,"Reload4SHots")
RVLV A 0 A_JumpIfInventory("RevolverShots",5,"Reload5SHots")
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto Ready
ReloadOneSHot:
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto Ready
Reload2Shots:
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto Ready
Reload3Shots:
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto Ready
Reload4Shots:
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto ready
Reload5SHots:
RVLV A 2 offset(0,10)
RVLV A 2 offset(0,20) A_TakeInventory("RevolverSHots")
RVLV A 2 offset(0,20) A_ClearRefire
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,30) A_TakeInventory("Clip",1)
RVLV A 2 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
RVLV A 2 offset(0,20)
RVLV A 2 offset(0,10)
goto Ready

 

I applied a reload to the revolver(the one from Powerslave) and it seems that after one shot it wastes more ammo than from more of the shots.

Share this post


Link to post
  • 0

actor RocketLauncher2 :RocketLauncher Replaces RocketLauncher
{
Inventory.PickupSound "You got the military Rocket Launcher!"
Weapon.AmmoGive 30
Weapon.AMmoUse1 0
Weapon.AmmoUse2 0
Weapon.AmmoType2 "Rocketammo"
States
{
Ready:
 MISG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
 loop
FIre:
 MISG B 0
 MISG B 0 A_TakeInventory("HasAlreadyReloaded")
 MISG B 0 A_GiveInventory("RLauncherSHots",1)
 MISG B 0 A_ChangeFlag("NoAutoFire",1)
 MISG B 8 A_GunFlash
 MISG B 12 A_FireMissile
 MISG B 0 A_ReFire
 MISG B 0 A_JumpIfInventory("RLaucherShots",0,"Reload")
 goto Ready
AltFire:
 MISG B 0
 MISG B 0 A_TakeInventory("HasAlreadyReloaded")
 MISG B 0 A_JumpIfInventory("RLauncherShots",1,"AltFire2")
 MISG B 0 A_GiveInventory("RLauncherShots",1)
 MISG B 0 A_ChangeFlag("NoAutoFire",0)
 MISG B 4 A_GunFlash
 MISG B 6 A_FireMissile
 MISG B 0 A_Refire
 goto ready
AltFire2:
 MISG B 0
 MISG B 0 A_JumpIfInventory("RLauncherShots",2,"AltFire3")
 MISG B 0 A_GiveInventory("RLauncherShots",1)
 MISG B 0 A_ChangeFlag("NoAutoFire",0)
 MISG B 4 A_GunFlash
 MISG B 6 A_FireMissile
 MISG B 0 A_Refire("AltFIre")
 goto ready
AltFire3:
 MISG B 0
 MISG B 0 A_ChangeFlag("NoAutoFire",0)
 MISG B 4 A_GunFlash
 MISG B 6 A_FireMissile
 MISG B 0 A_Refire("AltFire")
 MISG B 0 A_JumpIfInventory("RLauncherShots",2,"Reload")
 goto ready
Reload:
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",1,"ReloadOneSHot")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",2,"Reload2SHots")
 MISG B 0 A_JumpIfInventory("RLauncherSHots",3,"Reload3Shots")
 MISG B 0 A_JUmpIfInventory("RLauncherSHots",4,"Reload4SHots")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready
 ReloadOneShot:
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto Ready
 Reload2Shots:
 MISG B 0 A_JumpIfInventory("HasAlreadyReloaded",1,"Ready")
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("RocketAmmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto Ready
 Reload3SHots:
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready
 Reload4SHots:
 MISG B 4
 MISG B 4 offset(0,10)
 MISG B 4 offset(0,20)
 MISG B 4 Offset(0,30) A_ClearRefire
 MISG B 4 offset(0,30) A_TakeInventory("RLauncherSHots")
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,30) A_TakeInventory("ROcketAMmo",1)
 MISG B 4 offset(0,20) A_GiveInventory("HasAlreadyReloaded")
 MISG B 4 offset(0,10)
 MISG B 4
 goto ready

 

 

also after two shots this seems to reload and take one rocket into the cartridge not two.Why?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×