Jump to content
Maffegozer

LABatallionChief.script help

Recommended Posts

Hello,

I've recently made some changes to LA Mod v2.0.1 + AUS submod.

So i've added a Virtual Object (VO) at firestation 1 at a parking spot. same height as that from the other ambulance spots.

named it: fs_ambulance05 (actually made more VO's with same name: fs_ambulance06 , 07 etc.)

Now i've gotten sofar that i got this:

I've changed LAFireStationStart so that it spawns there correctly and that the crew enters the vehicle.

But now the problem is.

It can't be called by the Batallion Chief.

It just buys a other ALS one.

It can only be called when you select the vehicle and let it move somewhere.

I've figured out that i'd had to change something in: LABatallionChief.script

but what?

I don't know.

So somebody please help me:

Vid about my prob: http://www.xfire.com/video/29a579/

Link to comment
Share on other sites

Anyone?

Really need the help.

-EDIT 3-5-2010 12:50-

I've looked at it again.

Now i've changed some stuff (added stuff)

And hope it will work now...

What I did is (in LABattalionChief.script)

Added this bit in the beginning:

const char VO_AMBULANCE05[]                     = "fs_ambulance05";

a bit further on I've added a bit so it looks like:

		GameObjectList l1;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE01, l1, ACTOR_VEHICLE);
if(l1.GetNumObjects() > 0)
{
Vehicle v = l1.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance02 = true;
} else
Ambulance02 = true;
}
if (!VehicleCalled && Ambulance02)
{
GameObjectList l2;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE02, l2, ACTOR_VEHICLE);
if(l2.GetNumObjects() > 0)
{
Vehicle v = l2.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance03 = true;
} else
Ambulance03 = true;
}
if (!VehicleCalled && Ambulance03)
{
GameObjectList l3;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE03, l3, ACTOR_VEHICLE);
if(l3.GetNumObjects() > 0)
{
Vehicle v = l3.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance05 = true;
} else
Ambulance05 = true;
}
if (!VehicleCalled && Ambulance05)
{
GameObjectList l5;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE05, l5, ACTOR_VEHICLE);
if(l5.GetNumObjects() > 0)
{
Vehicle v = l3.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance04 = true;
}Else
Ambulance04 = true;
}

While pasting this. I think I did something wrong:

At the beginning I see the ambulance02 = true bit.

But I deleted that at the next few lines of ambulance03.

And it isnt at the one I added either.

So Im gonna test this now. If it doesn't work that will be the first thing i will fix.

-second edit-

well tested it.

No errors.

But it doesnt work.

Noticed something that the personel for a other ambulance i placed gets a good run to go to its vehicle:

Watch this vid.

So i'm gonna fix those things.

Hopefully i can.

-third edit-

Well.

Changed the code above to how it is now..

Stil doesn't work.

I don't know how to fix it now!

Anyone please help!

-fourth edit-

Well people.

Just found out.

That I can call them with a cop.

But still not with the batallion chief...

Look at this: Link.

Link to comment
Share on other sites

Guest bomb123

Hello,

I've recently made some changes to LA Mod v2.0.1 + AUS submod.

So i've added a Virtual Object (VO) at firestation 1 at a parking spot. same height as that from the other ambulance spots.

named it: fs_ambulance05 (actually made more VO's with same name: fs_ambulance06 , 07 etc.)

Now i've gotten sofar that i got this:

I've changed LAFireStationStart so that it spawns there correctly and that the crew enters the vehicle.

But now the problem is.

It can't be called by the Batallion Chief.

It just buys a other ALS one.

It can only be called when you select the vehicle and let it move somewhere.

I've figured out that i'd had to change something in: LABatallionChief.script

but what?

I don't know.

So somebody please help me:

Vid about my prob: http://www.xfire.com/video/29a579/

please can you release it?!

Link to comment
Share on other sites

Guest sondreen

Just asking here, I'm no pro;

Have you edited the LAToFirestation.script so that the new vehicles know where to park?

(Should be a tutorial covering every part of creating new vehicles if you just search for it)

Link to comment
Share on other sites

One thing I noticed is you have:

GameObjectList l5;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE05, l5, ACTOR_VEHICLE);
if(l5.GetNumObjects() > 0)
{
Vehicle v = l3.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance04 = true;
}Else
Ambulance04 = true;
}

Try this:

GameObjectList l5;
Game::CollectObstaclesOnVirtualObject(VO_AMBULANCE05, l5, ACTOR_VEHICLE);
if(l5.GetNumObjects() > 0)
{
Vehicle v = l5.GetObject(0);
if (!v.HasCommand(DUMMY_VCALLED))
{
v.AssignCommand(DUMMY_VCALLED);
VehicleCalled = true;
} else
Ambulance04 = true;
}Else
Ambulance04 = true;
}

You need to make sure all the l# are changed to 5. I dont know this will fix the problem, but its a step in the right direction. These are easy to miss. Done it several times myself :P Strange it doesnt complain about a script error though. Have you checked the log file to see if it reports any problems? Also post the whole section regarding object PcmdCallAmbulance : CommandScript. I assume this is between the references to Ambulance03 and 04 VOs?

Link to comment
Share on other sites

Im having a simular problem only I changed the HAZMAT truck for the HES and everything works right except for when I call it with the BC. I have checked the scripts above. Where did I go wrong?

Link to comment
Share on other sites

Im having a simular problem only I changed the HAZMAT truck for the HES and everything works right except for when I call it with the BC. I have checked the scripts above. Where did I go wrong?

Start your own thread next time. It easier to keep track of things when your not dealing with 2 peoples errors in one thread.

Anyways, define what exactly is wrong? I am guessing you hit call Hazmat from the BC and it calls a hazmat from off the map? If so you need to edit LABatallionChief.script and change the pcmdcallhamzat command to call the HES.

Link to comment
Share on other sites

Hello,

I've recently made some changes to LA Mod v2.0.1 + AUS submod.

So i've added a Virtual Object (VO) at firestation 1 at a parking spot. same height as that from the other ambulance spots.

named it: fs_ambulance05 (actually made more VO's with same name: fs_ambulance06 , 07 etc.)

Now i've gotten sofar that i got this:

I've changed LAFireStationStart so that it spawns there correctly and that the crew enters the vehicle.

But now the problem is.

It can't be called by the Batallion Chief.

It just buys a other ALS one.

It can only be called when you select the vehicle and let it move somewhere.

I've figured out that i'd had to change something in: LABatallionChief.script

but what?

I don't know.

So somebody please help me:

Vid about my prob: http://www.xfire.com/video/29a579/

Are the Ambulances set on Standby Mode?

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