Jump to content

Papyrus Question


falloutperson416

Recommended Posts

So I've got a small script here that will be implemented into a mod of mine. Its basic function is to show a menu to the player upon activating a button, and then you can choose to activate and deactivate objects. The script itself is working (in the ck) it compiles fine, no problems. But in game, it doesn't preform its main function which is activating and deactivating objects. Now, I've defined the object variables with ObjectReference, and I think somewhere in here is the problem. I think I'm just identifying a variable to use, not actually linking it with the real object. Can someone help me out?

 

 

Scriptname IHPoolStuffScript extends ObjectReference  
{Activates the water jets and steam jets around the pool}

ObjectReference WaterJet1REF
ObjectReference WaterJet2REF
ObjectReference WaterJet3REF
ObjectReference WaterJet4REF
ObjectReference WaterJet5REF
ObjectReference SteamJet1REF
ObjectReference SteamJet2REF
ObjectReference SteamJet3REF
ObjectReference SteamJet4REF
ObjectReference SteamJet5REF

Message property IHPoolMessage auto
Message property IHPoolMessage2 auto
Message property IHPoolMessage3 auto
Message property IHPoolMessage4 auto
Message property IHPoolMessage5 auto

int count  

  Event OnActivate(ObjectReference akActionRef)

       int Button
       Button = IHPoolMessage.Show()
       if Button == 0  ; button 1 pressed
             
       elseif Button == 1      ; button 2 pressed
            WaterJet1REF.Enable() 
            WaterJet2REF.Enable() 
            WaterJet3REF.Enable()
            WaterJet4REF.Enable()
            WaterJet5REF.Enable()
                      IHPoolMessage2.Show()
       elseif Button == 2      ; button 3 pressed
            WaterJet1REF.Disable() 
            WaterJet2REF.Disable() 
            WaterJet3REF.Disable()
            WaterJet4REF.Disable()
            WaterJet5REF.Disable()
                      IHPoolMessage4.Show()
       elseif Button == 3      ; button 4 pressed
            SteamJet1REF.Enable()
            SteamJet2REF.Enable()
            SteamJet3REF.Enable()
            SteamJet4REF.Enable()
            SteamJet5REF.Enable()
                      IHPoolMessage3.Show()
       elseif Button == 4      ; button 5 pressed
            SteamJet1REF.Disable()
            SteamJet2REF.Disable()
            SteamJet3REF.Disable()
            SteamJet4REF.Disable()
            SteamJet5REF.Disable()
                      IHPoolMessage5.Show()
       endif
  EndEvent

 

The ID's (StreamJet1REF for example) are the real reference ID's I've given to the objects.

Edited by falloutperson416
Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

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