Jump to content

A reliable way to determine that there's no combat going?


qwerty12345

Recommended Posts

I want to check if there's no combat going (or at least, no enemies are seen). It's in baldur.bcs, so there's no active creature. I used CombatCounterLT(1), and it seemed to work fine… except that in some (rare) areas it doesn't. I tried various others:

OR(5)
 CombatCounterLT(1)
 CombatCounter(0)
 !CombatCounterGT(0)
 !ActuallyInCombat()
 !OnScreen([EVILCUTOFF])

It just fails to work properly. Example area is Trademeet crypt. Is that a known bug? Is there any other trigger overlooked by me that could be used?

 

I suppose I could work around with some invisible creatures, etc, but I'd rather not.

Link to comment

!Exists([EVILCUTOFF]) is the only area-valid check I could think off.

 

But if CombatCounter(0) doesn't work in some rare areas, it seems like an engine quirk to me. Or is it always the same areas? Then you could work in those areas with helping invisible creature, who could use !Detect([EVILCUTOFF]) or something like that.

Link to comment
In the area, you could click "x", then the area code is shown in the textbox (cheats have to be enabled).
Actually, no they don't... the Ctrl + X gives additional info but that's besides the point you are making, just pushing the x gives the area info(example "ar0602" ) and mouse pointer coordinates.
Link to comment

@ qwerty

Have you even tried using CombatCounter(0), without the rest? I think I once read something on the subject, and it was mentioned that using CombatCounterLT(1) or !CombatCounterGT(0) instead should be avoided (though I am not 100% sure, the discussion took place kinda 1,000 years ago)

As for !ActuallyInCombat()

1) I doubt that it makes any sense outside creature scripts

2) The trigger is quite useless anyway; other than PC's AI scripts, I can't think of any situation where it can be helpful (IIRC, Bioware never used it)

Link to comment

I know how to get area code... I can't be going through every area in game to check the behavior.

You said above the CombatCounter(0) failure is in only a few and always the same (few) areas, so my suggestion was to find a special solution for these areas. Now you say you don't know what the behavior for most of the areas is. Can't help you then, as it seems.
Link to comment

Archived

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

×
×
  • Create New...