Jump to content
Blackout

Modding Questions

Recommended Posts

Okay I have searched all over the forums for an answer to a few questions and I still can't find what I am looking for

1) I have a "Code 2 script" in place in Harbor City mod, that will make units drive traffic speeds when their lights are off, but they will still pass civilian cars and run red lights... Does anyone know of the command that you use to tell the vehicle to behave like a civilian car at red lights and such?

2) Does anyone know who to make your own 'task force group' .. I am trying to make my own so I can have each unit spawn in their bay when you deploy them

Thanks for your help! (if you help :P)

Link to comment
Share on other sites

No clue about no.1 sorry... I've played a lot of mods, but I don't think any of them have had that ability.

As for no.2:

Are you saying you want everything to spawn in station at the start of a single player game, or be able to staff specific units at a station once a game has started?

Link to comment
Share on other sites

Well the patrol function in LA mod make patrol cars and ambulances behave that way, but as soon as you move them they go back to normal

As for the spawning - it's for a multiplayer game, i just need to know how to create a new 'task force vehicle type' and i can to the rest from there

Link to comment
Share on other sites

So... vehicle type like RW, LF? It's impossible to create new types like that, I tried for a long time to have 2 different aircraft for water drops.... It didn't work

A script should be able to differentiate protoypes. I haven't sat in on a game in a long while, but are you trying to incorporate it into your alarm system?

Link to comment
Share on other sites

Well the patrol function in LA mod make patrol cars and ambulances behave that way, but as soon as you move them they go back to normal

As for the spawning - it's for a multiplayer game, i just need to know how to create a new 'task force vehicle type' and i can to the rest from there

The LA Patrol Script dosn't make them obay traffic laws to my knowlage! ( Thats why units patroling cause traffic jams )

However im sure its possible. But at this point im not to sure on how to carry it out!

I would look at doing somthing like making the car a civil uint,

Im not sure what command would have to begiven to do it though

or use this some how

const char DUMMY_TL[] = "TLT_RED ";

Object o(barricade);

If (o.EnableTrafficLight(DUMMY_TL));
Game::ExecuteCommand(HALT_VEHICLES, &v, &v);

And set it timed some how, Also the Object to barricade my not be set right. But at lest it will give you a direction to look!

I looked around for a minute and didn't see any where to do the task force, But in the SDK stuff i found this

namespace Game
{
ActorList GetActors();
ActorList GetActors(const char *Name_);
ActorList GetActors(ActorType type_);
Actor GetActor(int ID_);
int GetNumActors(ActorType type_);
int GetNumInjuredPersonNotOnTransport();

GameObjectList GetGameObjects();
GameObjectList GetGameObjects(GameObjectType type_);
GameObjectList GetGameObjects(const char *Name_);
GameObjectList GetGameObjectsWithPrefix(const char* Prefix_);
GameObjectList GetSelectedGameObjects();
int GetNumSelectedGameObjects();
bool IsParamedicWithInjuredInSelection(GameObject *Caller_);

PersonList GetParamedics();
PersonList GetDoctors();
PersonList GetFirefighters();

GameObject CreateObject(const char* Prototype_, const char *Name_);
Person CreatePerson(const char *Prototype_, const char *Name_);
Vehicle CreateVehicle(const char* Prototype_, const char *Name_);

void RemoveGameObject(GameObject *obj_);

bool ExecuteCommand(const char *Command_, GameObject *Caller_);
bool ExecuteCommand(const char *Command_, GameObject *Caller_, Actor *Target_);

float MetersToUnits(float Meters_);
float UnitsToMeters(float Units_);
void PrintObjectText(Actor &Obj_, const char *Text_);

bool LoadMap(const char* MapName_);
void ScheduleMissionstart(int Mission_, bool isNewMission_ = false);

void PlayEmitter(const char *File_, const Vector &Pos_);
float GetGameSpeed();
void SetGameSpeed(float Speed_);
float GetLastTickDuration();

float GetRealTime();
float GetTime();

void SetDefaultMessageGroup(const char* Default_);
void ShowHelpText(const char *Text_, float Duration_ = -1.0f);
void ShowHelpTextWindow(const char *Text_, float Duration = -1.0f);
void CloseHelpTextWindow();

bool CollectObstaclesOnPath(const char* path, GameObjectList &list);
bool CollectObstaclesOnTrigger(const char* trigger, GameObjectList &list, unsigned int typefilter_ = ACTOR_VEHICLE|ACTOR_PERSON|ACTOR_OBJECT);
bool CollectObstaclesOnVirtualObject(const char* vobj, GameObjectList &list, unsigned int typefilter_ = ACTOR_VEHICLE|ACTOR_PERSON|ACTOR_OBJECT);
bool IsSquadInTrigger(const char* trigger, unsigned int typefilter_ = ACTOR_PERSON|ACTOR_VEHICLE);
bool IsCivilianInTrigger(const char* trigger, unsigned int typefilter_ = ACTOR_PERSON, bool isInjured_=false);
bool IsSquadInVirtualObject(const char* vobj);
bool IsCivilianInVirtualObject(const char* vobj);
bool IsBurningObjectInVirtualObject(const char* vobj);
void HideObjects(const GameObjectList &list);
void ShowObjects(const GameObjectList &list);
int GetNrObjectsWithFlagSet(int flag_);

bool ExistsObjectWithFlagSet(int flag_);
bool ExistsNormalObjectWithFlagSet(int flag_); //checks only objects with status != FULLBURNED, which arent hidden
bool ExistsFreeLandingStage(bool tfmb_); //
bool ExistsFreeBridgeInstallPoint(); //
bool ExistsFreeTFMB();
bool ExistsFreeFMB();
bool ExistsFreeDLKInstallPosition(); //
bool ExistsEmptyFGRR_TRL();
bool ExistsEmptyFGRR_RL();
bool ExistsCoolableobject();
bool ExistsExtinguishableObject();
bool ExistsDrowningPerson(); //
bool ExistsInjuredPerson(); //
bool ExistsNonInjuredPerson(); //
bool ExistsWoundedSquad();
bool ExistsAccessibleHouse();
bool ExistsFreeRescueDog();
bool ExistsDiveArea(); //
bool ExistsCarWithEnclosedPerson();
bool ExistsCutableObject();
bool ExistsLockedHouse();
bool ExistsFreeHoseConnection();
bool ExistsAskablePerson();
bool ExistsFreeDLK();
bool ExistsRepairableCar();
bool ExistsHouseForJumpad();
bool ExistsInstalledJumppad();
bool ExistsInstalledRoadblock();
bool ExistsFreeVehicle(VehicleType type_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeVehicle(VehicleType type_, VehicleType type2_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeVehicle(VehicleType type_, VehicleType type2_, VehicleType type3_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeVehicle(VehicleType type_, VehicleType type2_, VehicleType type3_, VehicleType type4_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeSquadVehicle(VehicleType type_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeSquadVehicle(VehicleType type_, VehicleType type2_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeSquadVehicle(VehicleType type_, VehicleType type2_, VehicleType type3_, int minFreePassengers, int minFreeTransports);
bool ExistsFreeSquadVehicle(VehicleType type_, VehicleType type2_, VehicleType type3_, VehicleType type4_, int minFreePassengers, int minFreeTransports);

bool ActivateTrigger(const char *name);
bool DeactivateTrigger(const char *name);
bool ActivateWaitingPoint(const char *name_);
bool DeactivateWaitingPoint(const char *name_);
bool IsInTrigger(const char *name, const Vector &Pos_);
void CreateAreaLightsAroundTrigger(const char *name_, const char *nameForLights_, float gap_);

bool ActivateLiquid(const char *name);
bool DeactivateLiquid(const char *name);

bool IsWater(const Vector &Pos_, bool ignoreHeight_ = true);
bool IsSubmergible(const Vector &Pos_);

int GetPhysicsStep();
int GetTick();

bool FindFreePosition(GameObject *obj_, Vector &Pos_, float radius_ = 100.0f);
bool FindAvailablePosition(GameObject *obj_, Vector &Pos_, float radius_ = 50.0f, bool allowHouses_ = true);
bool GetPotentialCollisions(Actor *obj_, ActorList &list_, float radius_, unsigned int typefilter_);

void ExtinguishAllFires();

void ActivateSceneLens(bool active_);

void StopAmbientSound(const char* name_);
void SetAmbientSoundVolumeByName(const char *name_, float volume_);
void SetAmbientSoundVolumeBySound(const char *sound_, float volume_);

void SetObjectsSelectable(bool enable_);
void SetMapBoundsBlockCamera(bool enable_);
void ForceShowContextMenu(bool enable_);
void EnableMultiSelection(bool enable_);

void GetTime(int &hour_, int &minute_, int &second_);
void SetTime(int hour_, int minute_, int second_);
int GetTimeSpeed();
void SetTimeSpeed(int speed_);
float GetGroundHeight(float posx_, float posy_);
float GetFloorHeight(float posx_, float posy_);

void DrawPermanentLine(Vector &start, Vector &end, int R, int G, int B);

Vector GetCommandPos();
GameMode GetGameMode();

bool HasNamePrefix(const char* Name_, const char *Prefix_);
void EnableUpdateMissiononpause(bool enable_);

bool IsFreeplay();
bool IsMultiplayer();
bool IsCampaign();
bool IsMission();

void AddToGroup(GameObject *object_, int group_);
bool RemoveFromGroup(GameObject *object_, int group_);
bool IsInGroup(GameObject *object_, int group_);
};

Link to comment
Share on other sites

Just a suggestion Blackout,

Have you thought about doing a specific unit for each area... Like a divisional command unit. The player responsible for each area could purchase their specific unit. The unit could have a person with an individual spawn script for each area.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...