Edward_Lii {l Wrote}:And who knows, maybe the onSave and onLoad events can be used for some interesting puzzles?
Not really


BTW, is it useful to allow each block has its own local variables, just like C++ classes? And is it hard to implement?
Edward_Lii {l Wrote}:And who knows, maybe the onSave and onLoad events can be used for some interesting puzzles?
odamite {l Wrote}:Here's my take on the icon. I tried to follow the new inky-style. However I think that looks a bit out of place on a block but fine in the popup menu.
Edward_Lii {l Wrote}:...
I fully agree, I implemented an enable state for blocks to substitute dynamic addition and removal of objects.
This way blocks can be disabled and re-enabled through scripting making them fully disappear, both visually and collision wise.
acme_pjz {l Wrote}:I found a minor problem, the moving blocks already have a property named "enabled", so if we want to expose it in scripting API we have to rename itmaybe "activated"?
Edward_Lii {l Wrote}:I assume you mean rename the new enabled property to activated?
If so, go ahead and change it, the enabled property probably isn't used in any levels yet.
acme_pjz {l Wrote}:No, I mean the old enabled property of moving blocksChange it will only affect UI translation, though. IMHO it's confusing if a block becomes invisible when we "deactivate" it
tile(ConveyorBelt,450,300){
disabled=0
enabled=0
speed=2
}
Edward_Lii {l Wrote}:I agree that "enable" is a bit more logical than "activated", but how do you plan on changing it?
Only naming it "(de)activated" and keeping the name in the file "disabled" for backwards compatibility will make the level files look weird
acme_pjz {l Wrote}:BTW, the new "enabled" property doesn't save to the level file, right? It can be accessed with script only
acme_pjz {l Wrote}:Currently the script code is compiled every time when script is executed. I think it will affect game performanceI'd like to change the code to compile the script after the level is loaded (in level editor, after test play button clicked).
acme_pjz {l Wrote}:We could also add some get/set function to script APIs to allow script change the event handler at rumtime. Is it a good idea?
There is a "level" library already. I think maybe we should merge them?Edward_Lii {l Wrote}:Added a game library to the ScriptAPI, it can be used to retrieve time and number of recordings as well as winning the level through scripting.
acme_pjz {l Wrote}:There is a "level" library already. I think maybe we should merge them?
Users browsing this forum: No registered users and 0 guests