Jump to content

The Wyrd Craft Mod script help


Deleted28154640User

Recommended Posts

Hiya I hope this day finds you all well

 

I'm trying to make a script work but I'm having troubles getting it to work. What I'm trying to do is when the player uses the craft table the weather changes to a storm and my custom witch music plays, the activation successfully works but when the player exists the crafting table the weather and music are supposed to return to normal here is my script I'm trying to get to work.

------------------------------------------------------------------------------------------------------------------

Scriptname ZZZ_WitchesCauldronScript extends ObjectReference
MusicType Property WitchesMusic Auto
Weather Property Storm Auto
Weather Property Clear Auto
Event OnActivate(ObjectReference akActionRef)
Storm.setActive(true)
WitchesMusic.Add()
Endevent
Event Ondeactivate(ObjectReference akActionRef)
Clear.setActive(true)
Weather.ReleaseOverride()
WitchesMusic.Remove()
EndEvent
-----------------------------------------------------------------------------------------------------------------
Please help, thank you :)
Link to comment
Share on other sites

Sorry to say there is no such thing as OnDeactivate() event natively in the game.

 

Here's another approach, instead register for the the animation event when the player is exiting the furniture and then set the weather back.

 

crude tested example (tried it on an Alchemy Lab and works ok for me).

Scriptname ZZZ_WitchesCauldronScript extends ObjectReference

MusicType Property WitchesMusic Auto
Weather Property Storm Auto
Weather CurWeather

Event OnActivate(ObjectReference akActionRef)
    CurWeather = Weather.GetCurrentWeather()
    Storm.SetActive(true)
    WitchesMusic.Add()
    RegisterForAnimationEvent(Game.GetPlayer(), "IdleFurnitureExit")
Endevent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
    If (akSource == Game.GetPlayer()) && (asEventName == "IdleFurnitureExit")
        CurWeather.SetActive(true)
        Weather.ReleaseOverride()
        WitchesMusic.Remove()
        Utility.Wait(1.0)
        UnregisterForAnimationEvent(Game.GetPlayer(), "IdleFurnitureExit")
    EndIf
EndEvent

On another note:

If you would like to see a list of available functions and events that you can use then maybe check this out (if you haven't already).

http://www.creationkit.com/Category:Papyrus

Edited by sLoPpYdOtBiGhOlE
Link to comment
Share on other sites

Ok if you could please help

 

Im trying to make an object cast storm call on itself when activated but it doesnt work, nothing seems to happen. Please help here is my script

---------------------------------------------------------------------------------------------

Scriptname SkullTotem extends ObjectReference
Spell Property TotemFX auto
objectreference property skulltotemfx auto
objectreference property DeconstructMarker auto
Event OnActivate(ObjectReference akActionRef)
Totemfx.Cast(self, self)
game.getplayer().Additem(Skulltotemscroll, 1)
EndEvent
Scroll Property Skulltotemscroll Auto
Link to comment
Share on other sites

  • Recently Browsing   0 members

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