Page 1 of 1

Trouble with powerup giver giving multiple power-up types.

Posted: Thu Dec 21, 2017 12:53 pm
by Amuscaria
Trying to make a power-up that gives the Speed, HighJump, and DoubleFiringSpeed power-ups at the same time, but only the DoubleFiringSpeed is given despite the Pickup state giving the other 2. Not sure why it's not working.

Code: Select all

actor ChronoSpeed : PowerupGiver //used for ChronoSphere
{
  powerup.type "Speed"
  powerup.duration 1050
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
    TNT1 A 1 Bright
    loop
  }
}

actor ChronoJump : PowerupGiver //used for ChronoSphere
{
  powerup.type "HighJump"
  powerup.duration 1050
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
    TNT1 A 1 Bright
    loop
  }
}

actor ChronoSphere : PowerupGiver 5215
{
  inventory.pickupmessage "Speedy!"
  inventory.pickupsound "misc/p_pkup"
  powerup.color "Cyan" 0.15
  powerup.type "DoubleFiringSpeed"
  powerup.duration 1050
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  states
  {
  Spawn:
    TIME ABCD 6 Bright
    loop
  Pickup:
	TIME A 0 Bright A_GiveInventory("ChronoSpeed",1)
	TIME A 0 Bright A_GiveInventory("ChronoJump",1)
	stop
  }
}

Re: Trouble with powerup giver giving multiple power-up type

Posted: Thu Dec 21, 2017 12:55 pm
by phantombeta
You need to inherit from CustomInventory to use the Pickup and Use states.

Re: Trouble with powerup giver giving multiple power-up type

Posted: Thu Dec 21, 2017 1:16 pm
by Amuscaria
Nvm. Problem fixed. I had to inherit from CustomInventory instead of PowerUpGiver.