Author Topic: Having a dialogue kick in during combat  (Read 3139 times)

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Having a dialogue kick in during combat
« on: July 08, 2004, 12:48:24 PM »
We've all used CombatCounter(0) in scripts, but I'm wondering if I put !CombatCounter(0) as part of a condition will it cause my battle specific dialogue to invoke.

I had read some time back I think on one of the TeamBG's forums that the CombatCounter trigger was buggy.

Thanks.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Having a dialogue kick in during combat
« Reply #1 on: July 08, 2004, 01:12:05 PM »
CombatCounter is a bit tricky, yes. !CombatCounter(0) is more reliable than CombatCounterGT(0), though.

There's ActuallyInCombat()/!ActuallyInCombat() but that requires TOB.

Bottom line is that yes, it should work, but you'd probably want to check on a few other things as well, otherwise it'll just kick in the very second somebody attacks somebody...
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Having a dialogue kick in during combat
« Reply #2 on: July 08, 2004, 01:26:34 PM »
Quote
otherwise it'll just kick in the very second somebody attacks somebody...
That's exactly what I want it to do - if my party is being attacked or if they start attacking. I have TOB installed but I wanted to ensure that this would work if only SOA was installed.

Thanks.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Having a dialogue kick in during combat
« Reply #3 on: July 08, 2004, 01:58:20 PM »
That said, I'd suggest you keep these relatively short and infrequent, as interrupting combat for dialogue tends to irritate people.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Having a dialogue kick in during combat
« Reply #4 on: July 08, 2004, 02:15:12 PM »
It's a one-time, 4 line banter chain between Korgan and the NPC where he comments on its combat skills.  Thought it would be easier to code to work during a battle than wait for the in-game banter timers to trigger possibly long after a fight plus  I didn't want to code it to check for the death of a particular sprite.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Having a dialogue kick in during combat
« Reply #5 on: July 08, 2004, 03:37:27 PM »
Sure, that's fine, I wasn't sure if this was something you intended to be recurring, or what.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Having a dialogue kick in during combat
« Reply #6 on: July 08, 2004, 05:30:53 PM »
Gives me another thought.  Wonder if Dead([EVILCUTOFF]) will work betterl for a bit more control over timing because I'd really want it to occur immediately after a battle.  Note:  I'm still reading/checking   the IDESP so I need to read up on keywords like EVILCUTOFF
« Last Edit: July 08, 2004, 05:33:52 PM by Diana »

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Having a dialogue kick in during combat
« Reply #7 on: July 08, 2004, 05:51:08 PM »
After asking that very question, this is what Ghreyfain told me:

(copied from the old FWP site)

 It's for allegiance, and covers anything with X in the name.

i.e. GOODBUTBLUE, GOODBUTRED, and FAMILIAR are all considered GOODCUTOFF.

Let me dig out my ea.ids and split it up for you...

10
1 INANIMATE
2 PC                      good guy
3 FAMILIAR                      good guy
4 ALLY                    good guy
5 CONTROLLED                    good guy
6 CHARMED                    good guy
28 GOODBUTRED                    good guy
29 GOODBUTBLUE                    good guy
30 GOODCUTOFF                    good guy
31 NOTGOOD
126 ANYTHING
128 NEUTRAL
199 NOTEVIL
200 EVILCUTOFF                    evil guy
201 EVILBUTGREEN                    evil guy
202 EVILBUTBLUE                    evil guy
255 ENEMY                    evil guy


It's useful for having fights between you and some blue-circled allies, say, and a band of bad guys who are red circled.  The allies would be GOODBUTBLUE, and the bad guys would target GOODCUTOFF, being either summoned party monsters, the party, or the blue-circled allies.
   
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Having a dialogue kick in during combat
« Reply #8 on: July 08, 2004, 05:59:41 PM »
Gives me another thought.  Wonder if Dead([EVILCUTOFF]) will work betterl for a bit more control over timing because I'd really want it to occur immediately after a battle.  Note:  I'm still reading/checking   the IDESP so I need to read up on keywords like EVILCUTOFF

For having it right AFTER combat, you can do something like this:

IF
!CombatCounter(0)
Global("WaitingToDoThing","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("WaitingToDoThing","GLOBAL",1)
END



IF
CombatCounter(0)
Global("WaitingToDoThing","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("WaitingToDoThing","GLOBAL",2)
Dialogue()
END

Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Having a dialogue kick in during combat
« Reply #9 on: July 08, 2004, 07:00:16 PM »
Does another happy dance

!CombatCounter(0) in the IF statement in the .baf worked perfectly with what I lifted from the BanterPack .tp2 to amend Korgan's BCS.  I'll copy what you have just given me for future learning.

Thanks**3
and Thanks Kismet - you gave me the clues how the WRITE_ASCII stuff worked as well!  Beats poring through the Weidu tutorial
 :D
« Last Edit: July 08, 2004, 07:54:21 PM by Diana »

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Having a dialogue kick in during combat
« Reply #10 on: July 10, 2004, 04:10:02 PM »
Quote
ActuallyInCombat()
Note to all.  Had to use the above trigger when I started a new game plus weight Korgan's banter higher.  No matter what I did, he kept commenting on Jan's tale and "pickle nose" until I moved it higher with weights in the Append and chain in his file 'cuz I saw my pc's global incremented after teh speech.

The suggestion for after battle dialog resutled in  a stutter bug which is probably due to my poor coding (which I couldn't figure out why, copied it workd for word  - mea culpa).  But "ActuallyInCombat worked perfectly.  Perhaps I had to clear out the cache before trying new things.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Having a dialogue kick in during combat
« Reply #11 on: July 10, 2004, 10:32:45 PM »
Remember, Actually will require that the player have TOB installed.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: