Jump to content

Sublime and Papyrus. (unable to locate script input)


Serifaz

Recommended Posts

Posted

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
Posted

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
Posted

sorry Im new to papyrus and skyrim modding in general just getting my feat wet I guess

But how do I make a custom input window. I figured out how to put in the custom swf but the input won't work

Posted

Grab my papyrus guide (in my signature.)

It can help for newbies.

 

And feel free to ask questions.

Posted

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?

 

Posted

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".

 

Posted

I am pretty familiar with flash. I implemented the same scripts and structured my file with the  same class names as the filter to see if I could type in that.

No luck. should I try and contact the skyui author?

Posted

Maybe. I don't know him personally.

 

There are a few contributors on this site that did something with Flash.

Posted

I ended up figuring it out. it was a problem with the swf the input text has to be clickable like a button not a text field

Posted

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.

Archived

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

  • Recently Browsing   0 members

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