summary refs log tree commit diff stats
path: root/src/script_system.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added the ability to pan camera to a warp pointStar Rauchenberger2021-07-061-0/+1
|
* Added background scriptsStar Rauchenberger2021-07-051-1/+8
| | | | Background scripts are scripts that are launched when a map is loaded. They differ in use from a map's init script in that they are expected to contain an infinite loop. These scripts are linked to a sprite and will be killed when that sprite is destroyed (usually when the map is unloaded, but if the sprite is made persistent then it may last longer). The thread running the script is given no warning that it is being killed; the coroutine is simply never called again, and the thread is disposed of. Because of this, background scripts MUST ensure the game is in a consistent state before coroutine yielding, because it is not guaranteed that the coroutine will ever be called again.
* Added fading in/out spritesStar Rauchenberger2021-07-051-1/+2
|
* Added sprite opacityStar Rauchenberger2021-07-051-1/+2
|
* Added debug info to Script objectStar Rauchenberger2021-03-131-0/+4
|
* Interacting with Kuma and Duster in the finaleStar Rauchenberger2021-03-121-1/+2
| | | | | | The hot spring is also a little bigger now, because I'm using an enclosure to keep Lucas in, instead of setting the tiles to being solid or not. #20
* Added text for "yes" path of "let's switch places"Kelly Rauchenberger2021-03-091-0/+1
| | | | #10
* Added "let's switch places!" Claus spriteKelly Rauchenberger2021-03-091-1/+3
| | | | | | He will wander randomly until you get close, and will then run at you. Talking to him or bumping into him does nothing currently. If you move out of his range of interest he will go back to wandering at a walking pace. #10
* Idling in front of the mirror faces you toward itKelly Rauchenberger2021-03-061-1/+8
|
* Implemented circle transition effect (for exit area)Kelly Rauchenberger2021-03-051-1/+3
|
* Started writing the Mixolydia scene!Kelly Rauchenberger2021-03-011-1/+6
| | | | | | Looking pretty good so far. TODO: direction facing functions have inverted Y coordinate. confusion expression doesn't exist yet. rest of scene.
* Added A* pathfindingKelly Rauchenberger2021-02-271-1/+14
|
* Added background music (defined on a per-map basis)Kelly Rauchenberger2021-02-271-4/+14
|
* Exposed loadMapScripts to scripting engineKelly Rauchenberger2021-02-261-0/+6
| | | | This allows common functions to be stored in not per-map script files. Which is useful for code that we're going to want in a lot of places -- i.e. how every underwater map is going to have a copy of the same exit area function.
* Added animation slowdown effect (for Lucas underwater)Kelly Rauchenberger2021-02-261-1/+2
|
* Added sprite bobbing (for Lucas underwater)Kelly Rauchenberger2021-02-261-1/+2
|
* Disabled crouching/running in the underwater mapKelly Rauchenberger2021-02-261-1/+2
|
* Added first underwater mapKelly Rauchenberger2021-02-261-1/+3
| | | | Also spruced up the event that takes you there. Also fixed an issue where transplantParty wouldn't take the medium of the new position into consideration. Also added a constructor to the lua version of vec2i.
* Lucas wades into hot spring alone when Ionia is thereKelly Rauchenberger2021-02-251-0/+3
|
* Ionia randomly appears in the waterKelly Rauchenberger2021-02-251-0/+6
|
* Added map init scriptsKelly Rauchenberger2021-02-241-2/+12
| | | | Map scripts also now actually run in their own lua thread.
* Added a clipping mode (for testing!)Kelly Rauchenberger2021-02-231-1/+2
| | | | This allows walking through solid objects. It can be enabled and disabled using StartClipping() and StopClipping() in the debug console. It should not be used in any actual scripts.
* Entering an invalid debug command fails gracefullyKelly Rauchenberger2021-02-211-0/+5
|
* Multiple scripts can be run at onceKelly Rauchenberger2021-02-211-17/+21
| | | | And they're all on their own threads again. This is mostly so debug commands can be run during execution of other scripts. But it can also be useful for map init scripts (if we want a script to run whenever a map is loaded, even though map loading is usually done by a script).
* Debug commands run inside a coroutine now yay!Kelly Rauchenberger2021-02-211-5/+16
| | | | Also it turns out you totally don't need the runner thread.
* Added a debug consoleKelly Rauchenberger2021-02-211-0/+10
| | | | | | | | Open it by pressing backtick, close it by hitting escape. Pressing backtick does not open it in release builds. Current shortcomings: opening it for the first time also types a backtick for some reason, but not on subsequent times. Also, it doesn't create a coroutine, so any script function that yields is going to fail. This also added a "is gameplay paused" flag to Game, which will be useful for adding a pause menu.
* Added sprite pausingKelly Rauchenberger2021-02-211-1/+8
| | | | | | All sprites are now paused when a cutscene starts and unpaused when it ends. Pausing means that the CharacterSystem and BehaviourSystem will not process them in their tick. This allows specific sprites to be unpaused during cutscenes if movement is needed. The player character is halted and made non-controllable by the script when the cutscene starts and made controllable again when it ends. It is important to remember that if interacting with a sprite that might be moving, you have to manually call Halt() on them in their script to make them stop moving.
* Started adding event where Claus joins the partyKelly Rauchenberger2021-02-181-2/+5
|
* Made some sprites persist between map changesKelly Rauchenberger2021-02-171-2/+9
| | | | | | The player party characters are now initialised at the start of the game and are no longer re-created after every map change. The script system takes care of moving the player into the correct position on the new map. Deleted sprite IDs are now reused the next time a sprite is created, instead of throwing out everything between maps.
* Added expressions (currently just surprise)Kelly Rauchenberger2021-02-171-1/+9
|
* Added scriptable camera panningKelly Rauchenberger2021-02-161-0/+14
|
* Added camera shake to lightning eventKelly Rauchenberger2021-02-151-1/+3
|
* Added map fadeoutsKelly Rauchenberger2021-02-141-6/+15
| | | | Screen fadeouts and map fadeouts are now handled by the effect system.
* Added lightning sprite to mailbox eventKelly Rauchenberger2021-02-131-0/+33
| | | | | | | | Sprites can be destroyed now, which really just means that their index is removed from the list of active sprites. The actual memory is not freed until all sprites are deleted on map change. Sprite layers are introduced. All sprites by default are on layer 0 (Normal) which renders them in between the lower and upper map layers. There is also a layer 1 (Above) that renders above the upper map layer, and the sprite for the lightning strike uses this layer in order to not be hidden by the trees. Fixed a bug where waiting for the end of a non-looping animation would trip the flag immediately upon the final frame activating, instead of waiting the length of the last frame.
* Added non-looping animationsKelly Rauchenberger2021-02-131-1/+2
| | | | Lucas can get electrocuted now.
* Scripts are organised per-map nowKelly Rauchenberger2021-02-121-6/+6
|
* Added choice promptsKelly Rauchenberger2021-02-111-1/+3
| | | | "A presses" are also no longer special values in the lines list, but are rather a field on the MessageLine object.
* Player movement/input is halted during cutscenesKelly Rauchenberger2021-02-101-1/+2
|
* Player is no longer controllable during map transitionsKelly Rauchenberger2021-02-101-3/+4
|
* loadMap requires a direction now, so party trails are set up correctlyKelly Rauchenberger2021-02-101-2/+2
|
* Running is preserved across screen transitionsKelly Rauchenberger2021-02-101-1/+13
|
* Direction is preserved across map transitions nowKelly Rauchenberger2021-02-101-1/+25
|
* Added fade out around map changeKelly Rauchenberger2021-02-101-2/+8
| | | | Also moved script system first in the loop so that the camera can catch up before rendering. Also added a map change from map 2 back to map 1.
* Map changing!Kelly Rauchenberger2021-02-091-0/+6
| | | | Also removed some dependencies on the Renderer. More changes need to be made. Fading to black before the change would be good. And making sure the characters are facing the right direction. Maybe that code shouldn't live in Game, either. Later we also want to combine the tilesets for these two maps (and any others that are on Tanetane).
* Added sound and animation changes to scriptingKelly Rauchenberger2021-02-061-0/+29
|
* Created script systemKelly Rauchenberger2021-02-051-0/+65