I've got a subquest where, as far as I can figure, SpellCast is the only way to handle one aspect. What I've got is a series of short blocks testing for each of the spells that should work (full file attached, if anyone's interested). What I'm finding is the WIZARD_ variants of the spells I check work, and the CLERIC_ or INQUISITOR_ variants don't.
Is this common? Or am I making some basic mistake?
Basic block:
IF
Global("TM#MQDeReveal","GLOBAL",0)
SpellCast(Player1,WIZARD_DISPEL_MAGIC)
THEN
RESPONSE #100
SetGlobal("TM#MQDeReveal","GLOBAL",1)
ClearAllActions()
StartCutSceneMode()
StartCutScene("tm#mqil")
END
Ad so on, block by block, through Player6 (I was warned that, in this case, OR() blocks would make it even more unlikely to work).
Also, would it work in an Area script than an NPC script? Potentially better? Worse? About the same? This is a mod area, so it won't be tangling other people's stuff up.
Bookwyrme
Member Since 01 Apr 2004Offline Last Active Today, 02:38 AM
Community Stats
- Group Modder
- Active Posts 5418 (1.89 per day)
- Profile Views 9288
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
-
Location
Whiffling through the tulgey wood
Topics I've Started
SpellCast as a Trigger
06 February 2012 - 01:04 AM
Displaying the name of an NPC in a given slot
09 January 2012 - 05:33 PM
Is it possible to display the name of an NPC in a given slot? I had thought <Player 2> or whatever would work, but all I'm getting is a blank in-game:
+ ~Global("tm#nqgive", "GLOBAL",0)!Name("tm#nar",Player5) !Name("tm#lar", Player5) OR(2) Class(Player5,MAGE_ALL) Class(Player5,BARD_ALL)~ + ~Let <Player5> learn it then!~ EXTERN TM#NARJ TM#NNotSure
The display reads Let learn it then!
I can check pretty easily for the Bioware NPCs, but with all the mods out there, I'm sure to miss an eligible NPC or ten, and I really don't want to do an infinite series of !Party etc checks anyway.
+ ~Global("tm#nqgive", "GLOBAL",0)!Name("tm#nar",Player5) !Name("tm#lar", Player5) OR(2) Class(Player5,MAGE_ALL) Class(Player5,BARD_ALL)~ + ~Let <Player5> learn it then!~ EXTERN TM#NARJ TM#NNotSure
The display reads Let learn it then!
I can check pretty easily for the Bioware NPCs, but with all the mods out there, I'm sure to miss an eligible NPC or ten, and I really don't want to do an infinite series of !Party etc checks anyway.
SetGlobalTimer for les than a day
08 January 2012 - 10:42 AM
What does a less-than-a-day setting look like on SetGlobalTimer? Can anyone point me to a page that explains the game-time settings for this? There are a couple of scripts currently running just fine on ONE_DAY that I'd really like to switch to something more like half a day.
Familiar Trouble
28 December 2011 - 09:46 PM
I'm having trouble with Nara's familiar. Sometimes, it will go into the pack and come out as requested. Other times, it will go in and the game will crash. Once or twice, I've gotten 2 familiars showing up. This usually happens a few rounds in rather than right away, so I was fooled into thinking everything was fine...
Anyway, advice appreciated! Pica's become quite an important part of things now, so I need him working!
CHAIN IF
~IsGabber("tm#nar")~
THEN TM#PIC TM#PicNarPID
~What?~
END
++ ~Nothing.~ EXIT
+ ~RandomNum(6,1)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn1
+ ~RandomNum(6,2)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn2
+ ~RandomNum(6,3)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn3
+ ~RandomNum(6,4)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn4
+ ~RandomNum(6,5)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn5
+ ~RandomNum(6,6)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn6
CHAIN TM#PIC TM#PicIn1
~On my way!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn2
~But it's *boring* in there!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn3
~You've got it all full of *books.* How'm I supposed to sleep?~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn4
~Do I haaave to?~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn5
~Right!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn6
~Ok!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
////
/Making Pica go to Nara when he's released
IF
Global("tm#PicIt","GLOBAL",1)
THEN
RESPONSE #100
SetInterrupt(FALSE)
CreateCreatureObjectOffset("tm#pic","tm#nar",[10.15])
SetGlobal("tm#PicIt","GLOBAL",0)
SetGlobal("tm#PChatterPie","GLOBAL",1) //Is Pica available for conversation?
MoveGlobalObject("tm#pic","tm#nar")
SetInterrupt(TRUE)
END
//Making Pica follow Nara. ALSO in tm#baldur.baf
IF
Global("tm#PicJoin","GLOBAL",1)
InParty("tm#nar")
!InActiveArea("tm#pic")
!PartyHasItem("tm#pic")
THEN
RESPONSE #100
MoveGlobalObject("tm#pic","tm#nar")
END
Anyway, advice appreciated! Pica's become quite an important part of things now, so I need him working!
CHAIN IF
~IsGabber("tm#nar")~
THEN TM#PIC TM#PicNarPID
~What?~
END
++ ~Nothing.~ EXIT
+ ~RandomNum(6,1)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn1
+ ~RandomNum(6,2)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn2
+ ~RandomNum(6,3)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn3
+ ~RandomNum(6,4)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn4
+ ~RandomNum(6,5)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn5
+ ~RandomNum(6,6)~ + ~It's time for you to get into my backpack.~ GOTO TM#PicIn6
CHAIN TM#PIC TM#PicIn1
~On my way!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn2
~But it's *boring* in there!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn3
~You've got it all full of *books.* How'm I supposed to sleep?~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn4
~Do I haaave to?~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn5
~Right!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
CHAIN TM#PIC TM#PicIn6
~Ok!~ DO ~GiveItemCreate("tm#pic","tm#nar",0,0,0) DestroySelf()~ EXIT
////
/Making Pica go to Nara when he's released
IF
Global("tm#PicIt","GLOBAL",1)
THEN
RESPONSE #100
SetInterrupt(FALSE)
CreateCreatureObjectOffset("tm#pic","tm#nar",[10.15])
SetGlobal("tm#PicIt","GLOBAL",0)
SetGlobal("tm#PChatterPie","GLOBAL",1) //Is Pica available for conversation?
MoveGlobalObject("tm#pic","tm#nar")
SetInterrupt(TRUE)
END
//Making Pica follow Nara. ALSO in tm#baldur.baf
IF
Global("tm#PicJoin","GLOBAL",1)
InParty("tm#nar")
!InActiveArea("tm#pic")
!PartyHasItem("tm#pic")
THEN
RESPONSE #100
MoveGlobalObject("tm#pic","tm#nar")
END
Making sure <Player2> isn't the one being spoken to
19 December 2011 - 09:45 PM
Ok, so I'm trying to write a talk where the PC suggests Nara give something to another mage. Initially, I had all party mages checked for, line by line, then I thought "Oh, yeah, there are mod mages. It would be more efficient to check for class... but if I do that, how do I make sure the one checked *isn't* Nara?
So:
+ ~OR(2) Class(Player1,MAGE_ALL) Class(Player1,BARD_ALL)~ + ~Give it to me..~ EXTERN TM#NARJ TM#Hmm
+ ~OR(2) Class(2layer1,MAGE_ALL) Class(Player2,BARD_ALL)~ + ~Give it to <PLAYER2>.~ EXTERN TM#NARJ TM#Hmm
+ ~OR(2) Class(Player3,MAGE_ALL) Class(Player3,BARD_ALL)~ + ~Give it to <PLAYER3>..~ EXTERN TM#NARJ TM#Hmm
etc... It's going to sound really silly if the PC ends up telling Nara to give it to herself. Any way to exclude that?
And, in context, it would be iffy to just say "Oh, give it to someone else!" I'd like to avoid that, if possible.
So:
+ ~OR(2) Class(Player1,MAGE_ALL) Class(Player1,BARD_ALL)~ + ~Give it to me..~ EXTERN TM#NARJ TM#Hmm
+ ~OR(2) Class(2layer1,MAGE_ALL) Class(Player2,BARD_ALL)~ + ~Give it to <PLAYER2>.~ EXTERN TM#NARJ TM#Hmm
+ ~OR(2) Class(Player3,MAGE_ALL) Class(Player3,BARD_ALL)~ + ~Give it to <PLAYER3>..~ EXTERN TM#NARJ TM#Hmm
etc... It's going to sound really silly if the PC ends up telling Nara to give it to herself. Any way to exclude that?
And, in context, it would be iffy to just say "Oh, give it to someone else!" I'd like to avoid that, if possible.
- Spellhold Studios
- → Viewing Profile: Bookwyrme
- Guidelines


Find content
Display name history