Jump to content

help scripting a cut scene - applying spell to NPCs who might not be present


Recommended Posts

Posted (edited)

I have a bit of a conundrum with a cut scene. I want an enemy to cast a divination that will identify one's extraplanar heritage. Aasimar should glow blue, tieflings should glow red - and Charname, descended from a god, should glow purple. But I don't know how to make this conditional on who is present. This is the (fairly simple) cut scene:

<<<<<<<< d5/d5crcut2.baf
IF
	True()
THEN
	RESPONSE #100
		CutSceneId("D5DAUSTO")
		ActionOverride("d5cuvier",ForceSpellRES("d5solgl",Myself))
		SetGlobal("D5DaustonQuest","GLOBAL",12)
		Wait(1)
		ActionOverride("D5DAUSTO",ApplySpellRES("d5clblue",Myself))
		ActionOverride(Player1,ApplySpellRES("d5clpurp",Myself))
		Wait(8)
		EndCutSceneMode()
		ActionOverride("d5cuvier",StartDialogueNoSet(Player1))
END
>>>>>>>>

But, what if Sirene is in the party? I have only ever made cut scene scripts with a single "True()" condition... can I add conditions to check for NPCs being present? I'm not sure how to do that in a way that retinas the basic sequence of 1) guys casts spell 2) people glow 3) guys starts dialogue.

Edited by subtledoctor
Posted (edited)

Well, one solution is for the spell you cast to actually detect the extraplanar races. Main spell is cast at player 1, has an op326 targeting everybody (or at least the party) conditioned on RACE=AASIMAR casting the blue subspell, has another op326 targeting everybody conditioned on RACE=TIEFLING casting the red subspell, and finally has an op146 on the primary target casting the purple subspell.

Why fake it when you can do it for real?

Then the dialogue can have some stuff conditioned on the presence of known extraplanar NPCs and unknown extraplanar NPCs, if the protagonist doesn't just grab all the attention.

Additional note: the standard StartCutScene() action treats all conditions as True() in the script it calls. If you want any logical complexity in the cutscene itself, you need to use StartCutSceneEx().

Edited by jmerry
Posted
5 hours ago, jmerry said:

one solution is for the spell you cast to actually detect the extraplanar races. Main spell is cast at player 1, has an op326 targeting everybody (or at least the party) conditioned on RACE=AASIMAR casting the blue subspell, has another op326 targeting everybody conditioned on RACE=TIEFLING casting the red subspell, and finally has an op146 on the primary target casting the purple subspell.

Why fake it when you can do it for real?

Oh I tried that first, and it doesn’t work. Don’t know why… the game clock is running in the cut scene, and the spell gets cast. But the subspells don’t happen. Don’t know why - maybe something about 326, or projectiles in cut scenes? Whereas, ApplySpellRES’ing the subspells directly does work. So I’m looking at finessing this method.

Hmm, maybe I can ApplySpellRES both subspells, and include an op318 effect blocking each if !(RACE=aasimar/tiefling)…

Posted

Weird. I'd be more inclined to believe that there's something wrong with the spell(s) you built rather than something wrong with the opcode in cutscenes.

318-blocking also looks like a valid option.

Posted (edited)
9 hours ago, jmerry said:

I'd be more inclined to believe that there's something wrong with the spell(s) you built rather than something wrong with the opcode in cutscenes

I agree, but I cannot find anything wrong with it.

  • Innate spell
  • level 1
  • one ability
  • casting target 5
  • projectile = INAREA.PRO
  • effects are opcode 326
  • param2 = 104 ("race is")
  • param1 = 153 (tiefling)/185 (aasimar)
  • timing mode = 1
  • dispel/resist = 0
  • probability1 = 100
  • resource = [subspells]

The subspells work fine when applied via ApplySpellRES(), so they are not the problem.

I imagine INAREA.PRO should work on blue-circle NPCs, since it contains no flags for party or non-party targets. But maybe I am wrong? Could this projectile only work on green/red targets? That doesn't make sense though, this is the same projectile used by Earthquake. Earthquake can affect civilians, no?

The idea to just apply the subspells to everyone and include 318 filters cannot work - I can include Player2 through Player6 in the script, but if I have a 5-person party then the action targeting Player6 fails and the cut scene hangs.

d5solgl.spl

Edited by subtledoctor
Posted

First thoughts ... INAREA is a standard-sized AoE with no flashy visuals or travel time. Ability target 5 means it's centered on the caster. Is it possible that people are simply out of range? That standard area just isn't very big. I would have gone with no projectile and effect target 5 (everyone) on the 326 effects. Or maybe there's the Detect Evil projectile - twice the radius, which should be plenty for conversational distances. (There are other "large area" projectiles, but none of them that I can see are truly indiscriminate like you want.)

And now, looking at the spell ... not seeing anything else wrong. It certainly looks like it would work, on anyone close enough, given appropriate subspells.

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...