If web was a door, and the shot was granted exclusive rights to -- you know what?
It's really late where I am, and I have a final due in the morning, so I'm gonna go work on that, and have you childish and idiotic peons work this out for me ask the helpful, lovely community take a look at this if they could:
Is there a way to detect a specific class of projectile, such as, say, a missile or a beam, to trigger a linedef, such as, say, opening a door? The thing is, it must NOT be triggered by other types of projectiles.
Basically, if somebody could get a door to open by the plasma rifle but not by the shotgun or the rocket launcher, I will mail you a post-card saying whatever you want on it.
How Do I Shot Web?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: How Do I Shot Web?
[wiki]CheckWeapon[/wiki] ACS function might do what you want.
Re: How Do I Shot Web?
The only problem with CheckWeapon you might run into is if the player happens to switch weapons before the projectile connects. I managed to work around this. From Mage's Arsenal:
Spoiler:There are 2 problems with the above code though. You must have "missilesactivateimpactlines" enabled and I haven't tested it with hitscan attacks (you might be able to do it with the bulletpuff?).
Re: How Do I Shot Web?
Would it also be a problem if something else (e.g. an enemy) had a stray shot that hit the web while the player just happened to have the correct weapon readied or does CheckWeapon only check the script activator's inventory?jpalomo wrote:The only problem with CheckWeapon you might run into is if the player happens to switch weapons before the projectile connects.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: How Do I Shot Web?
According the source code, there's a check for non-player actors:
Code: Select all
case PCD_CHECKWEAPON:
if (activator == NULL || activator->player == NULL || // Non-players do not have weapons
activator->player->ReadyWeapon == NULL)
{
STACK(1) = 0;
}
else
{
STACK(1) = activator->player->ReadyWeapon->GetClass()->TypeName == FName(FBehavior::StaticLookupString (STACK(1)), true);
}
break;
- BloodyAcid
- Posts: 372
- Joined: Thu Jul 26, 2012 10:28 pm
- Location: Canadia
Re: How Do I Shot Web?
Here's my [censored word] solution that doesn't work:
Spoiler:
Re: How Do I Shot Web?
I just googled your project and this is pretty much EXACTLY what I am going to do xD. The concept for Metroid Prime is the way that Heretic was presented to me. I was dissapointed, and now I want to make a wad to show what I thought Heretic would be.jpalomo wrote:The only problem with CheckWeapon you might run into is if the player happens to switch weapons before the projectile connects. I managed to work around this. From Mage's Arsenal:Spoiler:There are 2 problems with the above code though. You must have "missilesactivateimpactlines" enabled and I haven't tested it with hitscan attacks (you might be able to do it with the bulletpuff?).
I'm thinking about making a script that works with HateTarget and manually open the door that way. What do you think? this could only be made more useful by
a.)
not having the bullet target IN the actual doorway or
b.)
somehow making
The setup:
Spoiler: