stevenpc66 Posted October 23, 2019 Report Share Posted October 23, 2019 Hello everyone, I'm trying to modify my mod about the siren, i read through the LASiren.script file, but i don't know how to delay the time before siren raise up. I means when move emergency vehicle to a point, the siren will raise up immediately, but i want the emergency vehicle will move but the siren will come after it moves for a few second. Can i get any intel from you? :D Quote Link to comment Share on other sites More sharing options...
itchboy Posted October 23, 2019 Report Share Posted October 23, 2019 I don't think its possible without reprogramming the entire siren script to run on a different method that allows you to delay the siren start, while also not interrupting the vehicle's movement. Quote Link to comment Share on other sites More sharing options...
stevenpc66 Posted October 23, 2019 Author Report Share Posted October 23, 2019 21 minutes ago, itchboy said: I don't think its possible without reprogramming the entire siren script to run on a different method that allows you to delay the siren start, while also not interrupting the vehicle's movement. So, your means is we have to re-build the script? Quote Link to comment Share on other sites More sharing options...
itchboy Posted October 23, 2019 Report Share Posted October 23, 2019 Pretty much. The siren script works by creating a dummy object that follows the vehicle. That dummy object is what actually produces the siren sound ingame. You will have to rewrite that formula to make the sirens be delayed after pressing the button. Quote Link to comment Share on other sites More sharing options...
EmC-Unit Posted October 23, 2019 Report Share Posted October 23, 2019 4 minutes ago, stevenpc66 said: So, your means is we have to re-build the script? kek. Just insert few seconds of silence to siren sounds. Quote Link to comment Share on other sites More sharing options...
stevenpc66 Posted October 23, 2019 Author Report Share Posted October 23, 2019 13 minutes ago, EmC-Unit said: kek. Just insert few seconds of silence to siren sounds. Great idea, but it's not a good way, because here is more than 10 different sirens in my mod and when the sound is looped, it will not real =D Quote Link to comment Share on other sites More sharing options...
stevenpc66 Posted October 23, 2019 Author Report Share Posted October 23, 2019 16 minutes ago, itchboy said: Pretty much. The siren script works by creating a dummy object that follows the vehicle. That dummy object is what actually produces the siren sound ingame.  You will have to rewrite that formula to make the sirens be delayed after pressing the button. I added m.PushActionWait(ACTION_APPEND, 10.f) befor Game::ExecuteCommand(CMD_SIREN, &v, &v), but it did not delay time in begin, it delayed when vehicle stopped for 10s =D Quote Link to comment Share on other sites More sharing options...
EmC-Unit Posted October 23, 2019 Report Share Posted October 23, 2019 20 minutes ago, stevenpc66 said: Great idea, but it's not a good way, because here is more than 10 different sirens in my mod and when the sound is looped, it will not real =D Than make a loop manual put another copy of the siren to loop for like 1 minute, and boom - you got this. Quote Link to comment Share on other sites More sharing options...
itchboy Posted October 24, 2019 Report Share Posted October 24, 2019 10 hours ago, stevenpc66 said: I added m.PushActionWait(ACTION_APPEND, 10.f) befor Game::ExecuteCommand(CMD_SIREN, &v, &v), but it did not delay time in begin, it delayed when vehicle stopped for 10s =D I'm afraid it doesnt work this way. If I were to do this, I would take a look create a dummy that will wait for 10 seconds, then create a second dummy that will then trigger the siren itself. The first dummy will be called upon in the VcmdSiren script to wait for 10 seconds, then after that, it will execute a new command with the vehicle (the one you are commanding) as the target. In this new command, it will instruct the original dummy to create the actual siren dummy that plays the tone. Both of them must be linked to the original vehicle using the userData lines, and the "waiting" dummy must be deleted to give way for the actual siren dummy. Quote Link to comment Share on other sites More sharing options...
stevenpc66 Posted October 24, 2019 Author Report Share Posted October 24, 2019 2 hours ago, itchboy said: I'm afraid it doesnt work this way. If I were to do this, I would take a look create a dummy that will wait for 10 seconds, then create a second dummy that will then trigger the siren itself. The first dummy will be called upon in the VcmdSiren script to wait for 10 seconds, then after that, it will execute a new command with the vehicle (the one you are commanding) as the target. In this new command, it will instruct the original dummy to create the actual siren dummy that plays the tone. Both of them must be linked to the original vehicle using the userData lines, and the "waiting" dummy must be deleted to give way for the actual siren dummy. So i still have to modify in move.script and keep using PushActionWait(), right? Quote Link to comment Share on other sites More sharing options...
itchboy Posted October 24, 2019 Report Share Posted October 24, 2019 No, PushActionWait does not function in the way that you want it to. Instead, you will have to create 2 dummy objects as I said. Simply adding the "wait" line is not going to achieve the results of what you want. Quote Link to comment Share on other sites More sharing options...