Jump to content

UltraJohn

Premium Member
  • Posts

    4
  • Joined

  • Last visited

Nexus Mods Profile

About UltraJohn

Profile Fields

  • Country
    Denmark

UltraJohn's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Alright so it seems OnMagicEffectApply() fires when I use an item like I wanted to! Unfortunately I don't seem to be able to get the name and duration of the effect, as I want to be able to display a timer on screen. As far as I can tell the wiki says that MagicEffect only has the GetAssociatedSkill() function. https://www.creationkit.com/fallout4/index.php?title=MagicEffect_Script
  2. The idea is that I want to be able to listen to the events of when the player consumes an item that gives them a buff. I can then create a timer on screen to show how long that buff will last (sorta like the chem icon, but with a timer for each active buff). I figured I could do that by having a script running on the player that checks using OnEffectStart to get the buff. Perhaps there's another better way to do it?
  3. Yes an alias is what I need, I think, however I'm not sure how to actually apply it properly. I tried adding it to my quest in CK but I'm most likely doing something wrong since it doesn't seem to do anything, as I'd expect the OnInit() to show the message. This is how I've set it up in CK: http://i.imgur.com/o7sSMlC.png http://i.imgur.com/bkSW6yI.pnghttp://i.imgur.com/a98lk5s.png
  4. I want to attach a script to the player so that i can listen for the oneffectstart/finish events from ActiveMagicEffects, however I can't get it to compile as I'm not sure what event to register for. Scriptname CustomHUDWidget extends Quest String Property CustomHUD_Widget = "CustomHUD.swf" AutoReadOnly ; HUDFramework HUDFramework hud int timer_num = 0 Group WidgetCommands int Property Command_UpdateCount = 100 AutoReadOnly EndGroup Event OnQuestInit() hud = HUDFramework.GetInstance() If (hud) ; Register the widget, setting its position to 10, 70 on the screen. ; Load the widget automatically after registration, and auto-load it whenever the game loads. hud.RegisterWidget(Self, CustomHUD_Widget, 10, 70, abLoadNow = True, abAutoLoad = True) Else Debug.MessageBox("HUDFramework is not installed!") EndIf EndEvent ; This function is called by HUDFramework when the widget is loaded. Function HUD_WidgetLoaded(string asWidget) If (asWidget == CustomHUD_Widget) hud.SendMessage(CustomHUD_Widget, Command_UpdateCount, timer_num) RegisterForRemoteEvent(??????, "OnEffectStart") ; <-------------------- this line EndIf EndFunction Event ActiveMagicEffect.OnEffectStart(Actor akTarget, Actor akCaster) Debug.MessageBox("Start") EndEvent I've also tried adding a second script that extends from ActiveMagicEffects, but I don't know how to get it to run. Only the quest script runs when I start the game. I tried by creating a magic effect in CreationKit and then attaching that script to it. I also tried adding the second script to the quest in CreationKit as well, neither will make the script run. Scriptname CustomMagicEffects extends ActiveMagicEffect String Property CustomHUD_Widget = "CustomHUD.swf" AutoReadOnly CustomHUDWidget Property Controller Auto Const Mandatory Event OnInit() StartTimer(2) Controller.SendIt(30) Debug.MessageBox("CustomMagicEffects") EndEvent Event OnEffectStart(Actor akTarget, Actor akCaster) Controller.SendIt(100) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) Controller.SendIt(50) EndEvent
×
×
  • Create New...