Jump to content
Sign in to follow this  
Roe-31stMEU-

SetWind Help

Recommended Posts

Hello all, I am trying to help out a squad-mate of mine make a sniper type school and he wants to try getting wind into the mission so, while using ACE 2, we can practice shooting with various different forces and directions of wind. I am able to get wind into the mission fine, and it all works great, but now here's where the issue sets in.

Instead of re-making the same missions many many times for the different winds, is there a way to like, maybe give the instructor the ability to change the direction and force of the wind on the fly while in-game? Like maybe an add-action that will trigger a script to change the direction and force? Or maybe an easier way one of you geniuses can come up with lol? Thanks for all help!

Share this post


Link to post
Share on other sites

Ok, I figured out how to get the wind changes in my game, but this is mainly for MP and I've run into a problem. When 1 person changes the wind direction and speed, it doesn't effect everyone, only there client. Is there any way to make this global changes on the server?

~~EDIT~~

Ohyea, and the command I am using right now is for example, " Setwind [0,-5, true]; "

Edited by Roe[31stMEU]

Share this post


Link to post
Share on other sites

How do change wind ? via addaction ? you're script that changes wind direction must run on the server if you want it to be applied to all clients

Share this post


Link to post
Share on other sites

Yes, right now I do have an object on the map which gives the user the addaction to change the wind speed and power. I ran the mission off my own PC which has the scripts on it, I was able to change the wind to one thing and 2 other people were able to change there wind to whatever they wanted, and it didnt affect anyone elses wind. Will this be different on a dedicated server?

DM - Unfortunatly I don't think a radio trigger will do it since I need to have an option to change the wind North, South, East, West, North East, North West, South East, and South west with about 4 different powers of the wind.... I'm not 100% sure but I didn't think the radio has enough options for all of that?

Share this post


Link to post
Share on other sites

Ok, so can anyone help with this? I just need help in figuring out how to make a script called through an add action run globally on all clients. I did a little searching and seen some people stating how to do some things with event handlers or something, but it didn't go into detail enough for someone who has no idea where to go with this.

Basically right now the add action calls one of many scripts that only have this in the .sqf file " Setwind [0,-5, true]; ". What else would I need to add to that script, or maybe an init.sqf file to make that setwind command go globally to all clients, and also update for anyone who may JIP. Thanks!

Share this post


Link to post
Share on other sites

I guess I have same question...

Only thing is - I know even less about this than you do XD

I don't even know where to put what to get the wind in my mission...

I'm also making shooting range and need this because I tried to train sniper&spotter but those had different winds... Now I need setWind but have no idea how to use it...

Share this post


Link to post
Share on other sites

In Domino, I use setWind during player setup, making sure each one gets the same. Seems to work well. And no, setWind is a local command so it has to be executed on all clients.

Share this post


Link to post
Share on other sites

Carl, thanks, do you have this by any case implemented in the version you gave me?

Otherwise, could you briefly explain how should I set it up?

Share this post


Link to post
Share on other sites

@Minoza:

Currently I have it in i_common.sqf, like this:

setWind [4,9,true]; //9.85 m/s (35.46 km/h, 19.15 knots, beaufort 5, fresh breeze) from south south-west.

If you haven't updated the mission, it probably won't work due to some updated ACE classes. Unless Xeno has made some changes (I've reported a few bugs), I'll upload the most recent edit here after quick verification with todays ACE beta.

As for how to set it up manually, just make sure that everyone gets it, maybe even the server (due to viewblocks drifting with wind should affect server AI). Output a hint on the clients and a log to the server.rpt, that should enable you to figure out if it works for everything or not, including JIP clients.

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

Ah thank you for your explanation. I understand most of what you have said. I wont ask for any more explanations, instead I'll try to find out how to make hint on the clients. And as for rpt that is automatically done if I'm correct...

But I could also check this if I have one more men with Kestrel with me right? :D

If we share same position we should get same/similar reading, correct?

Edited by Minoza

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×