Jump to content


Photo

Emmeline NPC mod


  • Please log in to reply
149 replies to this topic

#141 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 20 February 2008 - 08:17 AM

Because you've forgotten to add

IF
		Global("CCEmmeNecroReact","GLOBAL",1)
THEN
	RESPONSE #100
		StartDialogueNoSet(Player1) // if she's talking to player1
END

Only StartDialogueNoSet() will make her *initiate* talk.

Also, your code is asking for trouble. If you're setting a timer, you really have to update the variable, too, because

RealGlobalTimerExpired("CCEmmeNecroReact","GLOBAL")
Global("CCEmmeNecroReact","GLOBAL",0)

is dangerous. You'll be much better off in setting NecroReact to 1 in the first block, then to 2 as the timer expires, and then, finally, if it's 2, you initiate dialogue - three blocks in all. It might sound complicated, but it looks as though you'll manage.

#142 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 20 February 2008 - 08:25 AM

Hmm, thanks! I'll tinker with this a bit and see how it goes. :)

Edited by Choo Choo, 20 February 2008 - 08:28 AM.

theacefes: You have to be realistic as well, you can't just be Swedish!


#143 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 20 February 2008 - 08:33 AM

It's perfect in the second block.

But it won't work in the third block: first, your variable is never 3, second, you don't have to upgrade it to 4(and don't have to check for the timer).

IF
		InParty(Myself)
		!StateCheck(Myself,CD_STATE_NOTVALID)
		!StateCheck(Player1,CD_STATE_NOTVALID)
		Global("CCEmmeNecroReact","GLOBAL",2)
		!See([ENEMY])
		CombatCounter(0)
THEN
	RESPONSE #100
		StartDialogueNoSet(Player1)
END

(And in your dialogue, you check for Var=2 in the first line, and then you set it to 3, so that the dialogue never ever runs again).


You can make the first block shorter, to make your script a little faster, but it's not necessary:

IF
		InParty(Myself)
		Global("CCEmmeNecroReact","GLOBAL",0)
		Kit(Player1,MAGESCHOOL_NECROMANCER)
THEN
	RESPONSE #100
		SetGlobalTimer("CCEmmeNecroReact","GLOBAL",3200)
		SetGlobal("CCEmmeNecroReact","GLOBAL",1)
END


#144 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 20 February 2008 - 08:34 AM

Eh. Instead of having a cool chat over the telephone, I'm correcting the code, and after posting it, I find that the original was edited out. :( Hey, unfair! :)

#145 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 20 February 2008 - 08:35 AM

It's because I noticed that my coding was wrong. Sorry 'bout that.

It does set to 3, though - wait, I'll show you, but over PM. Well, if you want to have a look and if you have the time. :)

Edited by Choo Choo, 20 February 2008 - 08:38 AM.

theacefes: You have to be realistic as well, you can't just be Swedish!


#146 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 20 February 2008 - 08:38 AM

Too late. It's dinner/Babylon+five hourss straight of IWD NPC coding and testing for me, sorry.

#147 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 20 February 2008 - 08:40 AM

Alright - I'll simply have to test around with this and see how it goes. Thank you!

theacefes: You have to be realistic as well, you can't just be Swedish!


#148 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 20 February 2008 - 09:54 AM

Ugh, I give up for today. The timers refuse to work - the dialogues fire, alright, but they fire right after each other. Frustrating.

theacefes: You have to be realistic as well, you can't just be Swedish!


#149 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 10 March 2008 - 07:52 AM

Huge thanks to Azkyroth for helping me out with fixing the timers. Whee!

Not much progress the last few, though. School's killing me.

theacefes: You have to be realistic as well, you can't just be Swedish!


#150 Choo Choo

Choo Choo

    AIR CONDITIONER GRILL

  • Modder
  • 3001 posts

Posted 24 August 2008 - 04:55 AM

Whoa - coming back to this thread is like nostalgia. Heh.

While I haven't got much work done at all since April or so due to RL busyness, work's been resumed as of today. I will see this through, this decade or next.

Might as well tell y'all what is done, tested and working..

Two Xan banters.
Four Jaheira banters.
Four Ajantis banters.
Five Alora banters, one of them needs Edwin in the party, one is a threeway banter.
Two Edwin banters.
One Quayle banter.
One Branwen banter.
Four Eldoth banters.

Her reactions at a necromancer PC are all written, scripted, tested and working.

Her joining dialogues, leaving dialogues and re-joining dialogues are all finished.

... And then I have five thousand drafts and loose ideas.

Edited by Choo Choo, 24 August 2008 - 05:00 AM.

theacefes: You have to be realistic as well, you can't just be Swedish!