Weapon won't Pickup *SOLVED*

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Falcon
Posts: 70
Joined: Tue Jul 14, 2015 3:02 pm
Location: Australia

Weapon won't Pickup *SOLVED*

Post by Falcon »

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 all

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 6:36 am, edited 1 time in total.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Weapon won't Pickup

Post by Blue Shadow »

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
Falcon
Posts: 70
Joined: Tue Jul 14, 2015 3:02 pm
Location: Australia

Re: Weapon won't Pickup

Post by Falcon »

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 all

// 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
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Weapon won't Pickup *SOLVED*

Post by Blue Shadow »

That file defines the sprites of the weapon. So in a way, the sprites were indeed missing. :)
User avatar
Falcon
Posts: 70
Joined: Tue Jul 14, 2015 3:02 pm
Location: Australia

Re: Weapon won't Pickup *SOLVED*

Post by Falcon »

haha guess i'll have to give you that :wink:
Post Reply

Return to “Scripting”