FredSRichardson Posted January 3, 2006 Share Posted January 3, 2006 Here's the prototype I saw in IESDP (just for reference): 0x40A9 NearLocation(O:Object*,I:PointX*,I:PointY*,I:Range*) I was just wondering if anyone knows how this trigger works. I decompiled a script with WeiDU and saw it used in this context: IF See("1000_Goblin_06",0) // 1000_Goblin_06 NearLocation(LastSeenBy(Myself),-2,-2,9) THEN RESPONSE #100 EquipWeapon() AttackOneRound(LastMarkedObject) END I was wondering about the negative numbers used here. Doesn't seem like it could be an absolute location, could it be relative to "Myself"? I'm just curious is all Link to comment
Avenger Posted January 3, 2006 Share Posted January 3, 2006 Here's the prototype I saw in IESDP (just for reference): 0x40A9 NearLocation(O:Object*,I:PointX*,I:PointY*,I:Range*) I was just wondering if anyone knows how this trigger works. I decompiled a script with WeiDU and saw it used in this context: IF See("1000_Goblin_06",0) // 1000_Goblin_06 NearLocation(LastSeenBy(Myself),-2,-2,9) THEN RESPONSE #100 EquipWeapon() AttackOneRound(LastMarkedObject) END I was wondering about the negative numbers used here. Doesn't seem like it could be an absolute location, could it be relative to "Myself"? I'm just curious is all <{POST_SNAPBACK}> Curious, i wonder why it isn't simply a Range(LastSeenBy(Myself),9,LESS_THAN) Link to comment
FredSRichardson Posted January 3, 2006 Author Share Posted January 3, 2006 Here's the prototype I saw in IF  See("1000_Goblin_06",0)  // 1000_Goblin_06  NearLocation(LastSeenBy(Myself),-2,-2,9) THEN  RESPONSE #100   EquipWeapon()   AttackOneRound(LastMarkedObject) END <{POST_SNAPBACK}> Curious, i wonder why it isn't simply a Range(LastSeenBy(Myself),9,LESS_THAN) <{POST_SNAPBACK}> Any idea about those negative indexes to NearLocation? Is this going to mean something like "within 9 of the upper right hand corner of the map"? Link to comment
devSin Posted January 4, 2006 Share Posted January 4, 2006 Negative numbers should indicate a location relative to the object running the script (I guess; in normal IE, this is usually the effect, but it depends on which object and which call). -2.-2 would be a location to the upper-left of the object (+2 north, +2 west, unless it goes in the other direction for some reason). As Avenger says, without context, there's no way to know what exactly they're trying to accomplish by checking if LastSeenBy() is 9 feet away from the point a few feet away from the active object. Shit like this happens when you let engine programmers do technical design. Link to comment
FredSRichardson Posted January 4, 2006 Author Share Posted January 4, 2006 Okay, thanks! I was thinking that negative numbers must mean realtive postition but wasn't sure. From looking at the script, it looks like this is used as a way to keep the Actor from attacking an enemy unless the enemy is pretty close. It does seem like Range() would have made a lot more sense than NearLocation in this instance (but perhaps there's a subtle difference?) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.