Scripting API - Qwarkster/gamesys GitHub Wiki
Scripting abilities are already in place, there's a number of commands available so far. Things are still extremely verbose at this point, I'm attempting to clean things up right to the core before expanding the abilities so that I avoid clunkier code than what I have already.
NewScene
- scene_id: The string id to reference this scene.
- bgcolor: The background color to use for this scene. Creates a new Scene that is part of the Engine. The Scene does not have a visibility attribute as it is a logical grouping of views, despite the fact that it does Render().
NewMapScene
- scene_id: The string id to reference this scene.
- file: The map file to load into the scene.
- bgcolor: The background color to use for this scene. Creates a new scene and loads up a mapfile to it. Effectively a shorthand for attaching a map to a scene automatically.
NewView
- scene_id: The string id to reference the scene we are adding the view to.
- view_id: The string id to reference this view.
- x: The X position of the view on the scene.
- y: The Y position of the view on the scene.
- width: The width of the view.
- height: The height of the view.
- bgcolor: The background color to use for this view. Creates a new view on the indicated Scene. The scene does not have to be active to have a view added to it.
StartMapView
- scene_id: The string id to reference parent scene.
- view_id: The string id to reference this view. Prepares a view with a map attached for rendering.
ShowView
- scene_id: The string id to reference parent scene.
- view_id: The string id to reference this view. Changes the view's visibility to true, thus showing the view when it renders.
NewActor
- scene_id: The string id of the scene to add this actor to.
- actor_id: The string id to reference this actor with.
- imgfile: The image file to load for this actor.
- x: The X position to start this actor at.
- y: The Y position to start this actor at.
- visible: The starting visibility of the actor.
- collision: Flag to indicate how the actor interacts with map collision objects.
ViewFocus
ActorVisible
ActorSpeed
MoveActor
MoveView
Some of these are already rather not useful as I haven't visited the scripting abilities in a while, I am hoping that as I document things the obvious stuff will come to light and I will get it corrected.