|
Post by hartnell on Aug 24, 2007 2:43:01 GMT -5
I've discovered some issues in using JScript.
#1 The file doesn't alway seem to save as .bjs #2 Virtual keycodes don't work at all.
--hartnell
|
|
|
Post by Guilect on Aug 24, 2007 6:20:54 GMT -5
Will look into it.
For now, perhaps just make sure to manually add the extension ".bjs" to any filename before saving.
|
|
|
Post by Guilect on Aug 25, 2007 13:05:00 GMT -5
OK, when using virtual keys in JScript you need to put "()" after it. Like so:
Key.pressed( vk_escape() )
|
|
|
Post by hartnell on Sept 3, 2007 11:17:18 GMT -5
A constant's a constant. Out of mind-boggling curiosity, why the ()?
--hartnell
|
|
|
Post by Guilect on Sept 3, 2007 19:02:45 GMT -5
because there is no way a adding a constant behind the scenes to make it accessible to the B2D user. And since everyone refused to use an include file with the key code constants, which would have worked like a constant, the keycodes are actually functions with no input parameters that return the key code value. In VBScript you can do like this VK_ESCAPE, but in JScript all functions require the "()", so VK_ESCAPE().
|
|
|
Post by hartnell on Sept 4, 2007 16:12:16 GMT -5
Understood. Then it's time for a standard B2D library. Thanks for taking the time to explain it, in the future when there are issues between the scripting language and the b2d engine, let me know, I get it now. -- hartnell
|
|