Jump to content
TACRfan

False Alarms?

Recommended Posts

Thanks, i downloaded it but i cant speak german and i google translated it but the translation was butchered, can any one help with how i set it up?

Link to comment
Share on other sites

First, you probably want this one:  http://www.emergency-forum.de/filebase/index.php?entry/856-bma-script-einfach/ 

 

Next, your best bet is to look at mods that have already implemented this, but essentially each area you want to be covered by an alarm gets a VO put around it named BMA_1, BMA_2... there should also be a corresponding object in the zone, ie the alarm panel, which is similarly named. Be sure to grab a .wav that you would like to use to signal that the alarm is going off and place it according to the constants in the script. The alarm panel should get the command UpdateBMA, and the firefighter who will be turning off the false alarm should get the command BMA_Aus, if I am not mistaken. Again, your best bet is to look at some other mod that has already put the system in place and see exactly what they did and then modify it to work for your mod.

BeispielGrafik.png

Link to comment
Share on other sites

23 hours ago, CMCC626 said:

First, you probably want this one:  http://www.emergency-forum.de/filebase/index.php?entry/856-bma-script-einfach/ 

 

Next, your best bet is to look at mods that have already implemented this, but essentially each area you want to be covered by an alarm gets a VO put around it named BMA_1, BMA_2... there should also be a corresponding object in the zone, ie the alarm panel, which is similarly named. Be sure to grab a .wav that you would like to use to signal that the alarm is going off and place it according to the constants in the script. The alarm panel should get the command UpdateBMA, and the firefighter who will be turning off the false alarm should get the command BMA_Aus, if I am not mistaken. Again, your best bet is to look at some other mod that has already put the system in place and see exactly what they did and then modify it to work for your mod.

http://www.emergency-planet.com/uploads/monthly_2016_02/BeispielGrafik.png.c161254774c584c6745c16feab197661.png

i have set it up but i am not receiving calls in game, do i have to add a endless game event?

Link to comment
Share on other sites

46 minutes ago, TACRfan said:

i have set it up but i am not receiving calls in game, do i have to add a endless game event?

No. What you need to do is create an object that will execute the 'check' script that runs throughout the duration of gameplay. It requires quite a bit of scriptwork to get it working, specifically in the freeplay.script file. You also need to go into editor and add the aforementioned check object.

Basically, the BMA script works by using an object as a host so it can constantly and repetitively call its 'check script' in order to generate false alarm callouts, or set the alarm off when it detects a real fire. The host object will execute the check script, wait a few seconds and then repeat.

 

 

Link to comment
Share on other sites

33 minutes ago, itchboy said:

No. What you need to do is create an object that will execute the 'check' script that runs throughout the duration of gameplay. It requires quite a bit of scriptwork to get it working, specifically in the freeplay.script file. You also need to go into editor and add the aforementioned check object.

Basically, the BMA script works by using an object as a host so it can constantly and repetitively call its 'check script' in order to generate false alarm callouts, or set the alarm off when it detects a real fire. The host object will execute the check script, wait a few seconds and then repeat.

 

 

this is going to sound like a noob question but how would i go about setting up the script in the fp_freeplay.script fileand what would i name the object in the editor and can it be any object?, im new to scripting so im sorry for asking this

Link to comment
Share on other sites

Ok, so I have attached a picture of where the fp_freeplay.script will go for starters. As far as I know the object can be any object, you'll name it by selecting properties and then typing in a name, just ensure that it does not conflict with any other named objects on the map, I would just name it BMA_Control or something like that.

GameObjectList gol = Game::GetGameObjects("Name"); // Place the name of the object on the map which you gave the command UpdateBMA to inside quotation marks.
GameObject *go;
go = *gol.GetObject(0);
Game::ExecuteCommand("UpdateBMA", go);

If you don't have any other start up scripts you will just insert this as the code:

void start()
{

	GameObjectList gol = Game::GetGameObjects("BMA_Control"); // Again, this is where the name of the object with the command UpdateBMA will go.
	GameObject *go;
	go = *gol.GetObject(0);
	Game::ExecuteCommand("UpdateBMA", go);
	System::Log("False Alarm Script Active");

};

This file will also have the start up information for the Water Supply Script if you choose to use it, and the tiller script if you are basing your work off of LA Mod.

 

Hope this helps!

Capture.PNG

Capture1.PNG

Link to comment
Share on other sites

Ah, missed a step, you will actually have a script that looks like this for fp_freeplay.script

 

//******************************************************************************************
//  Startup Script
//******************************************************************************************

bool OnLoad()
{
	start();
	System::SetEnv("e4_doocclusion", 0);
	Process::Kill();
	return true;
}

void start()
{

	GameObjectList gol = Game::GetGameObjects("BMA_Control"); 	// Again, this is where the name of the object with the command UpdateBMA will go.
	GameObject *go;
	go = *gol.GetObject(0);
	Game::ExecuteCommand("UpdateBMA", go);
	System::Log("False Alarm Script Active"); 					// This will print in your system log that this script actually works.
																// Alternatively you could put Mission::PlayHint and this message will scroll in the ticker at the top of the screen.

};

 

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