Wednesday, July 27, 2011

r938 - Slopes and Keyboard Binding

  • Adds 14 new stairs
  • Adds 16 slopes
  • Can execute scripts from other script files via script.runScripts(fileName).  The other script can't sleep but if you want to sleep then create a function in another file on loading and sleep within the function.
  • Adds a new module called keyboard to scripting
    • bindKey(int keyID, String scriptName) - Executes the specified script whenever the specified key is pressed
    • unbindKey(int keyID) - Removes the script bound to the specified keyID.
    • bindAllKeyScript(String scriptName) - Whenever any key is pressed, the specified script is run.  The variable keyID contains the ID of the key pressed.
    • unbindAllKeyScript() - Removes the binding to the script for all key presses.
    • isKeyDown(int keyID) - Returns if the specified key is down.
    • getKeyName(int keyID) - Returns the name of the specified keyID
    • getKeyID(String keyName) - Returns the ID of the specified key name.

11 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. It seems there are a few mix-ups. The fishing rods are damaged, and the last 5 slopes are all the same, not just by texture, but also by ID and damage value. Just thought I'd point that out.
    Also, my map is now in Alpha, which brings up the question: How do I get my map hosted on the Map Downloads? Do you have to do it, or do I need to do something? The topic pretaining to this wasn't specific enough to me, due to the exceptions.

    ReplyDelete
  3. And I don't mean hosting it on a topic in the Maps section on the wikkii page, just to clarify.

    ReplyDelete
  4. time.sleep seems to make the game crash

    ReplyDelete
  5. Seems to be fixed now! Thanks!!

    ReplyDelete
  6. Erm, just went to play a map after updating, a texture (I forget what it was) has changed to some strange tile texture and custom item textures and names have reverted back to their originals.

    ReplyDelete
  7. @SN777 Divinus, e-mail me with a link to the map. I need a 200x200 image and a short description (needs to be pretty short to fit in game).

    ReplyDelete
  8. @Cryect:
    Okay. I'm already onto working on resizing and describing, but I'm having trouble finding your e-mail account. :/ I'll keep searching, though.

    ReplyDelete
  9. Thought it was in my readme, sorry if it isn't. Anyways it's my username at gmail.

    ReplyDelete
  10. No prob.
    I apologize for seeming so ignorant (Hopefuully the last question. I guess it's just one of those mornings. @_@), but does the map itself and what will be displayed on the Map Downloads screen need to be in 2 seperate .zip files? Or must they be in the same .zip file? Or does the 200^2 pic and mapInfo need to be directly e-mailed to you?

    ReplyDelete
  11. Never mind. I'll just go with option 3.

    ReplyDelete