TACRfan Posted February 9, 2016 Report Share Posted February 9, 2016 Is there a way to make false alarm calls in freeplay? Quote Link to comment Share on other sites More sharing options...
bma Posted February 9, 2016 Report Share Posted February 9, 2016 http://www.emergency-forum.de/filebase/index.php?entry/856-bma-script-einfach/ or http://www.emergency-forum.de/filebase/index.php?entry/1856-bma-script/ Not sure which one Quote Link to comment Share on other sites More sharing options...
TACRfan Posted February 9, 2016 Author Report Share Posted February 9, 2016 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? Quote Link to comment Share on other sites More sharing options...
CMCC626 Posted February 16, 2016 Report Share Posted February 16, 2016 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. Quote Link to comment Share on other sites More sharing options...
TACRfan Posted February 17, 2016 Author Report Share Posted February 17, 2016 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? Quote Link to comment Share on other sites More sharing options...
itchboy Posted February 17, 2016 Report Share Posted February 17, 2016 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. Quote Link to comment Share on other sites More sharing options...
TACRfan Posted February 17, 2016 Author Report Share Posted February 17, 2016 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 Quote Link to comment Share on other sites More sharing options...
CMCC626 Posted February 17, 2016 Report Share Posted February 17, 2016 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! Quote Link to comment Share on other sites More sharing options...
CMCC626 Posted February 17, 2016 Report Share Posted February 17, 2016 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. }; Quote Link to comment Share on other sites More sharing options...
TACRfan Posted February 17, 2016 Author Report Share Posted February 17, 2016 i know just says script error Quote Link to comment Share on other sites More sharing options...