Shooting Linedef Trigger question

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
RedFoxGamer
Posts: 12
Joined: Mon Nov 19, 2018 1:10 am

Shooting Linedef Trigger question

Post by RedFoxGamer »

Hello,

Is it possible for the shooting trigger for linedefs, to have it execute a script to check if the linedef (in my case a door) was hit by a specific projectile and then do something from that, but do nothing if it was shot with anything else.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Shooting Linedef Trigger question

Post by Blue Shadow »

Add the [wiki=Map_definition#MissilesActivateImpactLines]MissilesActivateImpactLines[/wiki] to your map's definition in MAPINFO, and I suppose you can do a [wiki=CheckActorClass]class check on the projectile[/wiki]:

Code: Select all

script 1 (void)
{
    if (CheckActorClass(0, "PlasmaBall"))
    {
        // Do stuff
    }
} 
If you are trying to figure out how to set up a line so that its special is activated upon being shot, then that's for someone else to teach you.
RedFoxGamer
Posts: 12
Joined: Mon Nov 19, 2018 1:10 am

Re: Shooting Linedef Trigger question

Post by RedFoxGamer »

Yeah that looks like it might work. I’ll give that a try when I can.
Post Reply

Return to “Scripting”