Difference between revisions of "Level start and end points"

From Frozenbyte Wiki
Jump to: navigation, search
(Created page with "A level always needs a starting position where the character(s) will spawn at the start of the level. Game level also needs an ending point which concludes the level and exits...")
 
(No difference)

Latest revision as of 09:29, 15 June 2018

A level always needs a starting position where the character(s) will spawn at the start of the level. Game level also needs an ending point which concludes the level and exits the current mission.

Start Point

The level start point is the first Checkpoint where the character(s) spawns on the level for the first time. The game entity used is the InvisibleCheckpointEntity which can be found at: Type Tree --> InstanceBase --> Entity --> GameplayEntity --> CheckpointEntity --> InvisibleCheckpointEntity. It has some useful properties also, such as choosing if the player will be spawned with both of the characters or alone with either of them.

MissionStartCheckpoint and other properties.

Place the entity where you want the character(s) to start the level and check the MissionStartCheckpoint box under GameCheckpointComponent. This checkpoint now acts as the level starting spawnpoint. More info on spawning character(s) can be found here.

End Point

The level end point is the area which will end the current level when entered. An entity called MissionExitEntity functions as our end point and can be modified a bit as well, such as resizing its activation area or deciding if Lily is required to proceed. It can be found from Type Tree --> InstanceBase --> Entity --> GameplayEntity --> MissionExitEntity.

Place the entity where you want the level to end and resize its activation area to fit to the surroundings nicely with area tool. By default, the area will also require Lily to be inside the activation area but you can toggle that by unchecking WaitForChild box under GameTriggerWhenAllPlayersCollectedComponent.

Making a Succesful Warp

In addition to placing the entities to the levels, it needs to be specified where the MissionExitEntity will send the player to. This can be done from modifying a .lua file keeping track of the level order which in our case is init.lua, found from \data\script\mission\. It has a list of missions used in the game which can be replaced by another level by simply typing in a name of the wanted folder containing the level (note that this folder has to be relocated to \data\mission, otherwise it's not able to find the specified level). The list works just as straightforwardly as you might think: the first level is the one on the top of the list and it will advance one by one downwards as the player completes the levels. For example, if you wanted to jump from level A to level B, you'd have to write the (file) name of level B right under the (file) name of level A.

This file can be opened with most basic test editing software.

init.lua file with its level order.

Once the file has been modified as wanted, you'll have to start the game by opening mainmenu.fbe and then proceeding to test if you've been succesful in creating a succesful warp between levels.