troyquay Posted August 14, 2012 Share Posted August 14, 2012 HelloI have a problem with my script.When I activate the thermal vision, the actor will be painted immediately.But when I deactivate it, it will take longer before the effect shader will be removed.This is my script: scn aaaThermalVisionMainScript short PlayerEquipped short EffectNum short depth short modeChanged float timer float timePassed ref NPCref short isButtonNextPressed Begin OnEquip player set PlayerEquipped to 1 set EffectNum to 0 set timer to 9999 player.AddSpell VMS15WaterBreathingActual End Begin OnUnequip player set PlayerEquipped to 0 set EffectNum to 0 set timer to 9999 PlaySound UIPipBoyLightOff player.riMod ThermalVisionIsMod player.sms BodyHeatEffectShader player.sms BodyHeatEffectShader2 player.RemoveSpell VMS15WaterBreathingActual End Begin GameMode set timePassed to GetSecondsPassed set timer to timer + timePassed set modeChanged to 0 if PlayerEquipped if IsKeyPressed 45 if isButtonNextPressed else PlaySound UIPipBoySelect set EffectNum to EffectNum + 1 if EffectNum > 1 set EffectNum to 0 endif set modeChanged to 1 endif set isButtonNextPressed to 1 else set isButtonNextPressed to 0 endif if modeChanged == 1 set timer to 9999 if EffectNum == 0 player.riMod ThermalVisionIsMod player.sms BodyHeatEffectShader player.sms BodyHeatEffectShader2 elseif EffectNum == 1 player.iMod ThermalVisionIsMod player.pms BodyHeatEffectShader player.pms BodyHeatEffectShader2 endif endif endif if (timer >= 1) set timer to 0 if PlayerEquipped == 1 && EffectNum == 1 player.sms BodyHeatEffectShader player.pms BodyHeatEffectShader endif set depth to 2 * (player.IsInInterior ==0) set NPCref to GetFirstRef 200 depth 0 Label 1 if NPCref != 0 && isFormValid NPCref == 1 NPCref.sms FriendlyEffectShader NPCref.sms BodyHeatEffectShader NPCref.sms BodyHeatEffectShader2 if PlayerEquipped == 1 && EffectNum == 1 if NPCref.GetDisabled == 1 || NPCref.GetDead == 1 NPCref.pms FriendlyEffectShader else NPCref.pms BodyHeatEffectShader NPCref.pms BodyHeatEffectShader2 endif endif set NPCref to Pencil01 set NPCref to GetNextRef ;Get the ref of the next NPC Goto 1 ;Loop continues as long as NPCref exists endif EndIf End Link to comment Share on other sites More sharing options...
troyquay Posted August 15, 2012 Author Share Posted August 15, 2012 I read somewhere that I should be using token instead of pms/sms, but I don't know how to do it.Can someone shed me some light? or point me into the right direction.thanks Link to comment Share on other sites More sharing options...
luthienanarion Posted August 15, 2012 Share Posted August 15, 2012 I read somewhere that I should be using token instead of pms/sms, but I don't know how to do it.Can someone shed me some light? or point me into the right direction.thanks That makes no sense, as this is already an object script. Also, good luck applying visual shaders without the command that applies visual shaders. I'd like to see what you read. Link to comment Share on other sites More sharing options...
troyquay Posted August 15, 2012 Author Share Posted August 15, 2012 I read somewhere that I should be using token instead of pms/sms, but I don't know how to do it.Can someone shed me some light? or point me into the right direction.thanks That makes no sense, as this is already an object script. Also, good luck applying visual shaders without the command that applies visual shaders. I'd like to see what you read. The visual/effect shader is working. the only problem is when I remove it, it will take some time before it's gone.But I want it to be removed immediately. Link to comment Share on other sites More sharing options...
luthienanarion Posted August 15, 2012 Share Posted August 15, 2012 I'm intrigued. When I get some free time, I'll see if I can script something like that with more immediate visual results. Link to comment Share on other sites More sharing options...
luthienanarion Posted August 16, 2012 Share Posted August 16, 2012 Try changing the Full Alpha Time and Alpha Fade Out Time setting of your effect shaders under the Fill / Texture Effect heading to 0. Link to comment Share on other sites More sharing options...
troyquay Posted August 16, 2012 Author Share Posted August 16, 2012 Try changing the Full Alpha Time and Alpha Fade Out Time setting of your effect shaders under the Fill / Texture Effect heading to 0. Hi.I have already uploaded it here ---> Thermal VisionI don't know if it will be deleted or not. Link to comment Share on other sites More sharing options...
Recommended Posts