Jump to content

IWD2: Trigger Farthest()


Gimble

Recommended Posts

Farthest() doesn't work, as best I can tell. It would be appreciated if the trigger was added to IESDP with a note stating that it doesn't seem to work. Code used to test was as follows:

IF
Range(Player1,1,LESS_THAN)
!TimerActive(66)
THEN
RESPONSE #100
	FloatMessage(Player1,1) // Ettin
	Continue()
END

IF
Range(Player1,1,LESS_THAN)
See(Farthest([PC]),0)
!TimerActive(66)
THEN
RESPONSE #100
	FloatMessage(LastMarkedObject,2) // Beetle
	Continue()
END

IF
!TimerActive(66)
THEN
RESPONSE #100
	StartTimer(66,ONE_ROUND)
END

Link to comment
Could you write more how you used it?
Simply put, it always puts "Ettin" over Player1's head, and puts "Beetle" over the nearest visible PC to Player1, assuming all PCs are visible and all PCs are within sight range of Player1.

 

If Player1 is moved away from the other PCs, then nothing appears over the other PCs head, as expected.

 

A simpler test, that moves Player1 to the nearest PC in sight, is as follows:

IF
Range(Player1,1,LESS_THAN)
!TimerActive(66)
THEN
RESPONSE #100
	StartTimer(66,7)
	FloatMessage(Myself,17571) // Leader
	MoveToObject(Farthest([PC]))
END

If "Farthest" worked as I would expect, it would have him moving at each timer expiration to the farthest PC (assuming the PC could be seen). However, this snippet always moves him to the nearest PC instead (assuming all PCs are in sight range and are visible).

Link to comment

It is quite funny that whenever i think something might be tough to implement in GemRB, it turns out it doesn't work in IE. (Though i implemented farthest, it took some refactoring).

 

Is there any place in the original game where this object is used?

Link to comment

Archived

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

×
×
  • Create New...