Jump to content

Sublime and Papyrus. (unable to locate script input)


Serifaz

Recommended Posts

Ok so I figured this is the best place to get help with things like this.

I have posted multiple posts before on nexus and noone replies.

I don't know weather that is because people there are soo busy, or if my post is just getting flooded out with other posts.

Either way I am trying to make my own mmo style skyrim.

I know this sounds funny because Im on my first script and already having problems.

I extracted the scripts.rar to the scripts/source directory, but when I try to compile a script it says "unable to locate script input".

I did look and the input script is not there...

Am I extending the script wrong, or is the input in a location I don't know about?

 

btw here is what I did sofar.

 

I know its not anything special and I probably have tons of errors. but right now I'm just trying to get that sorted out.

ScriptName SkyOnline extends Input

Bool bIsKeyPressed ; = False will be set to 28 which is Enter
Bool inChat ; = False
Event OnInit()
	RegisterForSingleUpdate(0.25)
EndEvent

Event OnUpdate()
	If bIsKeyPressed != Input.IsKeyPressed(28) ; Only run code when the status changes
		bIsKeyPressed = !bIsKeyPressed ; Set bool to whatever it isn't
		If bIsKeyPressed ; == True
			Debug.Trace("Do nothing")
		Else ; If bIsKeyPressed == False
			Debug.Trace("Hotkey Released, open chat")
			inChat = True
		EndIf
	EndIf
	RegisterForSingleUpdate(0.25)
EndEvent
Link to comment

ok sorry to bump this early.

But I figured out how to put a text input field in game.

Two problems tho.

1: I can't type in the input text field.

2: not sure how to make it so I can still move while menu is open.

 

My first priority is the text input though. I tried copying the textentry.fla but still didn't work.

Any help would be greatly appreciated here is my papyrus btw.

Scriptname SkyOnline extends ObjectReference

import SKSE
import Input
import UI

Bool bIsHotkeyPressed ; = False
Bool bIsEscapePressed ; = False
Int Property entHotkey = 28 Auto ; Enter
Int Property escHotkey = 1 Auto ; Escape

Event OnInit()
	RegisterForSingleUpdate(0.25)
EndEvent

Event OnUpdate()
	If bIsHotkeyPressed != Input.IsKeyPressed(entHotkey) ; Only run code when the status changes
		bIsHotkeyPressed = !bIsHotkeyPressed ; Set bool to whatever it isn't
		If bIsHotkeyPressed ; == True
			OpenCustomMenu("SkyOnline/chat", 1)
		If bIsEscapePressed; == True
			;CLOSE MENU todo
			Debug.Notification("Fix it so it closes newb")
		EndIf
	EndIf
EndIf
	RegisterForSingleUpdate(0.25)
EndEvent
Link to comment

ok so I did look through your guide (didn't read it all).

But does it say how to get text input working on a custom swf in game?

I have the swf loaded but the input wont let me type in it.

I read another post about this, they said something about not being able to register unicode characters.

should I link the post aswell?

 

I did fix up the script to use

RegisterForKey(18) ;= enter

but I just cant figure out how to input text.

Is that even possible with a custom swf that is loaded?

 

Link to comment

schlangster (author of SkyUI) did it for version 5.

How? No idea. I do not develop swf files.

 

I don't know if you need to grab the keys from the UI and then send them to the swf object (there are functions to exchange data between papyrus and swf files), or you can directly grab them in the swf.

 

If you can edit the swf files, you may want to give a look to the implementation of SkyUI, for the type of option "INPUT".

 

Link to comment

all I need now is to figure out why its not outputting the data i send to the input field.

Im not the best with as2.

can anyone possibly take a look at my file and tell me if there is something they see that I don't?

 

Edit: Figured it all out. I can now send the data to the outpout field.

 

Now is there a way to disable the custom menu if I press a key again?

I am trying CloseCustomMenu() but it isn't doing it.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use