Ga naar inhoud


Foto

Removing Vehicles/Changing Models


  • Please log in to reply
6 replies to this topic

#1 EmergencyFan97

EmergencyFan97

    Senior Captain

  • Members
  • 430 Posts:
  • Gender:Male
  • Location:South Carolina, United States

Gepost 13 september 2014 - 05:49

If I wanted to remove a vehicle from a station, how would I go about doing that?  Simply delete the box-thingy (prototype?) in the editor?  And if I wanted to change the model of a truck, would I simply replace the model with the one of the same name and ensure it had a skin?


Eingefügtes Bild

#2 itchboy

itchboy

    Assistant Chief

  • Member
  • 1788 Posts:
  • Gender:Not Telling

Gepost 13 september 2014 - 05:53

If I wanted to remove a vehicle from a station, how would I go about doing that?  Simply delete the box-thingy (prototype?) in the editor?  And if I wanted to change the model of a truck, would I simply replace the model with the one of the same name and ensure it had a skin?

To remove a vehicle, simply remove the part in the script that calls the ingame function to spawn the vehicle. This is in LAFireStationStart.script

You are correct about how to change the model of a truck. Lights, physics and commands are another problem you will face afterwards.



#3 EmergencyFan97

EmergencyFan97

    Senior Captain

  • Members
  • 430 Posts:
  • Gender:Male
  • Location:South Carolina, United States

Gepost 13 september 2014 - 05:54

What about physics?  I can handle the lights and commands.


Eingefügtes Bild

#4 itchboy

itchboy

    Assistant Chief

  • Member
  • 1788 Posts:
  • Gender:Not Telling

Gepost 13 september 2014 - 05:58

What about physics?  I can handle the lights and commands.

Nothing too serious. Just set it up so that the yellow box fits the model perfectly. This is to make sure the vehicle's collision is correct and it can go around obstacles properly. Be sure to check "always use physics geom". This little tick box nearly killed my mod by making it unplayable because I forgot to actually set the game to use the custom collision boxes.



#5 EmergencyFan97

EmergencyFan97

    Senior Captain

  • Members
  • 430 Posts:
  • Gender:Male
  • Location:South Carolina, United States

Gepost 13 september 2014 - 06:01

OK.  And the part I am looking for in LAFireStationStart, is this it?

const char VO_ALS5[]     = "fs_als5";

Edit:  Also, I am looking to re-insert a changeclothes command to where SCBA FF can change to regular FF.  I gave the commands to each person, but they disappear when I execute the command in-game.  What am I doing wrong?


Eingefügtes Bild

#6 itchboy

itchboy

    Assistant Chief

  • Member
  • 1788 Posts:
  • Gender:Not Telling

Gepost 13 september 2014 - 06:07

OK.  And the part I am looking for in LAFireStationStart, is this it?

const char VO_ALS5[]     = "fs_als5";

Edit:  Also, I am looking to re-insert a changeclothes command to where SCBA FF can change to regular FF.  I gave the commands to each person, but they disappear when I execute the command in-game.  What am I doing wrong?

 

Not really. You would be looking for this:

ActorList l19 = Game::GetActors(VO_HAZMAT);
for(int i=0; i < l19.GetNumActors(); i++)
{
	Vector Hazmat = l19.GetActor(0)->GetPosition();
	Vehicle m = Game::CreateVehicle(OBJ_HAZMATSQUAD, UNNAMED);
	m.EnableBlueLights(false);
	m.EnableHeadLights(false);
	m.SetChildEnabled("exhaust", false);
	m.SetPosition(Hazmat);
	m.SetRotation(gate6);
	m.UpdatePlacement();
	m.SetMaxPassengers(4);
	m.SetMaxTransports(2);
	m.SetSpeed(8.0f);
	m.PushActionWait(ACTION_NEWLIST, 1.0f);
	m.PushActionExecuteCommand(ACTION_APPEND, CMD_COMMANDS, Caller, 0, false);
	m.PushActionExecuteCommand(ACTION_APPEND, CMD_NORMAL, Caller, 0, false);
}

Simply comment it out with this:
//
for every line or /* at the beginning of that section and */ at the end.
Or you could just delete it, but then you might have a change of mind and want to bring it back. Its up to you really.

Has your changeclothes script been modified?



#7 EmergencyFan97

EmergencyFan97

    Senior Captain

  • Members
  • 430 Posts:
  • Gender:Male
  • Location:South Carolina, United States

Gepost 13 september 2014 - 06:11

OK, thanks for the help on that.  And I have no idea if it's been modified, it's from Manchester Mod, not base LA mod.
 
Edit:  I looked through the script, but as I have very minor scripting experience, I'm not sure what's wrong with it.  Script in its entirety is found below.
 

 
Spoiler

Eingefügtes Bild