Jump to content

Invisibility On/ Invisibility Off Script


Terrann

Recommended Posts

Hi guys I spend lot of hours and days to find a solution without success, I try to make a mod able to set your character invisible and turn the invibility off, here is the script I've try to make but it isn't work ...

Scriptname Uninvisible extends ObjectReference

Message Property InvisibilityMenu Auto
Message Property Message01Invisible
Message Property Message02Uninvisible
Message Property MessageQuit Auto

ActorValue Property Invisibility Auto


Event OnActivate(ObjectReference akActionRef)
    Menu()
EndEvent

Function Menu(int aiButton = 0)
    aiButton = InvisibilityMenu.show()

    If aiButton == 0
        Message01Invisible.show()
        Game.GetPlayer().SetValue( Game.InvisibilityAV(), 1 )        

      ElseIf aiButton == 1
        Message02Uninvisible.show()
        Game.GetPlayer().SetValue( Game.InvisibilityAV(), 0 )

    ElseIf aiButton == 2
        MessageQuit.show()



    EndIf    

EndFunction

And here is the compiler Output :

Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright (C) ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "Uninvisible"...
C:\Users\tay-n\AppData\Local\Temp\PapyrusTemp\Uninvisible.psc(5,8): mismatched input 'Property' expecting FUNCTION
C:\Users\tay-n\AppData\Local\Temp\PapyrusTemp\Uninvisible.psc(0,0): error while attempting to read script Uninvisible: La r‚f‚rence d'objet n'est pas d‚finie … une instance d'un objet. (In English : Object reference not set ... an instance of an object(??????).)
No output generated for Uninvisible, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Uninvisible

I absolutly don't know how to make this f*king button menu work ... :laugh:

 

If you could help me please because I'm going crazy :pinch:

 

Thank you !

Edited by Terrann
Link to comment
Share on other sites

  • Recently Browsing   0 members

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