[SOLVED]Odd script failure

Discuss all aspects related to modding Zandronum here.
Post Reply
Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

[SOLVED]Odd script failure

#1

Post by Krispy » Thu Mar 21, 2013 7:27 pm

I was hoping someone on this forum might know what's going on here. I've been testing this map with Zandronum and made it in ZDoom (Doom in Hexen format).

Code: Select all

script 7 (void)

{
    giveinventory("seekerswitch",1);
    giveinventory("SeekerPistol",1);
}
It successfully gives the player the "SeekerSwitch," but not the "SeekerPistol." This only happens online. I've also noticed that bots seem to gain the gun, but not me. Here's the "SeekerPistol:"

Code: Select all

ACTOR SeekerPistol : DoomWeapon 5010
{
  Game Doom
  Weapon.SelectionOrder 1900
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  Weapon.AmmoType "Clip"
  Obituary "%0 done got %pself found by %k!"
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
  Tag "$TAG_PISTOL"
  States
  {
  Ready:
    PISG A 1 A_WeaponReady
    Loop
  Deselect:
    PISG A 1 A_Lower
    Loop
  Select:
    PISG A 1 A_Raise
    Loop
  Fire:
    PISG A 4 A_JumpIfTargetInLOS(1)
	Goto Ready // Can't fire, go back to ready
    PISG B 6 A_FirecustomMissile ("SeekerBall")
    PISG C 4
    PISG B 5 A_ReFire
    Goto Ready
  Flash:
    PISF A 7 Bright A_Light1
    Goto LightDone
    PISF A 7 Bright A_Light1
    Goto LightDone
  Spawn:
    PIST A -1
    Stop
  }
}
Last edited by Krispy on Sat Mar 23, 2013 12:15 am, edited 1 time in total.

User avatar
Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Odd script failure

#2

Post by Ijon Tichy » Thu Mar 21, 2013 9:13 pm

does it have a a slot number in keyconf?

TheMisterCat
 
Posts: 79
Joined: Mon Jun 04, 2012 2:21 pm
Location: NZ

RE: Odd script failure

#3

Post by TheMisterCat » Thu Mar 21, 2013 11:19 pm

need more info. where/how is this script called? also are they defined in keyconf OR have you used the player properties for weapon slots in player decorate? are you able to summon both guns as pickups or give them from console?
Last edited by TheMisterCat on Thu Mar 21, 2013 11:21 pm, edited 1 time in total.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Odd script failure

#4

Post by Krispy » Fri Mar 22, 2013 12:44 am

To answer your questions: Yes, I defined the slot in Keyconf, and in the player class' decorate, and in the weapon decorate. This just led me to discover that I was receiving the gun, it just wasn't being switched to, for some reason. So now there's that problem to solve. The "SeekerSwitcher is an inventory item that changes the player's class. When they get the gun (which is assigned to weapon slot #2), they have absolutely no other weapons. Which is why I find it odd that the gun isn't automatically switched to.

User avatar
Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Odd script failure

#5

Post by Ijon Tichy » Fri Mar 22, 2013 1:29 am

if by "changes class" you mean "morphs the player", then of course it won't work; morphed actors can't switch weapons!

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Odd script failure

#6

Post by Krispy » Fri Mar 22, 2013 6:56 pm

But that's just the thing: I can switch to it after I get it, but I'd like it to do so automatically. In case you don't get what I mean, the "SeekerPistol" is the only weapon that the player has. Yes, the player is morphed btw.

EDIT: I solved this with a short delay followed by "setweapon." Thanks for your help everyone.
Last edited by Krispy on Sat Mar 23, 2013 12:15 am, edited 1 time in total.

Post Reply