Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
engine_obj2.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef SCRIPTS_INCLUDE__ENGINE_OBJ2_H
13#define SCRIPTS_INCLUDE__ENGINE_OBJ2_H
14#include "scripts.h"
15class OBBoxClass;
16GameObject SCRIPTS_API *Get_Vehicle(GameObject *obj); //gets the vechicle that obj is driving
17void SCRIPTS_API Grant_Refill(GameObject *obj); //triggers the same code as the refill button on the PT
18bool SCRIPTS_API Change_Character(GameObject *obj,const char *Preset_Name); //will change the character of the passed in object to the passed in preset
19bool SCRIPTS_API Create_Vehicle(const char *Preset_Name,float Delay,GameObject *Owner,int Team); //creates a vechicle,dont know what Delay is for,Owner is for the owner of the vechicle,Team says which sides factories to create it at
20void SCRIPTS_API Toggle_Fly_Mode(GameObject *obj); //makes a soldier fly if they arent flying or not fly if they are
21int SCRIPTS_API Get_Vehicle_Occupant_Count(GameObject *obj); //gets the count of occupants in a vehicle
22//these next 3 may return NULL (e.g. if no-one is in the seat or if its not a vehicle)
23GameObject SCRIPTS_API *Get_Vehicle_Occupant(GameObject *obj,int seat); //gets the occupant in the given seat of the vehicle
24GameObject SCRIPTS_API *Get_Vehicle_Driver(GameObject *obj); //gets the driver of a vehicle
25GameObject SCRIPTS_API *Get_Vehicle_Gunner(GameObject *obj); //gets the gunner of a vehicle,if there is only one person this should be the driver as well as the gunner
26void SCRIPTS_API Force_Occupant_Exit(GameObject *obj,int seat); //kick the object in <seat> out of the vehicle,if anyone is in that seat
27void SCRIPTS_API Force_Occupants_Exit(GameObject *obj); //kick all occupants out of the vehicle
28GameObject SCRIPTS_API *Get_Vehicle_Return(GameObject *obj); //like Get_Vehicle but will return the soldier if its not inside a vehicle instead of NULL
29bool SCRIPTS_API Is_Stealth(GameObject *obj); //is this object stealth
30bool SCRIPTS_API Get_Fly_Mode(GameObject *obj); //is this infantry flying via Set_Fly_Mode
31int SCRIPTS_API Get_Vehicle_Seat_Count(GameObject *obj); //get the seat count for a vehicle
32void SCRIPTS_API Soldier_Transition_Vehicle(GameObject *obj); //makes the soldier exit the vehicle they are in (or if right next to a vehicle, get in)
33unsigned int SCRIPTS_API Get_Vehicle_Mode(GameObject *obj); //Gets the mode of a vehicle
34bool SCRIPTS_API Is_VTOL(GameObject *obj); //is this something that should be targeted as a VTOL
35GameObject SCRIPTS_API *Get_Vehicle_Owner(GameObject *obj); //Gets the owner (if any) of a vehicle. Will not work if used within the first second after the ::Created event is called
36void SCRIPTS_API Force_Occupants_Exit_Team(GameObject *obj,int team); //kick all occupants not of a given team out of the vehicle
37unsigned int SCRIPTS_API Get_Vehicle_Definition_Mode(const char *preset); //get the mode of a vehicle given its preset name
38GameObject SCRIPTS_API *Find_Closest_Zone(Vector3 &Location,unsigned int Type); //Find the closest zone
39bool SCRIPTS_API IsInsideZone(GameObject *zone,GameObject *obj); //is <solder/vehicle> inside <zone>. Will now work if object is inside a zone when its created (e.g. spawns inside zone or zone is moved around them with Create_Zone or Set_Zone_Box)
40unsigned int SCRIPTS_API Get_Vehicle_Definition_Mode_By_ID(unsigned long ID); //Get the mode of a vehicle given its preset ID
41unsigned int SCRIPTS_API Get_Zone_Type(GameObject *obj); //Get the type of a script zone
42OBBoxClass SCRIPTS_API *Get_Zone_Box(GameObject *obj); //Get the box (size/position) of a ScriptZoneGameObj
43void SCRIPTS_API Set_Zone_Box(GameObject *obj,OBBoxClass &box); //Set the box (size/position) of a ScriptZoneGameObj
44GameObject SCRIPTS_API *Create_Zone(const char *preset,OBBoxClass &box); //Create a script zone and set its box
45bool SCRIPTS_API Is_Available_For_Purchase(GameObject *factory); //Is it possible to purchase a vehicle from this factory
46GameObject SCRIPTS_API *Get_Vehicle_Gunner_Pos(GameObject *obj); //Get the vehicle gunner, returns zero if there is no gunner
47void SCRIPTS_API Set_Vehicle_Gunner(GameObject *obj,int seat); //set gunner for this vehicle
48bool SCRIPTS_API Is_Spy(GameObject *obj); //Is this soldier object a spy
49SCRIPTS_API int Get_Player_Count_In_Zone(GameObject *obj,int Team); //Get the player count in a zone
50SCRIPTS_API int Get_Object_Count_In_Zone(GameObject *obj,int Team); //Get the object count in a zone
51SCRIPTS_API bool Is_Stealth_Enabled(GameObject *obj); //Is stealth enabled
52int SCRIPTS_API Get_Occupant_Seat(GameObject *vehicle,GameObject *occupant); //returns the seat that the occupant is sitting in or -1 if they aren't in the vehicle
53bool SCRIPTS_API Is_Unsquishable(GameObject *obj); //Is this soldier unsquishable
54
70SCRIPTS_API GameObject* Create_Object_Attach_To_Object(GameObject* host, const char* preset, const char* bone = NULL);
71#endif