Jump to content

ScriptEffectStart and then some!


DaemonGrin

Recommended Posts

Just curious I am trying to apply shaders to in combat and out of combat. Much akin to Holograms. I noticed the script used has a start, update, finish. Are all three required for a ScriptEffect------ to be used? Or is there a better way to do this.

 

 

 

scn MyShaderSwapSCRIPT

ref rSelf

Begin ScriptEffectStart

PMS MYSHADER1
Set rSelf to GetSelf
return

end

Begin ScriptEffectUpdate

if (rSelf.IsInCombat == 1)
    rSelf.PMS MYSHADER2
endif
end

Begin ScriptEffectFinish

PMS MYSHADER1

END 

 

 

 

That's the current code I am trying however it doesn't change to MYSHADER2. I tried attaching the nvdlc01 (nvdlc03 as well) script and changing the faction check it applies the shaders properly but the actor doesn't attack even though I'm in danger. Advice? Suggestion? Gonna keep tweaking it maybe I'll get it working XD

 

Thanks,
Geoff

Link to comment
Share on other sites

I have tried various iterations of the NVDLC01HologramEffect01SCRIPT and had zero luck. Either applies the initial shader only, applies shader 1 and the second shader after exiting combat rather than at the start of combat and it doesn't change back to shader 1. Also another outcome is it cycles through hidden, caution, danger over and over doesn't change shaders and never engages (Does an amazing headbob dance cycling through these though lol). Can I get some assistance with this I can't move past it XD

 

 

 

Scn    DGNVDLC01HologramEffect01SCRIPT

Int		iEffectOff
Ref	rSelf

Begin ScriptEffectStart

	PMS NVDLC01HologramNeutral;
	Set iEffectOff to 1;
	Set rSelf to GetSelf;

End

Begin ScriptEffectUpdate

	If (iEffectOff < 60)
		Set iEffectOff to (iEffectOff + 1);
		Return;
	Elseif (iEffectOff == 60)
		rSelf.PMS NVDLC01HologramNeutral
		If (rSelf.IsInCombat == 1)
			rSelf.PMS NVDLC01HologramAggressive;
		Endif
		Set iEffectOff to 61;
		Return;
	Elseif (iEffectOff == 61)
		If (MenuMode 1007 || MenuMode 1013)
			Set iEffectOff to 1;
		Endif
	Endif

End


Begin ScriptEffectFinish

	PMS NVDLC01HologramNeutral;
	Set iEffectOff to 1;

End 

 

 

 

Thanks,

Geoff

Link to comment
Share on other sites

 


Are all three required for a ScriptEffect------ to be used?

 

Script effect blocktypes are not required on effects, you can even use a GameMode.

By the way, NVSE 5.02 has a HasEffectShader ported from OBSE that could help.

Edited by Fallout2AM
Link to comment
Share on other sites

 

Are all three required for a ScriptEffect------ to be used?

 

Script effect blocktypes are not required on effects, you can even use a GameMode.

By the way, NVSE 5.02 has a HasEffectShader ported from OBSE that could help.

 

 

Ok cool. I no longer use NVSE thanks though.

 

Thanks,

Geoff

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...