Skul 0 Posted October 21, 2003 Okay, here's the deal. I'm making a video mission based around a certain character. If I can get this, then I should be able to have it finished by today, or maybe tomorrow...but with me, it's bound to take a million years to finish (remember all those dates when I said certain missions and a certain campaign were gonna come out? Ooh, boy!) Er, anyhoo, as you've probably guessed from the title, I want time to slow down when this unit fires his LAW. I've got an extremely (and I mean extremely!) vague idea of what the script code should look like. Apart from that, I haven't got the foggiest... Any help would be appreciated. TIA... and to any mods who get pissed off and tell me to search (which I have), I'd also like to say AIA (Apoligising In Advance). [Gareth Gates must die] Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 You set the time to slow......oh man, I know this command but I ain't have it right now!!! arrrghh something setaccuratetime or something and then 0.1 or i 2 Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 Yup. Setacctime # I want it to slow down when the unit fires his LAW. After the target is destroyed by it, time is restored to normal. [Gareth Gates must die] Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 type next to that command.......0.000000000001 Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 ...Not THAT slow! I don't want time to practically freeze, just slow down a bit. Now, can anyone give me the 'when-a-weapon-is-fired-something-happens-command'? lol...0.000000000001..where'd you get that idea from? [Gareth Gates must die] Share this post Link to post Share on other sites
RED 0 Posted October 21, 2003 Use the fired eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit addEventHandler ["fired",{[_this select 1] exec firedlaw.sqs}] firedlaw.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?_this select 0 != "LAWLauncher": exit Setacctime 0.1 Is that what you wanted? RED Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 To make soldier fire his weapon just do the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this dofire me command or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> you fire "at4" And he will fire his weapon. But if you want is so that the camera slows down and focuses on whatever right when the missile is fired, then look for the command that detects and checks the unit firing the missile, so that when he fires it the script knows it then the cam or the game slows down imediatlly Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 Use the fired eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit addEventHandler ["fired",{[_this select 1] exec firedlaw.sqs}] firedlaw.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?_this select 0 != "LAWLauncher": exit Setacctime 0.1 Is that what you wanted? RED man I still need to get used to event handlers and shit. So does that make it so that when the law or rocket is fired then cam script is activated and what does the cam do? follow it or something?? Share this post Link to post Share on other sites
Acecombat 0 Posted October 21, 2003 What if there are many people firing LAWS how will it detect at which to slowdown? And will it work for the RPG onthe other side too? This is simply asking if theres a battle raging with both sides using the weapons ? Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 Now i'm confused. Someone fill me in on the importance of the Eventhandlers...plz!! Share this post Link to post Share on other sites
RED 0 Posted October 21, 2003 Eventhandles are true to their name, they handle events. The events it can handle are: Quote[/b] ]"Killed" "Hit" "Engine" "GetIn" "GetOut" "Fired" "IncomingMissile" "Dammaged" "Gear" "Fuel" "Init" You add an event to a specific unit, the event will not be trigged until a specific condition is met (like a trigger) When the condition is met, the EH will then activate with certain arguments which can be used. The small example I posted above will wait till that unit has fired, each time the unit fires it will activate the firedlaw.sqs script. The firedlaw.sqs checks which weapon was used to fire the projectile (which can also be found btw) if the weapon is not eqaul to "LAWLauncher" it will exit. Check out the com ref for a better example. RED Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 okie. the engine on thing. Would that be like if the engine turns on say..... this engineon true then the event handler possibly turns something else on so by turning the engine on then a bunch of other things happen..... Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 What if there are many people firing LAWS how will it detect at which to slowdown?And will it work for the RPG onthe other side too? This is simply asking if theres a battle raging with both sides using the weapons ? Â Don't worry 'bout that. It's just one guy firing. Use the fired eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> unit addEventHandler ["fired",{[_this select 1] exec firedlaw.sqs}] firedlaw.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?_this select 0 != "LAWLauncher": exit Setacctime 0.1 Is that what you wanted? RED Yeah! Thanks! I'll got test that out now! [Gareth Gates must die] Share this post Link to post Share on other sites
RED 0 Posted October 21, 2003 Just saw a typo: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> unit addEventHandler ["fired",{[_this select 1] exec "firedlaw.sqs"}] @bmgarcangel: Yes, that is the general idea.] RED Share this post Link to post Share on other sites
bmgarcangel 0 Posted October 21, 2003 i'm sure you can do that other ways, aka not using event handlers. Like in a script, when the rocket leaves, you use a @ blablablabla and it activates the next part of hte script in this case what would you put with @ to make it go to the next part of the script?? Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 lol, I just came back to say that. It came up with the ever annoying 'Unknown operator' crap. Right. Off to test the proper script! [Gareth Gates must die] Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 Works like a charm!!! Thanks loads, RED! You've gotten yourself a place in the credits! Boy, rockets sure look cool when they go flying through the air in slo-mo! [Gareth Gates must die] Share this post Link to post Share on other sites
walker 0 Posted October 21, 2003 Works like a charm!!! Thanks loads, RED! You've gotten yourself a place in the credits! Boy, rockets sure look cool when they go flying through the air in slo-mo! [Gareth Gates must die] Hi Skul Try it at night group control view with a Bradley firing a TOW Big flash bang rocket leaps from the launcher then it lights up and steers to the target. Gorgoeous Do it all the time in BSO6 using the slow time in the command engine then just press the the minus key (QWERTY one not numberpad) and your back to normal speed. Time slicing is suposed to be this big thing in so many games Max Paynes Bullet time etc we have been doing it OFP since it came out. Kind Regards Walker Share this post Link to post Share on other sites
Skul 0 Posted October 21, 2003 I'll have to try that sometime, Walker! The video I have is set at dusk, but not quite dark enough for bright flashes. In the next one, I'll make sure it's darker so the flashes are visible. Oh, and, by the way. The video is now 99% complete! Just got to get an Overview and a site to host it on and away we go! I think a lot of you will like who the video is centred around... [Gareth Gates must die] Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted October 29, 2003 Question about this time command--does it work in MP? If so, I'm assuming it's a local occurrence? If so, then what happens if only one client is in slow-mo? I know that the time acceleration in SP is based on this command by pressing the +/-, and that doesn't work in MP. I didn't know if the scripted version works in MP. Share this post Link to post Share on other sites
RED 0 Posted October 29, 2003 I am almost 99% sure it doesn't RED Share this post Link to post Share on other sites
KaRRiLLioN 0 Posted October 29, 2003 Yes, but can you say that with some certainty? ;) Share this post Link to post Share on other sites
RED 0 Posted October 29, 2003 Just tested, and no it doesn't work. RED Share this post Link to post Share on other sites
Blanco 0 Posted October 29, 2003 How about a cam that follows the rocket in slomo? Share this post Link to post Share on other sites