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

Error filling the screen when using a Plasma Rifle replacer.

Recommended Posts

This weapon for my mod that's coded to replace the Plasma Rifle works just fine but a message "State PowerTargeter. 0 not flagged for use in weapons" keeps flooding the screen randomly when it's fired. Code is as follows:

 

Spoiler

ACTOR BacterialGun : PlasmaRifle replaces PlasmaRifle
{
  Weapon.SelectionOrder 100
  Weapon.AmmoUse 1
  Weapon.AmmoGive 50
  Inventory.PickupMessage "Acquired the Bacterial Agent"
  Tag "$TAG_BACTERIALAGENT"
  Weapon.AmmoType "BacterialVial"

      States
  {
  Ready:
    VIRS A 1 A_WeaponReady
    Loop
  Deselect:
    VIRS A 1 A_Lower
    Loop
  Select:
    VIRS A 1 A_Raise
    Loop
  Fire:
    VIRS B 7 A_FirePlasma
    VIRS C 7
    VIRS A 6
    VIRS A 1 A_ReFire
    Goto Ready
  Flash:
    Goto LightDone
  Spawn:
    VIRU A -1
  }
}

 

Share this post


Link to post

Flash:

Goto LightDone

 

Unless this is a part of DECORATE I'm not aware of, where does that lead? there's no "LightDone" Block. also the "Spawn" block is missing a "stop" at the end. Not sure if either of these assist but give them a try. :)

Share this post


Link to post
1 minute ago, DynamiteKaitorn said:

Unless this is a part of DECORATE I'm not aware of, where does that lead? there's no "LightDone" Block. also the "Spawn" block is missing a "stop" at the end. Not sure if either of these assist but give them a try. :)

LightDone is defined by the weapon super class and all weapons have it. Spawn doesn't need a stop because -1 means the frame lasts for infinity, and that doesn't have anything to do with his problem because he's not complaining about his weapon vanishing after it spawns.

Share this post


Link to post

I added that specifically so that it wouldn't add the Plasma Rifle flash over itself as it fires. And yeah, there's no issue with the weapon disappearing. The weapon itself functions 100% as it should, it's just the message that just randomly pops up on the screen that's the issue.

Share this post


Link to post

Oddly, removing the Flash actually did fix it. Now, it's just its own weapon rather than replacing the Plasma Rifle since I defined all of its own aspects anyway.

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
×