Jump to content
JrFF34

Few issues

Recommended Posts

All day I have been trying to find the cause of two problems. I added additional fire engines and for some reason am unable to get the sirens working and unable to connect hoses. I have edited the LASiren script and added the appropriate lines for the new unit and also compared everything in the editor with fireengine1. No luck. Any help?

Link to comment
Share on other sites

const char PROTO_LAX02[] = "mod:Prototypes/Vehicles/11 LAX/fire_engine3.e4p";

int soundID;

Vector CarPos = v.GetPosition();

  if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE01) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE02) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_WATERTENDER) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_LADDER) == 0 ||

StrCompare(v.GetPrototypeFileName(), PROTO_TILLER) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_HAZMAT) == 0 ||

StrCompare(v.GetPrototypeFileName(), PROTO_MOTORBOAT) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_CRASHTENDER) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_USAR) == 0 ||

StrCompare(v.GetPrototypeFileName(), PROTO_MCU01) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_USFS02) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_USFS04) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_SWAT_TRUCK) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_HEAVY_RESCUE) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_FBI_COMMAND) == 0)

  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||

                        {

int random = Math::rand()%2;

if (random == 0)

{

  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren01.wav", CarPos, true);

} else

{

  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren02.wav", CarPos, true);

}

  }

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

  StrCompare(v.GetPrototypeFileName(), PROTO_LAC01) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_BML02) == 0 ||

  StrCompare(v.GetPrototypeFileName(), PROTO_NPS02) == 0)

  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||

                        {

Link to comment
Share on other sites

Okay... I am not a script er by any means so MAKE SURE YOU BACK THIS UP... I however may see a problem.

 

This is what you put.

 

 

 

int soundID;
Vector CarPos = v.GetPosition();
  if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_WATERTENDER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_LADDER) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_TILLER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_HAZMAT) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_MOTORBOAT) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_CRASHTENDER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USAR) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_MCU01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USFS02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USFS04) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_SWAT_TRUCK) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_HEAVY_RESCUE) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_FBI_COMMAND) == 0)
  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||
                        {
int random = Math::rand()%2;
if (random == 0)
{
  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren01.wav", CarPos, true);
} else
{
  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren02.wav", CarPos, true);
}
  }
  else if (StrCompare(v.GetPrototypeFileName(), PROTO_NPS01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_LAC01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_BML02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_NPS02) == 0)
  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||

 

I believe your problem is right here

 

 

 

int soundID;
Vector CarPos = v.GetPosition();
  if (StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_ENGINE02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_WATERTENDER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_LADDER) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_TILLER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_HAZMAT) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_MOTORBOAT) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_CRASHTENDER) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USAR) == 0 ||
StrCompare(v.GetPrototypeFileName(), PROTO_MCU01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USFS02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_USFS04) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_SWAT_TRUCK) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_HEAVY_RESCUE) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_FBI_COMMAND) == 0)
  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||

                        {
int random = Math::rand()%2;
if (random == 0)
{
  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren01.wav", CarPos, true);
} else
{
  soundID = Audio::PlaySample3D("mod:Audio/FX/Sirens/Siren02.wav", CarPos, true);
}
  }
  else if (StrCompare(v.GetPrototypeFileName(), PROTO_NPS01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_LAC01) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_BML02) == 0 ||
  StrCompare(v.GetPrototypeFileName(), PROTO_NPS02) == 0)
  StrCompare(v.GetPrototypeFileName(), PROTO_LAX02) == 0 ||

 

 

From what I can tell just by looking at what is above and below the items it looks like || acts like there will be another line with the ) acts like a end.

 

REMEMBERING TO BACK UP YOUR FILES... I would try putting the || behind the FBI Command and then the ) behind your LAX engine and then do the same with the NPS02 and the LAX02.

 

Good luck.

Link to comment
Share on other sites

Okay... I am not a script er by any means so MAKE SURE YOU BACK THIS UP... I however may see a problem.

 

This is what you put.

 

 

I believe your problem is right here

 

 

 

From what I can tell just by looking at what is above and below the items it looks like || acts like there will be another line with the ) acts like a end.

 

REMEMBERING TO BACK UP YOUR FILES... I would try putting the || behind the FBI Command and then the ) behind your LAX engine and then do the same with the NPS02 and the LAX02.

 

Good luck.

 

Are you positive youre no a scripter? It worked! Now I just need to get the hoselines working where they will contact. 

Link to comment
Share on other sites

Sorry, dont need to double post but can someone give me some help with this issue? It only happens when I create a new unit. For example. I took the usfs_engine files and created a new folder  "11 CalFire"... Everything points towards the new .ep4 which is located in the new folder, but these doors keep coming up with the old scheme... But on the otherhand, if I take the new usfs_engine.dds and replace the original file in LA Fire Department, I do not have this problem.

 

f4xDdF2.png

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