Jump to content

Recommended Posts

Posted

hi, sorry for my bad english,

i have convert this from skyrim(witch is no problem)

 

Scriptname HotKeyScript extends Quest

Event OnInit()
RegisterForKey(54)
endEvent

Event OnKeyDown(Int KeyCode)
If KeyCode == 54
Debug.MessageBox("Hello, World!")
EndIf
EndEvent

 

and it error

 

Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright © ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "HotKeyScript"...
XXXX\AppData\Local\Temp\PapyrusTemp\HotKeyScript.psc(4,1): RegisterForKey is not a function or does not exist
XXXX\AppData\Local\Temp\PapyrusTemp\HotKeyScript.psc(7,0): new event onkeydown cannot be defined because the script is not flagged as native
No output generated for HotKeyScript, compilation failed.

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

 

please help me what wrong with this script, i have latest patch and latest f4se,
any clue, guide, i will appreciate it.

Posted (edited)

You need to make sure F4SE's source scripts are inside the scripts/source folder, copying over the vanilla scripts they changed. The compiler is saying that the event and the function, basically are not found.

Edited by Rasikko
Posted

how to :

You need to make sure F4SE's source scripts are inside the scripts/source folder, copying over the vanilla scripts they changed.

sorry, i newbie, i never have this experience in skyrim creation kit,

where "F4SE's source scripts" located? it zip file?,

the F4SE is installed without problem, any missing step?

Posted (edited)

thanks, for clue, the compiler now not show any error,

but the script not run in game, any clue?

 

for the F4SE, the installer not work, so i must do manually to make it work,

never mind, turn out the key code skyrim and fallout 4 is not same, right shift in skyrim is 54 in fallout 4 is 161,

my script is run flawlessly,

Edited by virginharvester
  • Recently Browsing   0 members

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