Activator Projectile check?

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!)
User avatar
Ravick
Posts: 2041
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil

Activator Projectile check?

Post by Ravick »

Hi there.

So, I'm making a wall that must be hit by a special projectile (wich TID is 13763) to active a script. It should not work with any other projectile.

I've tried this*:

Code: Select all

If  ((SohUmaVezKCT3==true) && (ActivatorTID()==13763))
But it seems to not get the projectile's TID. Is there a way to a script to check wich projectile hit the wall that did call it?

Thanks in advance!


____
* That 'SohUmaVezKCT3' bool var is alread true when player gets there. I'm sure it is not the problem.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: Activator Projectile check?

Post by Blue Shadow »

It could be that the engine is considering the shooter of the projectile as the activator. Try setting the [wiki=Map_definition#MissilesActivateImpactLines]MissilesActivateImpactLines[/wiki] flag in your map's definition.
User avatar
Ravick
Posts: 2041
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil

Re: Activator Projectile check?

Post by Ravick »

Yes, it was the case. I've used Printbold to see áctivators for the script in different tests, and I could see that the MapSpot that is used to create the projectile via ACS was being considered the activator.

Thanks, Blue Shadow.

Return to “Scripting”