![]() Navigate to the scripts tab and enter the script name “sample.cpp” as shown and push enter. */īack in the Dustforce client make sure you toggle on the console (by default this is done using F12). * Restore the saved dust counts when a checkpoint is loaded. * Save the current dust counts when the checkpoint is saved. * Note the last seen dust count for thsi player. * Initialize each player to have collected 0 dust last frame. * Keep track of how much dust we had when the last checkpoint was saved. ![]() * Keep track of how much dust we had in the last frame. * We don't actually use the scene object in this script, but most will. You can save this file in your level_src directory or in the directory containing the dustmod binary. Get out your favorite editor and save this as the file “sample.cpp” (the cpp extension is useful if your editor supports syntax highlighting since Angelscript is so similar to C++). In this script we’re going to award the player their air charges every time we see them collect dust. Next, let’s write a quick script to attach to this level. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |