OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: trooper543 on 29 May 2008, 22:16:28
-
Hi there all
i am busy making a cutscene where a chinook choppers arrives at airfield and drops off 3 teams so far this works okay
the problem i am having is when the teams trasnfer from the chinook to Be32k plane
the plane has a waypoint to load and the teams have a getout waypoint to get out the chinook then a move waypoint and then a another getin waypoint.
the problemis that the plane just keeps moving along its waypoints and does not load any of the teams
i have the getin wapoints synchronised with the planes load waypoint
cold anyone please point me in the right direction
thanks in adavance
-
Waypoints = PUKEAGE
bad idea to use WP in this scenario. Just have ur normal WP's for the plane, then on activation of a WP (before it takes off) have a script activate and also put that WP at a 360 sec timeout....
So script should assign everyone in the three groups to the plane and command them to get in. Use the "for each unit group1" thingy...At the end of the script just use NextWp command, I believe there is a command like that at least, this will void the 360 sec pause
-
If the planes having trouble stopping, set its fuel to 0 (this setfuel 0) until everyones in, then set it back to one (or its original value if it is of importance.)
This should cause the plane to stop until everythings set. :whistle:
-
Waypoints can work, but yes : using a little script (or just a trigger with the necessary assignas/ordergetin components) might also be useful. And what Rommel92 is suggesting is indeed the classical way of grounding those damned flyboys in ArmA as it was in OFP : note however that the pilot will probably disembark the plane while it's useless (=fuelless), but once it's refueled he'll get in and get going...
Mess around. If it's for a cutscene you can always cheat too : a quick little "fade to black", a camera pan, and whoops! Everyone's inside already! Or alternatively having a static plane that fills up, which is then deleted and replaced with a plane that actually moves...etc etc. Harder to do when it's all live action, of course.
Good luck!
Wolfrug out.
-
the problemis that the plane just keeps moving along its waypoints and does not load any of the teams
@Wolfrug, sounds like my tricks. Good advice there mate!
@Rommel :good:
@Ironman he might just need a script :yes:
one more thing to help you , I am not sure about Arma but in Ofp the plain would take off from the west side of the air strip, so if you place a waypoint at the east side it would taxie to the west side before take off. They also needed a w/p at the west side to land and disembark on the east side. you might be suprised at how moving one little thing changes something, for good or bad!!!!!!!!!!!!!
Conlution; you might want to move w/p.s It really shouldn't make a difference but the game does funny things
And your pilot must be set to this setbehaviour "CARELESS"; because he is AI they have a mind of there own,, CARELESS makes them into a zombie, more or less
Cheers schuler play around and mostly have fun!
-
@ All
Gents many thanks for the help , it is most appreciated
the script option sounds really good, i am trying to find the bit of code that i have seen somewhere and maybe use that with a trigger
the piece of code i am looking for is somtheing along the lins of ?
({alive _x} count units team1,team2 ,team3) == ({_x in plane} count units team1,team2 ,team3)
so when the condition is true the plane would then move on
well this is my thought anyway
i tried the above code and it dont work but hey ho i keep on trying
but that said all and done ..........Gents i thank you all not just for the help but for the encouragement as well
Cheers
-
Hi there all
I think i have found the solution to my problem after a long search and again Mr Mandoble i owe to you and those wonderful sqf scripts that you keep coming up with
I found the solution in this thread: Half SOLVED:Group Board Empty Vehicle 1x1
However i have a problem when running the script it generates the following error
...mptyPostion "cargO")} :
#
Error invalid number in expression
Line 26
waitUntil {(_unit in _veh) || (!alive _unit) || (!canMove _veh) || ((_veh emptyPositions "cargo") == 0)};
the script
// board.sqf, execute with execVM.[[grp1,grp2,grp3],[plane1,plane2,plane3]]execVM"board.sqf";
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
[_groups select _i, _vehicles select _i] spawn
{
_grp = _this select 0;
_veh = _this select 1;
_nunits = count units _grp;
for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
{
_unit = units _grp select _j;
_unit assignAsCargo _veh;
[_unit] orderGetIn true;
Sleep 1;
waitUntil {(_unit in _veh) || (!alive _unit) || (!canMove _veh) || ((_veh emptyPositions "cargo") == 0)};
};
};
}:
Please could somebody help me solve this little problem
Thanks in advance
-
...mptyPostion "cargO")} :
#
Error invalid number in expression
maybe you need a lower case "O".... maybe I am retarded and it doesn't matter either lol
-
Ironman you might be right ,,,,,,, one typo can reck the whole script
...mptyPostion "cargO")} :
#
Error invalid number in expression
you put an O there,,,,,,, not 0 redo it mate,,,,, ;)
but yet check it all :) thats carg0 part refer to ironman's post and he is right
cheers schuler
-
@ironman /schuler
Gents i have checked that and all is right but i am still getting the error
-
well, maybe one of those listed commands in Line 26 will never equal zero. Maybe double check that, also, see if there is another command you can use, might not be the same idea but can still work.....
-
@ Ironman
Thanks for the response, i tried change the 0 to 1 and still got the same error
, when it comes to sqf i am way out my league mate
Thansk in advance
-
hey sorry just checking
// board.sqf, execute with execVM.[[grp1,grp2,grp3],[plane1,plane2,plane3]]execVM"board.sqf";
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
[_groups select _i, _vehicles select _i] spawn
{
_grp = _this select 0;
_veh = _this select 1;
_nunits = count units _grp;
for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
{
_unit = units _grp select _j;
_unit assignAsCargo _veh;
[_unit] orderGetIn true;
Sleep 1;
waitUntil {(_unit in _veh) || (!alive _unit) || (!canMove _veh) || ((_veh emptyPositions "cargo") == 0)};
};
};
}:
-
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
[_groups select _i, _vehicles select _i] spawn
{
_grp = _this select 0;
_veh = _this select 1;
_nunits = count units _grp;
for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
{
player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
_unit = units _grp select _j;
_unit assignAsCargo _veh;
[_unit] orderGetIn true;
Sleep 1;
waitUntil {(_unit in _veh) || (!alive _unit) || (!canMove _veh) || ((_veh emptyPositions "cargo") == 0)};
};
};
}:
Please tell us what it returns. :)
Should show whether its an execution problem or not.
EDIT: I'm going to guess here you currently have [[Grp1,Grp2],PLANE1]execVM "board.sqf"; instead of [[Grp1,Grp2],[PLANE1]]. Just double check that, else tell us what the above debug(edited)script returns.
:good:
-
@Rommel
Many thanks for the assistance, it is greatly appreciated
i have done as you have said and i still get the same error
invalid number in expression Line 25
My knowledge of sqf/scripting in general is not very good
but i get the impression that it got be something with this line here;
waitUntil {(_unit in _veh) || (!alive _unit) || (!canMove _veh) || ((_veh emptyPositions "cargo") == 0)};
Again many thanks in advance
-
Did anything come up on screen? No values to tell us... :dunno:
Delete that line then tell us what it returns then, and if possible could you show how your executing the script!
Thanks, Romm.
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
[_groups select _i, _vehicles select _i] spawn
{
_grp = _this select 0;
_veh = _this select 1;
_nunits = count units _grp;
for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
{
player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
_unit = units _grp select _j;
_unit assignAsCargo _veh;
[_unit] orderGetIn true;
Sleep 1;
};
};
}:
-
My knowledge of sqf/scripting in general is not very good
same here but are sure it should be sqf? :dunno:
@ Rommel Victoria rules dude,,,,,,,, notice i said dude not mate :P
@ trooper keep up the good work ,,,,,, ;)
i think Cheetah had a sqf tute, i looked but didnt find it :weeping:
-
eish no i am totallty lost ::)
Still get an error i honestly dont know what i am doing here
-
i think!?!?!?!? you can add the sqf with the cutscene sqs and more scripts too sqs, inserted at the right time
sorry i might be wrong with what your doing ,,,,
but best to solve all the troops boarding first, ;), one thing at a time
eish no i am totallty lost Roll Eyes
Still get an error i honestly dont know what i am doing here
-
Ok mate, step by step.
Go into the editor or wherever you have "executed" this script from, in other words, where you put:[[grp1,grp2,grp3],[plane1,plane2,plane3]]execVM"board.sqf";
and what were the parameters (were they grp1, grp2, grp3, or were they bravoGRP1 etc, what did you put in the brackets).
Second step.
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
[_groups select _i, _vehicles select _i] spawn
{
_grp = _this select 0;
_veh = _this select 1;
_nunits = count units _grp;
for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
{
player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
_unit = units _grp select _j;
_unit assignAsCargo _veh;
[_unit] orderGetIn true;
Sleep 1;
};
};
}:
Backup the original script (the one posted originally) and replace it with the one above. Play the mission and it should come up with a bunch of text, when that comes up, thats this line of code:
player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
This code make the player, speak over globalchat expressing the variables (values) of: _unit, _grp, _veh and how many emptyPositions in _veh 's cargo.
This data can help us come to a conclusion (if provided) as to what the problem may be...
Hope this helps mate. :yes:
-
Thanks Rommel
I will try out your solution and come back to you with the results
many thanks agains