Trouble with powerup giver giving multiple power-up types.

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Trouble with powerup giver giving multiple power-up types.

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

by Amuscaria » Thu Dec 21, 2017 1:16 pm

Nvm. Problem fixed. I had to inherit from CustomInventory instead of PowerUpGiver.

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

by phantombeta » Thu Dec 21, 2017 12:55 pm

You need to inherit from CustomInventory to use the Pickup and Use states.

Trouble with powerup giver giving multiple power-up types.

by Amuscaria » Thu Dec 21, 2017 12:53 pm

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
  }
}

Top