October 23, 20197 yr comment_324829 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 Report
October 23, 20197 yr comment_324830 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. Report
October 23, 20197 yr Author comment_324831 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? 😮 Report
October 23, 20197 yr comment_324832 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. Report
October 23, 20197 yr comment_324833 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. Report
October 23, 20197 yr Author comment_324834 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 Report
October 23, 20197 yr Author comment_324835 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 Report
October 23, 20197 yr comment_324836 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. Report
October 24, 20197 yr comment_324845 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. Report
October 24, 20197 yr Author comment_324846 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? Report
October 24, 20197 yr comment_324848 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. Report
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.