Jump to content

A little scripting help.


Shricka

Recommended Posts

I have past knowledge with programming before (C# mostly) but I'm relatively new to the language used by the creating script. I'm wondering what script would allow me to created a water purifier. Something that will take all dirty water of the player and return purified water.
Link to comment
Share on other sites

  • 2 weeks later...
Scriptname WaterPurifierScript extends ObjectReference
Potion Property HC_SippableDirtyWater Auto
Potion Property HC_SippableWater Auto
Actor Property pChar Auto Hidden
Event OnInit()
pChar = Game.GetPlayer()
EndEvent
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If (akBaseItem == HC_SippableDirtyWater)
pChar.RemoveItem(HC_SippableDirtyWater, 1)
pChar.AddItem(HC_SippableWater, 1)
EndIf
EndEvent

--------

just compile that script in the CK, then add it to the "Player" actor, on "HC_SippableDirtyWater" & "HC_SippableWater" click "Auto-Fill"
Edited by xYOURMAMAx
Link to comment
Share on other sites

  • Recently Browsing   0 members

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