Page 1 of 1

[SOLVED]Odd script failure

Posted: Thu Mar 21, 2013 7:27 pm
by Krispy
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
  }
}

RE: Odd script failure

Posted: Thu Mar 21, 2013 9:13 pm
by Ijon Tichy
does it have a a slot number in keyconf?

RE: Odd script failure

Posted: Thu Mar 21, 2013 11:19 pm
by TheMisterCat
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?

RE: Odd script failure

Posted: Fri Mar 22, 2013 12:44 am
by Krispy
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.

RE: Odd script failure

Posted: Fri Mar 22, 2013 1:29 am
by Ijon Tichy
if by "changes class" you mean "morphs the player", then of course it won't work; morphed actors can't switch weapons!

RE: Odd script failure

Posted: Fri Mar 22, 2013 6:56 pm
by Krispy
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.