Difference between revisions of "Talk:DisablePlayerControls - InputEnableLayer"
Jump to navigation
Jump to search
imported>Qazaaq |
imported>Qazaaq m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Event OnInit() | Event OnInit() | ||
InputEnableLayer myLayer = InputEnableLayer.Create() | InputEnableLayer myLayer = InputEnableLayer.Create() | ||
myLayer.DisablePlayerControls() | myLayer.DisablePlayerControls() | ||
EndEvent | EndEvent | ||
</source> | </source> | ||
Line 10: | Line 10: | ||
InputEnableLayer myLayer | InputEnableLayer myLayer | ||
Event OnInit() | Event OnInit() | ||
myLayer = InputEnableLayer.Create() | myLayer = InputEnableLayer.Create() | ||
myLayer.DisablePlayerControls() | myLayer.DisablePlayerControls() | ||
EndEvent | EndEvent | ||
</source> | </source> | ||
This might be how it should be done when calling any InputLayer based functions. --[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2017-04-28T02:16:03 (EDT) | This might be how it should be done when calling any InputLayer based functions. --[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2017-04-28T02:16:03 (EDT) | ||
:It doesnt need to be declared in a function body. It just simply wont exist outside the function body if thats where you declared it. | |||
:It doesnt need to be declared in a function body. It just simply wont exist outside the function body if thats where you declared it. This will disable the player controls for ten seconds and then the layer will cease to exist when the function returns. [[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2017-04-28T03:05:33 (EDT) | |||
<source lang="papyrus"> | <source lang="papyrus"> | ||
Event OnInit() | Event OnInit() | ||
InputEnableLayer myLayer = InputEnableLayer.Create() | InputEnableLayer myLayer = InputEnableLayer.Create() | ||
myLayer.DisablePlayerControls() | myLayer.DisablePlayerControls() | ||
Utility.Wait(10) | Utility.Wait(10) | ||
EndEvent | EndEvent | ||
</source> | </source> |
Latest revision as of 03:06, 28 April 2017
I had some trouble getting DisablePlayerControls - InputEnableLayer to work, and found out that the variable needs to be declared outside of a event/function bodies. At least that's what I had to do. For example:
Event OnInit()
InputEnableLayer myLayer = InputEnableLayer.Create()
myLayer.DisablePlayerControls()
EndEvent
Did not work. I had to do this:
InputEnableLayer myLayer
Event OnInit()
myLayer = InputEnableLayer.Create()
myLayer.DisablePlayerControls()
EndEvent
This might be how it should be done when calling any InputLayer based functions. --Lisselli (talk) 2017-04-28T02:16:03 (EDT)
- It doesnt need to be declared in a function body. It just simply wont exist outside the function body if thats where you declared it. This will disable the player controls for ten seconds and then the layer will cease to exist when the function returns. Scrivener07 (talk) 2017-04-28T03:05:33 (EDT)
Event OnInit()
InputEnableLayer myLayer = InputEnableLayer.Create()
myLayer.DisablePlayerControls()
Utility.Wait(10)
EndEvent