Jump to content

Condition "Party in combat"


Salk

Recommended Posts

Hello!

 

This block for DPLAYER3.BCS:

 

IF
	GlobalTimerExpired("#GBhaalSleep","LOCALS")
	Global("#GBhaalHP1","LOCALS",1)
	Detect([EVILCUTOFF])
	ActuallyInCombat()
THEN
	RESPONSE #100
			SetGlobalTimer("#GBhaalSleep","LOCALS",4)
			ReallyForceSpellRES("#GBHAA2",Myself) // No such index
END

 

returns true only if the enemies are close enough to the protagonist. How do I extend this so that it returns true for any party member that are in combat?

 

Thanks!

Link to comment

Just remove the Detect([200]). That will only be true if the character running the script is within visual range of an enemy (in your case, only Player1).

 

ActuallyInCombat() just returns true if the game is in combat mode. It'll be true if any party member is fighting somebody.

 

Note that combat can sometimes get stuck, so it won't be the most reliable thing.

Link to comment
you could use combatcountergt (0 or -45?), but iesdp says it's unreliable.

ActuallyInCombat is doing something like that. As DevSin said, the detect trigger limits the condition to visible range of the actual script runner.

Link to comment

Tested and working!

 

With:

 

 

		OR(2)
	 Detect([EVILCUTOFF])
	 ActuallyInCombat()

 

I cover both situations where the enemies are in visual range of Player1 and when the fighting is instead beyond that point.

Link to comment

Archived

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

×
×
  • Create New...