Can you check if the enemy was affected
Started by Meira, Jun 24 2009 07:52 AM
7 replies to this topic
#1
Posted 24 June 2009 - 07:52 AM
So, I'd like to know when my character not only casts a specific spell successfully, but when the enemy fails the sawing throw and/or isn't able to avoid the effects of the spell. In other words, I want to know when the enemy is toast due a specific spell. I think that it might not be possible to check this, but maybe there's an combat AI expert out here who knows for sure.
Ihmeellinen meri
Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.
- Edith Södergran
Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3
Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.
- Edith Södergran
Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3
#2
Posted 24 June 2009 - 01:18 PM
There're as many as 200 stats in BG2, most of which are already used either by the game or by AI mods, so meddling in there is undesirable sort of.
You situation, however, may or may not have an easy solution, depending on the curcumstances. I presume you need to check if a certain creature (only one) is killed by a certain spell, so that it can be later reflected in, say, dialog.
The '(0x109) Script: Modify Global Variable [265]' effect added to the spell should generally work fine. Of course, it is quite possible that many other creatures will be hit with it before your encounter, so to avoid the mess you may want to set the variable back to 0 when starting your sequence.
You situation, however, may or may not have an easy solution, depending on the curcumstances. I presume you need to check if a certain creature (only one) is killed by a certain spell, so that it can be later reflected in, say, dialog.
The '(0x109) Script: Modify Global Variable [265]' effect added to the spell should generally work fine. Of course, it is quite possible that many other creatures will be hit with it before your encounter, so to avoid the mess you may want to set the variable back to 0 when starting your sequence.
"Uguu~ Boku Ayu."
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
#3
Posted 24 June 2009 - 01:54 PM
Ardanis, on Jun 25 2009, 12:18 AM, said:
You situation, however, may or may not have an easy solution, depending on the curcumstances. I presume you need to check if a certain creature (only one) is killed by a certain spell, so that it can be later reflected in, say, dialog.
Ardanis, on Jun 25 2009, 12:18 AM, said:
The '(0x109) Script: Modify Global Variable [265]' effect added to the spell should generally work fine. Of course, it is quite possible that many other creatures will be hit with it before your encounter, so to avoid the mess you may want to set the variable back to 0 when starting your sequence.
I'll look into this. I'm I correct in assuming that by adding this effect to my (innate) spell I would be able to set a global variable when the spell affects it's target? That would be perfect.
Edited by Meira, 24 June 2009 - 01:56 PM.
Ihmeellinen meri
Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.
- Edith Södergran
Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3
Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.
- Edith Södergran
Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3
#5
Posted 24 June 2009 - 02:02 PM
Quote
I just need to know when my character uses the spell successfully for the first time.
Quote
I'm I correct in assuming that by adding this effect to my (innate) spell I would be able to set a global variable when the spell affects it's target?
"Uguu~ Boku Ayu."
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
#6
Posted 24 June 2009 - 07:59 PM
What about the reverse, where an innate from the PC is used on an NPC and they want to comment on it - or an NPC fails a save versus a specific spell?
Most of all, do you folks have a good example of usage for setting this via weidu, or do you suggest building the .eff in NI/DLTCEP and attaching it?
Most of all, do you folks have a good example of usage for setting this via weidu, or do you suggest building the .eff in NI/DLTCEP and attaching it?
I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams
#7
Posted 25 June 2009 - 08:25 AM
Quote
What about the reverse, where an innate from the PC is used on an NPC and they want to comment on it - or an NPC fails a save versus a specific spell?
Quote
Most of all, do you folks have a good example of usage for setting this via weidu, or do you suggest building the .eff in NI/DLTCEP and attaching it?
"Uguu~ Boku Ayu."
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
Before you start breaking wall tiles with your bare fists, ask yourself first - do you truly need it?
#8
Posted 26 June 2009 - 04:26 AM
cmorgan, on Jun 25 2009, 05:59 AM, said:
Most of all, do you folks have a good example of usage for setting this via weidu, or do you suggest building the .eff in NI/DLTCEP and attaching it?
Storing binary data in a textfile (tp2) is lame
You can get away with it if you do it only a few occasions, though.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











