User Tools

Site Tools


vehicles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vehicles [2020/12/23 11:15] justinvehicles [2023/01/07 14:47] (current) justin
Line 2: Line 2:
 ---- ----
  
-(Overview - what are vehicles?)+=====Overview===== 
 +A **vehicle** is a special type of [[object]], for example a ship or a car, that the [[player character]] can enter and use as a method of travel. This can enable the player to move around the [[map]] more quickly, or, when used with the [[terrain_types|terrain type]] functionality, it can even allow the player to reach areas of the [[map]] that would otherwise be inaccessible to them.
  
-(Steps for setting up vehicle) +=====Creating Vehicle===== 
-- Decide what terrain types the vehicle will be traversing - can it move anywhere characters can normally, restricted to certain types (ships restricted to water), or prohibited from certain types (land vehicle prohibited from water).+To create a vehicle, you'll first need to decide which [[terrain types]] the vehicle will be traversing. Can it move anywhere [[character|characters]] can normally, specifically across any [[tile|tiles]] that have walkable [[navigation_and_interaction|navigation paths]] connected between them? Or does it need to be restricted to or prohibited from certain types of terrain, for example a ship that'restricted to water or a car that'prohibited from water? If the latter is true, then [[terrain types]] must be assigned to any appropriate [[tile|tiles]] from the [[Voxel Editor]].
  
-- If one of latter two, assign terrain types in the Voxel Editor to appropriate tiles+Taking the example of a shipyou'll need to assign an appropriate terrain type to any [[tile|tiles]] on which the ship could potentially traverse (river tiles, ocean tiles, etc.). The terrain type can be named whatever you'd like, but in this case "water" or something similar would make sense to use. Once you've added a particular [[terrain_types|terrain type]] to a [[tile]], that type will then be selectable from the list when assigning it to any subsequent [[tile|tiles]].
  
-- Create an object model for the vehicle - animations used are "default" for stationary and "move" for when the vehicle is moving+{{:assign_tile_terrain_type.gif?nolink|}}
  
-- Add object to the map and enable the "Vehicle" toggle in its Entity Properties+You'll also need to create an [[object]] model to represent the vehicle. Refer to the table below for the predefined [[animation]] names that are applicable to [[object|objects]] being used as vehicles. 
 +^Animation Name^Description^ 
 +|default|Plays whenever the vehicle is stationary.| 
 +|move|Plays whenever the [[player character]] is moving the vehicle.|
  
-(Table of vehicle propertiesspeed, terrain types, and disembark script)+{{:ship_vehicle_example.png?nolink|}}
  
-- Note that all tiles must have navigation connectedeven between land and water tilesfor exampleThe game will take care of determining whether or not character or vehicle can move between terrain types.+Once you've created a model for your vehicleadd the [[object]] to the [[map]] in the [[Map Editor]] where you'd like it to be initially located. After it's placedselect it and enable the "Vehicle" toggle setting from the [[Entity Properties]] panelRefer to the table below for description of each setting that can be adjusted for vehicles.
  
-- In-game, player can interact to enter the vehicle. Ctrl-Left Click or Ctrl + Arrow Key on a valid adjacent tile will cause the player to disembark from the vehicle onto that tile.+^Icon^Property^Description^ 
 +|{{:wiki:arrow_speed.png?nolink|}}|Speed|Determines how fast the vehicle moves in voxels per secondThis speed will override the [[character|character's]] normal speed.| 
 +|{{:wiki:terrain.png?nolink|}}|Terrain Types|Determines the types of terrain that the vehicle can or cannot traverse. See [[Terrain Types]] for more information.| 
 +|{{:wiki:script.png?nolink|}}|Embark Script|[[Script]] that will be triggered when the [[player character]] enters the vehicle.| 
 +|{{:wiki:script.png?nolink|}}|Disembark Script|[[Script]] that will be triggered when the [[player character]] exits the vehicle.|
  
-Known Issues+{{:add_vehicle_to_map.gif?nolink|}} 
-- Changing maps while the player is in a vehicle+ 
 +Using the ship example, you'll want to choose "Restricted to..." for the "Terrain Types" option and then select "water" in the resulting dialog that pops up. 
 + 
 +{{:assign_vehicle_terrain_type.gif?nolink|}} 
 + 
 +Note that all [[tile|tiles]] must have [[navigation_and_interaction|navigation]] connected with a walkable path type, even between land and water tiles as in the ship example. The game will take care of determining whether or not a [[character]] or vehicle can move between [[terrain types]]. 
 + 
 +{{:vehicle_nav_paths_01.png?nolink|}} 
 + 
 +Because of [[navigation_and_interaction|navigation]] paths now being connected between land and water, however, you'll need to make sure to set the [[terrain types]] for your [[character|characters]] to prohibit them from entering the water [[tile|tiles]]. 
 + 
 +{{:assign_character_terrain_type.gif?nolink|}} 
 + 
 +If you want a vehicle to be able to interact with [[character|characters]] and [[object|objects]] on adjacent [[tile|tiles]] but not allow the player to exit onto those [[tile|tiles]], you can use the "Interact Only" path type. In the example setup below, the player will be able to disembark from the ship while along the ocean shore, but not while travelling down the river since the paths are now "Interact Only" (i.e. the orange lines). However, they'll still be able to interact with [[character|characters]] and [[object|objects]] along the river (for example, if a [[character]] is standing on the river's edge). 
 + 
 +{{:vehicle_nav_paths_02.png?nolink|}} 
 + 
 +=====Using Vehicles===== 
 +In-game, the player can enter a vehicle by interacting with it as they would normally interact with a scripted [[object]], i.e. left-clicking with the mouse or pressing Space while facing it from an adjacent [[tile]]. Ctrl + Left-Clicking on a valid adjacent [[tile]] with the mouse or pressing Ctrl + Arrow Key in the direction of valid adjacent [[tile]] will cause the player to disembark from the vehicle onto that [[tile]]. 
 + 
 +{{:vehicle_movement.gif?nolink|}}
  
 ~~NOTOC~~ ~~NOTOC~~
vehicles.1608750923.txt.gz · Last modified: 2020/12/23 11:15 by justin