ManDay 0 Posted December 28, 2006 My mission has actually been finished a few days agao, but since i know that evrything goes differently on a ded. Server I got some more questions to that: How can I order a group to get into a vehicle? Normally 'assignAsCargo' for the whole group makes the group automaticly get in but on a ded Server only the groupleader gets in. Then I tried 'orderGetIn' afterwards but that didnt work :/ Share this post Link to post Share on other sites
sickboy 13 Posted December 28, 2006 You can take the examples from my demo get in tank mission: http://www.flashpoint1985.com/cgi-bin....22;st=0 To use it in scripts do a: {_x moveincargo _vehicle} foreach units leader1 etc.. _vehicle = the vehicle leader1 = the leader of the group you wish to get in, make sure you name it in the editor Share this post Link to post Share on other sites
ManDay 0 Posted December 28, 2006 Uhhm... you are talking about 'moveInCargo' ? That teleports the units right in, which is not acceptable. Share this post Link to post Share on other sites
sickboy 13 Posted December 28, 2006 Uhhm... you are talking about 'moveInCargo' ? That teleports the units right in, which is not acceptable. Ah, sorry, did you try the above scripting example with, assignascargo instead of moveincargo? Share this post Link to post Share on other sites
ManDay 0 Posted December 28, 2006 'cuse me? Dunno what you mean but I tried (i.e.): { _x assignAsCargo car1 }forEach units group unit1; unit2 orderGetIn true; unit3 orderGetIn true; unit4 orderGetIn true; PS: Just to let you know: I'm not new to OFP-scripting at all. I am a great scripter so dont be afraid that i may not know such simple commands Share this post Link to post Share on other sites
sickboy 13 Posted December 28, 2006 ..PS: Just to let you know: I'm not new to OFP-scripting at all. I am a great scripter so dont be afraid that i may not know such simple commands Ok, hard to guess so I rather add some extra info here and there so there's no need for more questions Will look into it soon! Share this post Link to post Share on other sites
ManDay 0 Posted December 28, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;getGroupIn.sqs - CSP ;1 - Group: Group to get in ;2 - Object: Vehicle to mount _leaderu = leader( _this select 0 ); _unitsu = units( _this select 0 ); _car = _this select 1; _i = 0; #action1 ?( ( _unitsu select _i )!=_leaderu ):[ _unitsu select _i ]join grpNull; ~0.1 ( _unitsu select _i )assignAsCargo _car; _i = _i + 1; ?( _i < count _unitsu ): goto "action1"; @( ( { _x in _car }count( _unitsu ) )== count _unitsu ) _i = 0; #action2 ?( ( _unitsu select _i )!=_leaderu ):[ _unitsu select _i ]join group _leaderu; _i = _i + 1; ?( _i < count _unitsu ): goto "action2"; That is the only way it works on dedicated servers. Share this post Link to post Share on other sites
sickboy 13 Posted December 28, 2006 Well, for all the people who suffer the same merde: If you want to know a solution then just unjoin the soldiers into their own special groups. then each soldier is a groupleader and you can use assignAsCargo as usual. they will getin becaus they know they have to. but i dont like that solution<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">... Thanks for sharing! I'm sure it's either only a temporary needed solution until it's fixed, or there might be some things we're not aware of to get it working the proper way, if I get some time I will do some tests aswell. BTW, in the BIKI it says that the soldiers need to be delivered in an array, to orderGetIn BTW2, only as suggestion... SQF is the future baby ) Share this post Link to post Share on other sites
ManDay 0 Posted December 28, 2006 BTW2, only as suggestion... SQF is the future baby ) It's just the same. I don't care It's only usefull if you code blocks. My suggestion: Dont use SQF as long as you dont really need it. The OFP-Engine is only a parsing engine and parsing a code-block is more complicated then parsing a line. As I expsect the parser to be written just in the same quality I see the game to be written It will be better to stay to the more simple syntax of lines PS: gotta work on that script again. it doesnt work so fine Share this post Link to post Share on other sites
zyklone 1 Posted December 28, 2006 BTW2, only as suggestion... SQF is the future baby ) It's just the same. I don't care It's only usefull if you code blocks. My suggestion: Dont use SQF as long as you dont really need it. The OFP-Engine is only a parsing engine and parsing a code-block is more complicated then parsing a line. As I expsect the parser to be written just in the same quality I see the game to be written It will be better to stay to the more simple syntax of lines PS: gotta work on that script again. it doesnt work so fine This is just so wrong on so many levels. SQS scripts are parsing the file as they're executed, each goto will start from the beginning of the file for example. While SQF scripts files are parsed once and then stored in memory. Share this post Link to post Share on other sites
ManDay 0 Posted December 28, 2006 This is just so wrong on so many levels.SQS scripts are parsing the file as they're executed, each goto will start from the beginning of the file for example. While SQF scripts files are parsed once and then stored in memory. SQS scripts are parsing which file? The SQS script theirself are parsed - arent they? I still think letting the sqs be parsed is better than letting the sqf be parsed because you can just not rely on the Engine to do that right. (at least i dont) Share this post Link to post Share on other sites
crashdome 3 Posted December 28, 2006 Nope, IIRC each line of an SQS is parsed/compiled individually which means loops and other such advanced usage means they are parsed multiple times and possibly read from the file multiple times. A proper SQF (compile w/ spawn) will guarantee reading the file once and storing it in memory for faster access. Additionally, the idea that parsing SQS is easier because it is NOT in code blocks is just something that is not true anymore. BIS would not be recommending to use SQF instead of SQS if it wasn't better in most situations. Share this post Link to post Share on other sites