Weapon won't Pickup *SOLVED*

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Weapon won't Pickup *SOLVED*

Postby Falcon » Wed Nov 07, 2018 5:38 am

I've done weapons before and no probs but with this one the weapon is there on the ground but when you walk over it nothing happens, just won't pickup >:( Any ideas why?
not my code but copied from a pk3 file where it works no probs.

Code: Select allExpand view
actor myRL : RocketLauncher replaces RocketLauncher
{
  Weapon.SlotNumber 5
  Weapon.SelectionOrder 350
  Weapon.BobStyle Alpha
  Weapon.BobRangeX 0.3
  Weapon.BobRangeY 0.5
  Weapon.BobSpeed 2.0
  Weapon.AmmoUse 1
  Weapon.AmmoGive 5
  Weapon.AmmoType "RocketAmmo"
  +AMMO_OPTIONAL
  Inventory.PickupMessage "You got the rocket launcher!"
  Obituary "%k blew %o up"
  states
  {
  Ready:
    MISA A 1 A_WeaponReady
    loop
  Select:
    TNT1 A 0 A_Raise
    MISA A 1 A_Raise
    loop
  Deselect:
    TNT1 A 0 A_Lower
    MISA A 1 A_Lower
    loop
  Fire:
    TNT1 A 0 A_JumpIfNoAmmo("Ready")
    TNT1 A 0 A_PlaySound("weapons/shoot")
    TNT1 A 0 A_FireCustomMissile("LGBTRocket",0,1,0,-4)
    MISF A 1 Bright A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.990)
    TNT1 A 0 A_light1
    TNT1 A 0 Radius_Quake(3,2,0,1,0)
    TNT1 A 0 A_SetPitch(pitch-0.35)
    MISF B 1 Bright A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.980)
    TNT1 A 0 A_light2
    TNT1 A 0 A_SetPitch(pitch-0.35)
    MISF C 1 Bright A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.970)
    TNT1 A 0 A_light1
    TNT1 A 0 A_SetPitch(pitch-0.35)
    MISF D 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.975)
    TNT1 A 0 A_light0
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF E 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.980)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF F 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.985)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF G 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.990)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF H 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(0.995)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF I 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_ZoomFActor(1.0)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISF J 1 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    TNT1 A 0 A_SetPitch(pitch+0.15)
    MISA A 10 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
    goto Ready
  Spawn:
    MISP A -1
    stop
    }
}
Last edited by Falcon on Wed Nov 07, 2018 7:36 am, edited 1 time in total.
User avatar
Falcon
 
Joined: 14 Jul 2015
Location: Australia

Re: Weapon won't Pickup

Postby Blue Shadow » Wed Nov 07, 2018 6:16 am

Falcon wrote:not my code but copied from a pk3 file where it works no probs.

Did you copy the sprites, too? Because you need them.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: Weapon won't Pickup

Postby Falcon » Wed Nov 07, 2018 7:06 am

Yes of course :)

ahh found the problem.
In the pk3 main directory there was a 'TEXTURES.RocketLauncher.txt' file there so i put that in my pk3 file too and now it picks up :)

Code: Select allExpand view
// Texture definitions generated by SLADE3
// on Sat Sep 16 12:13:12 2017

Sprite MISAA0, 600, 300
{
   Offset 125, 80
   Patch MIS01, 246, 169
}

Sprite MISFA0, 600, 300
{
   XScale 0.970
   YScale 0.970
   Offset 125, 80
   Patch MIS03, 237, 164
}

Sprite MISFB0, 600, 300
{
   XScale 0.940
   YScale 0.940
   Offset 125, 80
   Patch MIS04, 232, 152
}

Sprite MISFC0, 600, 300
{
   XScale 0.910
   YScale 0.910
   Offset 125, 80
   Patch MIS05, 227, 150
}

Sprite MISFD0, 600, 300
{
   XScale 0.880
   YScale 0.880
   Offset 125, 80
   Patch MIS06, 222, 149
}

Sprite MISFE0, 600, 300
{
   XScale 0.850
   YScale 0.850
   Offset 125, 80
   Patch MIS02, 218, 159
}

Sprite MISFF0, 600, 300
{
   XScale 0.880
   YScale 0.880
   Offset 125, 80
   Patch MIS02, 223, 165
}

Sprite MISFG0, 600, 300
{
   XScale 0.910
   YScale 0.910
   Offset 125, 80
   Patch MIS02, 227, 170
}

Sprite MISFH0, 600, 300
{
   XScale 0.940
   YScale 0.940
   Offset 125, 80
   Patch MIS02, 232, 171
}

Sprite MISFI0, 600, 300
{
   XScale 0.970
   YScale 0.970
   Offset 125, 80
   Patch MIS01, 241, 174
}

Sprite MISFJ0, 600, 300
{
   Offset 125, 80
   Patch MIS01, 246, 174
}

// End of texture definitions
User avatar
Falcon
 
Joined: 14 Jul 2015
Location: Australia

Re: Weapon won't Pickup *SOLVED*

Postby Blue Shadow » Wed Nov 07, 2018 9:37 am

That file defines the sprites of the weapon. So in a way, the sprites were indeed missing. :)
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: Weapon won't Pickup *SOLVED*

Postby Falcon » Wed Nov 07, 2018 10:58 pm

haha guess i'll have to give you that :wink:
User avatar
Falcon
 
Joined: 14 Jul 2015
Location: Australia


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests