[SOLVED] _RailAttack is always cause alert when hit

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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 Reply
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

[SOLVED] _RailAttack is always cause alert when hit

Post by Void Weaver »

Have exactly same trouble, and do bump it since it wasn't solved or fixed.

My code:

Code: Select all

Actor GuidedLauncher : Weapon replaces RocketLauncher
{
Weapon.Kickback 100
Weapon.SelectionOrder 2500
Weapon.SlotNumber 5
Weapon.AmmoUse 1
Weapon.AmmoGive 2
Weapon.AmmoType "RocketAmmo"
Inventory.PickupMessage "You picked up a guided rocket launcher."
+WEAPON.NOAUTOFIRE
+WEAPON.NOALERT
+WEAPON.NOAUTOAIM

States
{
Ready:
MISG A 1 
{
A_RailAttack(0,0,0,"None","Red",1,0,"FakeLaser",0,0,16384,1,frandom(0.5,1.5),0); //Always alerts monster which got hit
//A_FireBullets(0,0,1,0,"FakeLaser",FBF_NORANDOMPUFFZ); //Never alerts monster which got hit
A_WeaponReady;
}
Loop
}
}

Actor FakeLaser
{
VSpeed 0
Damage (0)
Speed 0
Radius 0
Height 0
+NODAMAGETHRUST
-CAUSEPAIN
-FORCEPAIN
+PAINLESS
+NOINTERACTION
+NOBLOCKMAP
+NOGRAVITY
+BLOODLESSIMPACT
+ALWAYSPUFF
+PUFFONACTORS
+DONTSPLASH
States
{
Spawn:
PLSE EE 1 Bright
Stop
}
}
I guess that _RailAttack doesn't cause pain (because in that way monster would got painlocked) but someway alert monster who's got hit by rail. Can it be avoided or fixed?
Last edited by Void Weaver on Wed Jun 19, 2019 6:08 pm, edited 1 time in total.
Blue Shadow
Posts: 5040
Joined: Sun Nov 14, 2010 12:59 am

Re: _RailAttack is always cause alert when hit. It's a bug?

Post by Blue Shadow »

In my test, using your code, monsters were not alerted when got hit by the rail.

I'm using GZDoom 4.1.3, if that matters.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: _RailAttack is always cause alert when hit. It's a bug?

Post by Void Weaver »

Oh... Yep, seems this was fixed in 3.7.3 or later, because in 4.0 a 0-damage _RailAttack doesn't alerts monsters, but does it in 3.7.0-3.7.2.
Thank you very much. ^_^
Post Reply

Return to “Scripting”