Aller au contenu

Photo

Listen for a keypress


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
jeffwllms

jeffwllms
  • Members
  • 14 messages

Hello all, and anyone still monitoring these forums.  I am trying to find some help with listening for a keypress.  I am looking for a way to perform and command on a keypress.  basically like press enter/attack nearest enemy.

 

Also is these some sort of global reference to what functions funtion, global variables, etc. are available to us.  I have looked through the wiki, i can seem to find events (even those don't look complete).  Kinds of just wondering how people go about discovering things.



#2
Sunjammer

Sunjammer
  • Members
  • 925 messages

I'm not aware of any way to listen for a keypress that's been exposed to scripting. There might be a way to do it through hacking the UI (see FollowTheGord's user page for links) or you could create a custom ability and pop it the first 12 slots of your quick-bar.

 

There is a reference category in the wiki which includes the functions category. Broken functions should be flagged with the broken functions category when they are discovered however I suspect there are more than the five listed there.

 

Not sure what you are looking for in terms of "global variables". If you are talking about settings or configuration you might want to look at the INI file or one of the many 2DA files. If you are talking about scripting then values are generally transferred/persisted through effect/event variables or an object's local variables. And while it is technically possible create a variable outside of a function it is only "global" to that script or scripts that included it I wouldn't recommend doing this.

 

I can't say how others discover things but for me it is reading the wiki; searching the internet and then trial and error/a lot of testing.



#3
dhague

dhague
  • Members
  • 9 messages

AFAIK, the only way to implement what you are talking about would involve adding a new programming "Case" (condition/flag tests) to the existing "Case List" in the "Heartbeat Script" that is part of the core program resources.  This would be risky and require a high-level of understanding about the Origin "internals".  If you try it, make sure you follow strict backup procedures.