Jump to content

TurnOff\On Player interactions on magic effect


Jay093

Recommended Posts

Hello guys,

does anyone knows the property to achieve this?

Event OnEffectStart(Actor Target, Actor Caster)
;Turn OFF player interactions
endEvent

Event OnEffectFinish(Actor Target, Actor Caster)
;Turn ON interactions
endEvent

by interactions i mean you cannot press "E" on any Object or Actor while the magic effect is active.

Thanks in advance.

Edited by Jay093
Link to comment
Share on other sites

You might want to take a look at the DisablePlayerControls function. It does exactly this.

Thank you!

i leave the script here for everyone

Scriptname MODDisableInteractions extends activemagiceffect  


Event OnEffectStart(Actor Target, Actor Caster)
Game.DisablePlayerControls(false, false, false, false, false, false, true) ;disable only abActivate
EndEvent


Event OnEffectFinish(Actor Target, Actor Caster)
Game.EnablePlayerControls() ;enable all the controls


EndEvent
Edited by Jay093
Link to comment
Share on other sites

  • Recently Browsing   0 members

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