Jump to content
Hoppah

Replacing a vehicle in one of the fire stations

Recommended Posts

Guest Soucy

Hello everyone, for the past several days I have been thinking about replacing the Hazmat with a Tower truck and the Tower with a Tiller. I did the tiller with no problems. I replaced the hazmat with a ladder. Now when I tell the tower to return to base it just says theres no space. I edited the LAtoFireStation.script below. Anyone know how I can get it to return to gate 6?

else if(StrCompare(v.GetPrototypeFileName(), OBJ_LADDER) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_TILLER) == 0)

{

GameObjectList l3;

Game::CollectObstaclesOnVirtualObject(VO_LADDER, l3, ACTOR_VEHICLE);

if(l3.GetNumObjects() > 0)

{

Mission::PlayHint(HINT_NOSPACE);

Game::ExecuteCommand(CMD_GOHOME, &v, &v);

return;

} else

{

ParkinglotFound = true;

ActorList l1 = Game::GetActors(VO_LADDER);

ActorList l2 = Game::GetActors(VO_TURNTO3);

ActorList l2 = Game::GetActors(VO_TURNTO6);

}

Link to comment
Share on other sites

on the first page we see how the firefighters and paramedics are numbered so we know how to change the numbers in the script ..... but now I tryed to replace the BLS Ambulance ( LA Mod 1.9.3 SG ) at the rear parking lot with the Engineer Vehicle ....... now my questions

1 - can these guys be deployed from the FireStation ?

2 - does anybody know what number the Engineer got ? or where I am able to find this number ....

thx

Link to comment
Share on other sites

No idea, maybe the getshears command (or whatever it is called)?

How exactly did you add the jaws of life to the engines? If you checked the boxes in the traits menu of the editor, I'm not sure if that will work because hoppah's models are locked so they can't be changed.

I did, I also put jaws of life and hose in Hazmat at Station 2 and use it as a support unit as it doesn't do me any good @ sta 2 as a Hazmat. I feel that the Ladder truck should be at station 2 or something else but not a Hazmat unit. :gruebel:

Link to comment
Share on other sites

Guest njcjedi

For anyone that was vista and has the saving problem, all you have to do is right click on the script folder then go to properties, then click on the user you are singed in as then click edit then click full control. After all of that, you can now save the changes to the script. :holdglass:

Link to comment
Share on other sites

Guest njcjedi

Hoppah I have a question, what part of the batallion cheif's scriptdo i have to change to fix this problem? As the batt. cheif I call the truck that i switched but instead of dipatching the truck from the firehouse, it automatically calls a new one.

Link to comment
Share on other sites

hello

i have found a old script here in the forum which replace the hazmattruck with an arial ladder

i want this script work for 2.0 so i copied the auto staff files from the LAfireStation.script to the old one and let the other two ( latofirestation.script and Lafiresationstart.script ) as they were

after i replaced them i tryed to play a little bit freeplay but at the beegining i got an script error and a BTD

do i forgot something to chance? or what?

greetings

Link to comment
Share on other sites

I am making the change of putting the HES in place of the HAZMAT. I have everything working except for when I call it by the BC it says not avalible and buys one, but in stead of it being a HAZMAGT truck it is the HES so where did I forget something?

Link to comment
Share on other sites

Guest piromaniac101

Because it's one of the most asked questions on the forum I made a list of what files have to be changed when you want to replace a vehicle in one of the fire stations. This includes changing the command to call it from the fire station.

It's impossible to explain every detail in the script, so some scripting knowledge might be handy.

It's NOT adviced to make any changes to the (bays of the) engine's and ambulances, because they have a far more advanced script logic. Patience is required to do this.

Lets say you want to replace the USAR squad with the Watertender, because they have about the same size and only one of them can be parked in the bay.

-------------------------------------------------------------------------------------

Files which are necessary to change:

LAFireStationStart.script (to spawn the vehicle at start)

LAFireStation.script (for crew and gate information at fire station)

LAToFireStation.script (park command)

LABattalionChief.script (call command)

Other:

Adding the "Go to fire station" command to the new vehicle

Removing the "Go to fire station" command to the replaced vehicle

-------------------------------------------------------------------------------------

LAFireStationStart.script

First thing you can try is to let it spawn at the right spot with crew when you start a new game. LAFireStationStart.script does nothing more than that. Some analizing of LAFireStationStart.script reveals that the prototype of the USAR squad is mentioned in line 23. Changing that prototype to any other prototype is enough to spawn another object. in this case "water_tender.e4p".

You don't need to change the constants or anything else. Same thing counts for other things explained later.

When you further look for USAR, you should eventually find line 230 which should say

ActorList l12 = Game::GetActors(VO_USAR);

The lines below are important. They set number of passengers (and sometimes transports), speed and the crew that enters the vehicle at start. Notice the numer that is used in the crew line. The code of that line refers to another script and calls a single unit for that vehicle. The numbers refer to the certain unit (USAR firefighter in this case).

List of possible units:

1 = FF/PM with case

2 = FF/PM's with stretcher

3 = FF/EMT

4 = Battalion Chief

5 = FF HAZMAT

6 = USAR FF

7 = FF/EMT's with stretcher

-------------------------------------------------------------------------------------

Important tips: You can do millions of things with C++, it's impossible to explain everything, just compare your code with other codes in the scripts. For example: When you want to add 4 firefighters instead of 2 just look at other parts in the script. Besides that, testing is very important. If you fail first time, please try it again before going to the forum. And remember kids, it's like sex, you don't immediatly run to mommy and daddy when you can't get it up at your first date.

That's it for now. I hope most people understand this. When I have more time I will see if I can explain the other scripts.

Link to comment
Share on other sites

Guest piromaniac101

ive tried to add three vehicles in the parking lot. one at station one. and two at station two, ive gone through all the scripts im supposed to change but i cant get to work can someone give the correct scripts to make it work properly

Link to comment
Share on other sites

ive tried to add three vehicles in the parking lot. one at station one. and two at station two, ive gone through all the scripts im supposed to change but i cant get to work can someone give the correct scripts to make it work properly

Firstly, theres an edit button.

Second you dont have to quote some huge post, as you can see, to reply.

Third how can we help you? You havent provided us the scripts. You havent told us what the exact problem is. Nor have you even told us what vehicles you want at the fire stations. You havent told us if you placed virtual objects for the new units, etc. We need some indication of what you have or havent done to help you.

Link to comment
Share on other sites

Guest piromaniac101

didnt mean to put a long quote in the post. its my first time using this trying to get the hang of it. and im trying to add two water tenders and a brush unit. i did put virtual obects in the editor and as for the scripts that i put in i dont have them any more, had to delete them to play free play properly, because the game would stop working after it loaded up because of the errors in the scripting.

Link to comment
Share on other sites

Hmm, I still need to finish this 'tutorial', but I think it's too much work to descrive the necessary changes in the other scripts (especially the battalion chief script). I might write something down to add vehicles to the parking lot of fire station instead. Something that was already done in one of the submods.

i've been working for the past couple of days trying to understand exactly how these scripts work without too much success. i'm sure a walk through for adding vehicles to the parking lot would be more than greatly appreciated when you have time to help us.

Link to comment
Share on other sites

i've been working for the past couple of days trying to understand exactly how these scripts work without too much success. i'm sure a walk through for adding vehicles to the parking lot would be more than greatly appreciated when you have time to help us.

i agree, i also tried to change the really unneeded hazmat with the very needed foam tender with no luck.

it would be really nice if someone of the gurus could make a nice step-by-step walkthrough from the first step to the last.

thanx!

p.s. SOLVED!

there is a nice explanation in the second post in this thread here:

and a zip file with changed scripts ))

Link to comment
Share on other sites

First of all - Hello all!

I made few vehicle changes and one gives me unsolved problem. I switched BLS for Brush patrol in Station 2. Everything works fine until Brush unit is send back to the station. It goes correctly via the back door (which works ok), then through the garage and parks just in front the station facing the garage.

I will be thankful if someone can give me some help. I attach 2 moded scripts which problably cause a problem - LAtoFireStation and LAFireStation.

scripts.zip

Link to comment
Share on other sites

I'm getting confused when I go to change the staffing of the new vehicle. I've replaced the BLS ambulance with an ALS ambulance atg station 2, but when I go to the LAFireStationStart.script, I can't figure out where to change the staffing. From Hoppah's post, It seemed like you just put in the numbers for the people you wanted, but when I do that, I get a message that the script is undefined. any ideas?

i have the same issue...i have searched the forums and read everything i have found and still can not get it figured out...i am also wanting to replace the USAR with HAZMAT @ FS1 and replace HAZMAT with Aerial Ladder @ FS2

Link to comment
Share on other sites

to change the staffing you need to adjust the people attached to the vehicles in the firestation and firestationstart scripts. to change vehicles you need to adjust all three (3) firestation scripts. ie firestation, firestationstart and tofirestation

@Kawu i have no idea why your brush would do that, i see nothing wrong with the scripts but i will look at them harder and see what i can come up with using my own mod and scripts.

Link to comment
Share on other sites

I have the LAFireStationStart script changed. I have messed with it several times and still no luck. This is what I am trying to do: replace BLS Ambulance at FS2 with ALS Ambulance (got this completed), replace HazMat @ FS2 with Aerial Ladder (not worked on yet), spawn correct staffing (can't get to work right for FS2), stage various units around the city (2 Rescue Amb and 1 HES). The issue I have with the replacement ALS Amb at FS2 is that it will not go back to FS2. Can anyone PM me and help me figure this out? I am, in the mean time, continuing to figure this out.

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...