Only dustmod or nexus level types can have scripts added to them. (update: I believe this is no longer necessary but still recommended)įirst, after creating a new map make sure to set the level type to “Dustmod”. Angelscript does not automatically zero data. These kinds of calls should just be used for rendering. Do not update game state based on information obtained from calls like ‘get_active_player()’.Do not update any state within the script.draw() callback, it should only be a rendering of the current game state.Do not call draw functions outside of the script.draw() callback. ![]() In addition, the following constraints should be followed to ensure your script works for online multiplayer: Instead you can store all of your state as member variables of your script class. In order to help with save states (and multiplayer) your scripts can not make use of non-const globals (you should see an error). I will avoid breaking the ABI so that old scripts will continue to work, however there may be some exceptional circumstances where this is necessary while the Dustscript system is still in early development. The API definitions and documentation will be updated here and here. Dustscript relies heavily on object handles in particular so understanding how they work is helpful in understanding how to use Dustscript. The Angelscript documentation page can be found here. Fortunately Angelscript borrows a lot of syntax from C++. AngelscriptĪ basic understanding of Angelscript is needed to write Dustscripts. sending cheated replays and decoupling scripts from the exact game ABI. Keeping scripts in their own isolated contexts rather than running them within the game context was necessary to prevent scripts from e.g. ![]() Each script is run within its own isolated context that communicates with the game script using the Dustscript API. Want the player to have to clear the enemies in a room before being able to progress? Dustscript can make it happen.ĭustscript makes use of the AngelScript runtime already used within Dustforce. Dustscripts allow level authors to make their levels more dynamic by adding their own custom game behavior. ![]() Dustscript support has been added to Dustmod.
0 Comments
Leave a Reply. |