kocrachon 2 Posted June 6, 2007 So I have a dedicated server machine that I am trying to host my coop maps with, but for some reason my missions dont work right, for example, my helicopter wont land and unload its cargo. When I host it on my machine as a player/client, it works. But the server that is dedicated to hosting doesn't. Anyone able to help me out. Then, if we all eject from the helicopter, after that it will continue on with its way points. Share this post Link to post Share on other sites
Taurus 20 Posted June 6, 2007 Hi I'm afraid there are some issues with waypoints and some triggers and etc (i.e. they don't work as expected) on a dedicated server environment. Instead it seems we are kind of "forced" to use scripting. If you use waypoints for the unload thing, try checking out Op4 BuhBye's script here. http://www.flashpoint1985.com/cgi-bin....t=63807 Share this post Link to post Share on other sites
mr.peanut 1 Posted June 6, 2007 My guess is the following. WPs are local. This means that any WP for AI are on the server, ded or non-ded. The WP for your player group, are local to each client, but the heli WP is local to the server, so synchronising them does not work. This is, of course, complete supposition on my part and I await flaming for my ignorance. Try the following and tell me what happens. Add another player slot that is in a separate group. Play the mission on the ded server and choose this slot, leaving all the other slots as AI. See if the helicopter actually lands. It is a good idea to put a Condition in the WP following the heli's unload WP like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({_x in crew myHeli && alive _x} count units myGroup) < 1 to prevent the heli from moving on until all crew have gotten off. Might be missing a parenthesis or two... Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted June 6, 2007 This is exactly why I made that script. Its simple and it works. If you need it modified and dont know how, put up a post of what the chopper does and me or someone else can do it for ya. Share this post Link to post Share on other sites
kocrachon 2 Posted June 6, 2007 Well that kind of sucks because it has to fly, land, drop us off, fly away, refuel, fly back, pick us up after we finish the mission, and take us back to base =/ Will this be fixed in the next patch? Share this post Link to post Share on other sites
Taurus 20 Posted June 6, 2007 Will this be fixed in the next patch? I doubt it as it has been around since OFP... Maybe BIS fixes this, in the meantime to make them missions work 100% on dedicated servers, we are to script the logic behind the waypoints and other "local vs server vs ..." things. Good luck to us all A good start is to look into the script Op4 BuhBye did as I mentioned in my last post. You can edit/alter it to work for what you need it to do I think. i.e. the foundation/basics are there Share this post Link to post Share on other sites
kocrachon 2 Posted June 6, 2007 Hmm, well I have the BIS, how much of the dedicated server side stuff does it fix? Also, I suck at writing scripts... like really bad. Share this post Link to post Share on other sites
Taurus 20 Posted June 6, 2007 This "simulates" the first "move"-waypoint <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> helo1 flyinheight 30 helo1 setvelocity [0,50,0] helo1 setbehaviour "stealth" helo1 domove getpos start1 helo1 setspeedmode "NORMAL" #loop ?helo1 distance start1 < 300 : goto "land" ~0.5 goto "loop" This part "simulates" a "Transport unload"-waypoint. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #land helo1 setspeedmode "NORMAL" helo1 land "GET OUT" _height = getpos helo1 select 2 ?_height < 1 : goto "drop" ~0.5 goto "land" #drop helo1 flyinheight 0 @({_x in helo1} count [w1,w2,w3,w4,w5] == 0) And the last bit "simulates" another "move"-waypoint. i.e. The whole scripts "overrides" any waypoints. [edit] Also, I suck at writing scripts... like really bad. Well I think it sück that we "need" to script instead of using waypoints... But HavocDemon scripting isn't that difficult when you get the hang of it, run over to http://www.ofpec.com and check out the tutorials there. Hint: Use .sqf instead of .sqs And if you get yourself into a -situation, just post your concerns here and we'll try to help you out Share this post Link to post Share on other sites
kocrachon 2 Posted June 6, 2007 hmm, well I was wondering, is it the unload waypoint that has issues working? Because if so can't I just scrip the land command, and then set a switch trigger to make it go to its next waypoint? now the things like #drop, whats that (told you I was a noob) Share this post Link to post Share on other sites
Taurus 20 Posted June 6, 2007 I haven't tried mixing waypoints and scripts, but I think its doable. And yes, its the "unload" thing which is the troublesome bit on a dedicated server. the #drop is a "label" If you want some parts of the code to be "skipped" in the execution like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if(this has happened)then{goto "myLabel"} this bit here will be skipped if the above statment is true #myLabel rest of script goes here. [edit] Lables are mostly used in SQS to create loops [/edit] This can be done using .sqf too, but is handled differently, I haven't read up on that so much so I can't give you any examples Mostly you can use "switches" like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> switch (OMG) do { case 1: { do stuff here if OMG is 1; }; case 2: { do stuff here if OMG is 2; }; }; more about this here: http://community.bistudio.com/wiki/Control_Structures Share this post Link to post Share on other sites
kocrachon 2 Posted June 6, 2007 Well I changed it up a little bit. For now what I have (haven't tested it my dedicated server host isn't available right now) is my blackhawk has 1 waypoint, and its scripted with the land script. After that when the infantry unit reaches a waypoint just a short distance from it, it sets off a trigger that creates a waypoint that sends the blackhawk home to land again. So I will just have to use triggers to keep making waypoints. Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted June 7, 2007 Why does the chopper need to refuel so soon? Share this post Link to post Share on other sites
kocrachon 2 Posted June 7, 2007 Well the mission takes a long time, it would run out of fuel before the mission ends, so I have it fly to base, and since it uses the land command, it shuts off its engine to save that fuel as well. Share this post Link to post Share on other sites