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.
Question 1: how can I determine that a thing with a TID of 3 has crossed a linedef (i.e.: a monster has entered a room and I want to execute a script)?
Question 2: I used the code below to try and make a crusher which slows down, but it doesn't work (keeps going at the same speed).
Q1: ACS has a function 'activatortid()' for exactly that purpose.
Q2: What you attempt is not possible. Once you start a crusher in a sector there is no way to create a new one because you cannot delete the old one.
I knew #2 was something like that, but had forgotten. Stopping a crusher with either a line special or ACS command only pauses the action. The ceiling of that sector is considered to have an action for the rest of the level and cannot be told to do anything else, including changing to a different type of crusher.
You have to give the line either a monster cross activation type (if the player should not be able to activate the line) or set the flag 'Monsters can activate' (if the player should be able to.)
So, you'd just make a walk-repeatable line that monsters can activate, then check the TID of the activator. If it's the right one, you could clear the line's special and do whatever else you want to happen. If it's not, you can just terminate the script, leaving the line special intact for the next monster to cross it. Also, make sure to use ExecuteAlways if its crucial that a monster crossing the line with the right TID executes the script every time. Otherwise two monsters (one with TID, one without) crossing at near the same time might cause the script to not trigger for the right one.
I couldn't find the "mosnters crosses" activation in WA... because it was the first one in the listbox without a scrollbar; I thought it coudn't go up any higher . So I did it now and it doesn't work; attached below.
It may be that barrels cannot trigger monster-cross lines because they're not monsters. Try setting the "counts as kill" flag and see if that helps. (Of course this will also upset the totals..)
HotWax wrote:It may be that barrels cannot trigger monster-cross lines because they're not monsters. Try setting the "counts as kill" flag and see if that helps. (Of course this will also upset the totals..)
No it won't. You have to set the MCROSS flag for them to trigger the line.