Vehicle Scripting: Entity Definition

From Mod Wiki

Jump to: navigation, search

Talk about how the main definition hooks up the vscript, script, model, etc etc. Controls, sounds, effects.

Introduction

Entity definitions define spawnable entities. These are the things you can actually spawn in the game. In the case of vehicles these link together all the different parts of the vehicle's definition - the vehicleDef, the script, the model, the effects, etc. There are a great many things configured using the vehicle's entityDef, all of which are configured using key/value pairs.

There are base definitions that can be inherited from to reduce the amount of repetition needed - for example vehicle_base_gdf.

Basics

First up there are the keys to set up the links between the major parts of the vehicle:

  • "spawnclass" - This selects the code class used for the vehicle. The most common one used is "sdVehicle_RigidBody", but there are a couple of custom ones being the "sdWalker" used by the Cyclops and the "sdJetPack" used by the Icarus.
  • "scriptObject" - The name of the script object used for the vehicle.
  • "vs_vehicleScript" - The name of the vehicleDef used.
  • "model" - The name of the model to use.
Personal tools