Jump to content

Detect() trigger misconceptions


aVENGER_(RR)

Recommended Posts

The weirdness bit was directed toward the behavior of the Range() trigger. I was under the impression that Range() always respected line of sight but apparently, that is only half-true.

 

Hmm, as it stands, direct object references (i.e. PlayerX) seem to cause non-standard behavior for several triggers. This probably needs further testing.

Link to comment

Range() does not require line of sight -- what you're running into is that this type of object cannot be valid unless it's visible and seen by the calling object (Range([2],30) won't work because there is no [2] unless a living EA PC actor is within visual range and is visible). This isn't a difference in the behavior, just in the fact that [2] is null when you're trying to use it (the engine cannot find any object matching that spec). Remember, every time the engine sees [2], it's picking a brand new object that best matches the spec (in this case, the closest visible PC), regardless of how many times you use it in the same block.

 

You can use a marked (LastSeenBy(), LastAttackerOf(), etc.) or static (Player1, Myself, etc.) object because these are almost always bound (if the creature has ever See()n anybody, for instance, LastSeenBy() is already a valid object and won't change until you See() again). The engine doesn't have to figure out if there's any object that matches, because it already knows who it is.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...