Find out "how a script has been activated"
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.
- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Find out "how a script has been activated"
Hey friends, I have a question regarding the activation of an ACS script. If I have a line that runs a script and can be activated both by a projectile crossing the line and a player crossing the line, how can I determine in the script itself how it has been activated to do different actions?
- Kappes Buur
-
- Posts: 4179
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: Find out "how a script has been activated"
That returns how to activate a line, not how it has been activated. I'd go with ClassifyActor, too.
Also, it seems there's no function to actually determine how a line was activated. ClassifyActor helps you determine "what" did, but it couldn't help you discern between player bumps and player uses.
Also, it seems there's no function to actually determine how a line was activated. ClassifyActor helps you determine "what" did, but it couldn't help you discern between player bumps and player uses.
- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: Find out "how a script has been activated"
This is my problem. I actually need to differ between "player using a switch" or "player punching a switch" - how would I do that? ClassifyActor doesn't seem to be the solution for this case.KeksDose wrote:That returns how to activate a line, not how it has been activated. I'd go with ClassifyActor, too.
Also, it seems there's no function to actually determine how a line was activated. ClassifyActor helps you determine "what" did, but it couldn't help you discern between player bumps and player uses.
Re: Find out "how a script has been activated"
I don't recall if the player or the puff/projectile acts as the script activator in ACS, but if it's the puff/projectile you can just go if(GetActorClass(0)=="MyPunchPuff") { stuff} else {other stuff}I think