Avenger Posted April 1, 2005 Share Posted April 1, 2005 Ok, I found no difference among these three triggers. They are working in the same (weird) way. Weirdness include: 1. The range cannot go beyond the normal visibility range (30) 2. The range doesn't bypass obstacles In my opinion these whould apply only to LOS (line of sight). Other weirdness i found: Nearest([PC]) when used from an area trigger (trap), is the trap itself. Since when a trap is a [PC] And, what is the use of Nearest, if [PC] itself will correctly resolve to the nearest PC anyway. Link to comment
SimDing0 Posted April 1, 2005 Share Posted April 1, 2005 I don't think Nearest actually looks at sub-objects. Nearest(whatever) always seems to be the creature running the script. Link to comment
Avenger Posted April 1, 2005 Author Share Posted April 1, 2005 I don't think Nearest actually looks at sub-objects. Nearest(whatever) always seems to be the creature running the script. <{POST_SNAPBACK}> In other words: Nearest is broken beyond repair? (Nearest == Myself) Btw, it wasn't even a creature, it is an area trigger (trap). Link to comment
SimDing0 Posted April 1, 2005 Share Posted April 1, 2005 Yeh, I think Nearest is basically Myself. Totally useless. Link to comment
Echon Posted April 2, 2005 Share Posted April 2, 2005 That certainly explains some of the problems I have had with it. Thanks for the clarification. -Echon Link to comment
devSin Posted April 3, 2005 Share Posted April 3, 2005 I've seen a few cases where Nearest() does something sensible but, as stated, most of the time it just ends up returning Myself. Link to comment
devSin Posted April 3, 2005 Share Posted April 3, 2005 When I was investigating issues with dragon breath spells, I used ReallyForceSpell(Nearest([255]),nnnn). Sometimes it did actually target the nearest enemy, but most of the time it just ended up targeting me. Link to comment
Rastor Posted April 3, 2005 Share Posted April 3, 2005 When I was investigating issues with dragon breath spells, I used ReallyForceSpell(Nearest([255]),nnnn). Sometimes it did actually target the nearest enemy, but most of the time it just ended up targeting me. <{POST_SNAPBACK}> As in targetting Player1 or targetting Myself (the dragon)? I've been having some problems with this one myself. What's the easiest way to target the nearest player character if this doesn't work? Link to comment
Galactygon Posted April 4, 2005 Share Posted April 4, 2005 IF Allegiance(Myself,ENEMY) See([0.0.0.PC]) THEN RESPONSE #100 BreathWeapon(LastSeenBy(Myself)) // Or some other action END -Galactygon Link to comment
devSin Posted April 4, 2005 Share Posted April 4, 2005 As in targetting Player1 or targetting Myself (the dragon)?Player1 (I was doing it from the player script). What's the easiest way to target the nearest player character if this doesn't work?If the PC is an enemy to the creature running the script, you can always try NearestEnemyOfType([2]) and see what that does. Otherwise, you'll probably have to stick with just See([2]) / Action([2]) (or LastSeenBy(Myself), the two are equivalent when used as such, since the game will always evaluate [2] as the last [2] you saw, and won't go checking for another). Anyway, it all depends on what you're trying to do. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.