Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
A_D_M_E_R_A_L

Screen flash when picking up a key, how to do that?

Question

4 answers to this question

Recommended Posts

  • 0

DECORATE code:

actor DummyKeyPowerup : Powerup {
  Powerup.Duration 20
  Powerup.Color "FF 00 00", 0.5
}
actor DummyKeyPickup : CustomInventory {
  +INVENTORY.NOSCREENFLASH
  Inventory.PickupMessage "You got the red keycard."
  States {
    Spawn:
      RKEY A -1
      stop
    Pickup:
      TNT1 A 0 A_GiveInventory("RedCard")
      TNT1 A 0 A_GiveInventory("DummyKeyPowerup")
      stop
  }
}

If you put DummyKeyPickup into your map, then upon being picked up, it will flash red and give the red keycard to the player.

Edited by scifista42

Share this post


Link to post
  • 0

You might do this with INVENTORY.PickupFlash, but I'm not sure if the PickupFlash actor can have customizable color. If not, define a Powerup with short duration and a specific display color, and a CustomInventory item that looks like the key and gives both the key and the powerup to the player, and place this custom inventory item into the map instead of the key itself.

Share this post


Link to post
  • 0
4 hours ago, scifista42 said:

You might do this with INVENTORY.PickupFlash, but I'm not sure if the PickupFlash actor can have customizable color. If not, define a Powerup with short duration and a specific display color, and a CustomInventory item that looks like the key and gives both the key and the powerup to the player, and place this custom inventory item into the map instead of the key itself.

An example maybe?

Share this post


Link to post
  • 0
13 hours ago, scifista42 said:

DECORATE code:


actor DummyKeyPowerup : Powerup {
  Powerup.Duration 20
  Powerup.Color "FF 00 00", 0.5
}
actor DummyKeyPickup : CustomInventory {
  +INVENTORY.NOSCREENFLASH
  Inventory.PickupMessage "You got the red keycard."
  States {
    Spawn:
      RKEY A -1
      stop
    Pickup:
      TNT1 A 0 A_GiveInventory("RedCard")
      TNT1 A 0 A_GiveInventory("DummyKeyPowerup")
      stop
  }
}

If you put DummyKeyPickup into your map, then upon being picked up, it will flash red and give the red keycard to the player.

I want this to replace regular keys

 

EDIT: Ok nvm, I got it to work.

Edited by A_D_M_E_R_A_L

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×