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

Conditional WEAPON.NOALERT

Recommended Posts

Hello Doomers,

 

I have been creating a resource archive so that I can create a set of levels that have a distinctive feel ect. One of the weapons I created I want to be to be silent in one mode and loud in the next. Is there any way to make weapon flags conditional so that one fire mode will alert enemies and the other will not?

Share this post


Link to post

Use Weapon.NOALERT for the weapon, and for the alternate fire have a frame call A_AlertMonsters.

Share this post


Link to post

You are a gentleman and a scholar. Still I'm wrestling with this, my first attempt did not work. It looks like this:

 

ACTOR IronFist : GauntletsPowered
{
    Weapon.NOALERT
   -POWERED_UP
   Inventory.PickupMessage "Iron Fists"
   states
   {
   Spawn:
    WFIS A 3
    loop
   Select:
    FPCH A 1 A_Raise
    Loop
  Deselect:
    FPCH A 1 A_Lower
    Loop
  Ready:
    FPCH A 1 A_WeaponReady
    Loop
  Fire:
    FPCH B 5 Offset(5, 40)A_AlertMonsters
    FPCH C 4 Offset(5, 40)
    FPCH D 4 Offset(5, 40) A_CustomPunch (10)
    FPCH C 4 Offset(5, 40)
    FPCH B 5 Offset(5, 40)
    Goto Ready
  Hold:    
    FPCH B 5 Offset(5, 40)
    FPCH C 4 Offset(5, 40)
    FPCH D 4 Offset(5, 40) A_CustomPunch (10)
    FPCH C 4 Offset(5, 40)
    FPCH B 5 Offset(5, 40) A_ReFire
  AltFire:
    NAUJ J 0 A_Ale rtMonsters
    NAUN J 4 A_PlayWeaponSound("weapons/gauntletsuse")
    NAUN K 4
  AltHold:
    NAUN L 3 Bright A_GauntletAttack(1)
    NAUN L 0 A_PlayWeaponSound("weapons/gauntletszap")
    NAUN M 4 A_Light0
    NAUN N 3 A_ReFire
    Goto Ready
    }
}

 

This Just makes GZDoom crash,

Script error, "experiment.wad:IRONFIST" line 3: '@property@weapon.noalert' is an unknown actor property.

I am stunned. What do you think is happening?

 

 

Share this post


Link to post

You have to put a + or - before a flag, otherwise it's recognised as a (non-existent) property.

 

+Weapon.NOALERT

 

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
×