Jump to content

How would I go about making this script?


Recommended Posts

Hey there,

 

It seems like it would be simple, but everything I try in the CK produces fails. I want to make a script do the following:

 

Using something equippable, such as a ring for example, I wanted a script to run on equip.

 

So, I equip the item on the NPC, the script runs and uses the console command 'disable', the NPC blinks out of existence for a couple of seconds, then the script uses the console command 'enable' and the NPC blinks back into existence.

 

Does anyone know where I would start with writing this? Any help would be much appreciated!! :) :)

 

 

 

Link to comment
Share on other sites


Scriptname ring_of_blink extends ObjectReference

Actor property ActorRef

Event OnEquipped(Actor akActor)
ActorRef = akActor
ActorRef.Disable()
ActorRef.Enable()
Utility.wait(2)
Debug.notification("ta-da!")
endIf
endEvent

 

Edited by stonefisher
Link to comment
Share on other sites

Scriptname ring_of_blink extends ObjectReference

Actor property ActorRef

Event OnEquipped(Actor akActor)
    ActorRef = akActor 
    ActorRef.Disable()
    ActorRef.Enable()
    Utility.wait(2)
    Debug.notification("ta-da!")
    endIf
endEvent

 

Heya, thanks a lot for that :D I'll give it a try. <3 <3

Link to comment
Share on other sites

 

Scriptname ring_of_blink extends ObjectReference

Actor property ActorRef

Event OnEquipped(Actor akActor)
    ActorRef = akActor 
    ActorRef.Disable()
    ActorRef.Enable()
    Utility.wait(2)
    Debug.notification("ta-da!")
    endIf
endEvent

 

Yes that script will alost do what you want, it needs utility.wait between disable and enable calls though. Also Actor property isn't needed.

 

 

 

 

Event OnEquipped(Actor akActor) 
    akActor.Disable()
    Utility.wait(2) ;this is how much time in seconds actor will be disabled
    akActor.Enable()
    Debug.notification("ta-da!")
    endIf
endEvent
Be noted that this won't work if you equip that ring through console or via script. The OnEquipped event only fires if item is equipped from inventory. Edited by shavkacagarikia
Link to comment
Share on other sites

 

Scriptname ring_of_blink extends ObjectReference

Actor property ActorRef

Event OnEquipped(Actor akActor)
    ActorRef = akActor 
    ActorRef.Disable()
    ActorRef.Enable()
    Utility.wait(2)
    Debug.notification("ta-da!")
    endIf
endEvent

Yes that script will alost do what you want, it needs utility.wait between disable and enable calls though. Also Actor property isn't needed.

 

 

 

 

Event OnEquipped(Actor akActor) 
    akActor.Disable()
    Utility.wait(2) ;this is how much time in seconds actor will be disabled
    akActor.Enable()
    Debug.notification("ta-da!")
    endIf
endEvent
Be noted that this won't work if you equip that ring through console or via script. The OnEquipped event only fires if item is equipped from inventory.

 

 

Ah that's great :D thanks a lot for the info! <3 <3

Link to comment
Share on other sites

 

Scriptname ring_of_blink extends ObjectReference

Actor property ActorRef

Event OnEquipped(Actor akActor)
    ActorRef = akActor 
    ActorRef.Disable()
    ActorRef.Enable()
    Utility.wait(2)
    Debug.notification("ta-da!")
    endIf
endEvent

Yes that script will alost do what you want, it needs utility.wait between disable and enable calls though. Also Actor property isn't needed.

 

 

 

 

Event OnEquipped(Actor akActor) 
    akActor.Disable()
    Utility.wait(2) ;this is how much time in seconds actor will be disabled
    akActor.Enable()
    Debug.notification("ta-da!")
    endIf
endEvent
Be noted that this won't work if you equip that ring through console or via script. The OnEquipped event only fires if item is equipped from inventory.

 

 

 

Hey again, I tried to add the script to the item in the CK but I can't work out where it's added and what the property would be. I found this page: https://www.creationkit.com/index.php?title=Property_Reference but it's rather confusing. I tried setting the property as actor, but I'm probably wrong.. Perhaps there is a step to step tutorial you know about? :D Thanks again! <3

Link to comment
Share on other sites

1 First put this script in notepad++

Scriptname ring_of_blink extends ObjectReference

Event OnEquipped(Actor akActor)
    akActor.Disable()
    Utility.wait(2) ;amount of time between disabled and enabled.
    akActor.Enable()
    Debug.notification("ta-da!")
    endIf
endEvent

2 Save file as ring_of_blink.psc

 

3 Place file in: Fallout 4\Data\Scripts\Source\User

 

4 Open creation kit and load your esp.

 

5 Under gameplay tab along the top, open papyrus script manager.

 

6 Enter ring_of_blink into the filter field to find your script.

 

7 Right click on it and compile it.

 

8 go to your custom equip-able item and open it.

 

9 click add script.

 

10 select the ring_of_blink script.

 

11 Click ok again, there are no properties to set.

 

12 Click ok again to close the item and accept the changes.

 

13 save esp

 

14 try it out ingame.

 

Link to comment
Share on other sites

1 First put this script in notepad++

Scriptname ring_of_blink extends ObjectReference

Event OnEquipped(Actor akActor)
    akActor.Disable()
    Utility.wait(2) ;amount of time between disabled and enabled.
    akActor.Enable()
    Debug.notification("ta-da!")
    endIf
endEvent

2 Save file as ring_of_blink.psc

 

3 Place file in: Fallout 4\Data\Scripts\Source\User

 

4 Open creation kit and load your esp.

 

5 Under gameplay tab along the top, open papyrus script manager.

 

6 Enter ring_of_blink into the filter field to find your script.

 

7 Right click on it and compile it.

 

8 go to your custom equip-able item and open it.

 

9 click add script.

 

10 select the ring_of_blink script.

 

11 Click ok again, there are no properties to set.

 

12 Click ok again to close the item and accept the changes.

 

13 save esp

 

14 try it out ingame.

 

 

Wow thanks a lot for this! It all worked fine (had to remove 'endif' from the script to compile it though).

 

Thanks again for your help, I was definitely doing it all wrong!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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