Jump to content
Sign in to follow this  
cyop

Simple, right? Please, would someone create helo and 7 soldiers?

Recommended Posts

Man, I swear. What I am doing wrong, I have no idea.

I wrote a little mission last night for someone. In it, with it, is a script for creating a helo group to reinforce. For some silly reason, not matter what I try, I cannot get the darn thing to create the soldiers. Here is the beginning...

if (reinforceGUE1_start == 1) then {

reinforceGUE1_start = 0;

reinforceGUE1_pilot_group = createGroup east;
reinforceGUE1_soldier_group = createGroup east;

reinforceGUE1_helo = createVehicle ["UH1H_TK_GUE_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];

reinforceGUE1_helo addEventHandler ["killed", "terminate script; hint ''; terminate null0; reinforceGUE1_start = 1"];

reinforceGUE1_pilot = reinforceGUE1_pilot_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_pilot moveInDriver reinforceGUE1_helo;

reinforceGUE1_soldier2 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier2 moveInTurret [reinforceGUE1_helo,[0]];

reinforceGUE1_soldier3 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_MG_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier3 moveInTurret [reinforceGUE1_helo,[1]];

reinforceGUE1_soldier4 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier4 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier5 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AAT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier5 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier6 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier6 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier7 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier7 moveInCargo reinforceGUE1_helo;

Now, I have changed things a few times, trying to get it to work, so hopefully, there is nothing 'wrong' with the above. Anyway, why will it not create?

Share this post


Link to post
Share on other sites
do you have an east soldier placed on the map already? if not you need to do so or createcenter east first. http://community.bistudio.com/wiki/createCenter

Yes, there are already east soldiers on the map, but I do not have a centerEast. I will add that. (Be back in a little while.)

EDIT: Ooops, I mean createCenter.

EDIT: Well, from the Wiki, it shoulld be created by default. The mission is done, Just 2 markers and some east and west units to test a Seized By BLUFOR trigger, with the trigger starting the helo reinforce script. I put in a radio trigger just to test, so I could 'activate' the hello right away.

EDIT. BTW... actually, I did this pretty early yesterday, and worked on it all night, and now today. Ghost, you want to look at the whole thing, I will give it to you.

Edited by CyOp

Share this post


Link to post
Share on other sites

if you already have units on the map of the side your trying to spawn no need for createcenter. also check your rpt error log, which should tell you what the problem is and where.

Share this post


Link to post
Share on other sites

You sure this is true?

reinforceGUE1_start == 1

You may want to close the if statement at the bottom of the file. :)

Share this post


Link to post
Share on other sites
You sure this is true?

reinforceGUE1_start == 1

You may want to close the if statement at the bottom of the file. :)

I have this:

reinforceGUE1_start = 1

in the init.sqf

EDIT: BTW, the helo spawns, but nothing else.

if (start == 1) then {

start = 0;

reinforceGUE1_pilot_group = createGroup east;
reinforceGUE1_soldier_group = createGroup east;

reinforceGUE1_helo = createVehicle ["UH1H_TK_GUE_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];

reinforceGUE1_helo addEventHandler ["killed", "terminate script; hint ''; terminate null0; start = 1"];

reinforceGUE1_pilot = reinforceGUE1_pilot_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_pilot moveInDriver reinforceGUE1_helo;

reinforceGUE1_soldier2 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier2 moveInTurret [reinforceGUE1_helo,[0]];

reinforceGUE1_soldier3 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_MG_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier3 moveInTurret [reinforceGUE1_helo,[1]];

reinforceGUE1_soldier4 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier4 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier5 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AAT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier5 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier6 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier6 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier7 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier7 moveInCargo reinforceGUE1_helo;

reinforceGUE1_helo flyInHeight 100;

reinforceGUE1_pilot_group_wp1 = reinforceGUE1_pilot_group addWaypoint [position reinforceGUE1_marker_2,0];
reinforceGUE1_pilot_group_wp1 setWaypointType "MOVE";
reinforceGUE1_pilot_group_wp1 setWaypointCombatMode "YELLOW";
reinforceGUE1_pilot_group_wp1 setWaypointFormation "WEDGE";
reinforceGUE1_pilot_group_wp1 setWaypointSpeed "NORMAL";
reinforceGUE1_pilot_group_wp1 setWaypointBehaviour "CARELESS";

reinforceGUE1_pilot_group_wp2 = reinforceGUE1_pilot_group addWaypoint [position reinforceGUE1_marker_2,0];
reinforceGUE1_pilot_group_wp2 setWaypointType "UNLOAD";
reinforceGUE1_pilot_group_wp2 setWaypointCombatMode "YELLOW";
reinforceGUE1_pilot_group_wp2 setWaypointFormation "WEDGE";
reinforceGUE1_pilot_group_wp2 setWaypointSpeed "NORMAL";
reinforceGUE1_pilot_group_wp2 setWaypointBehaviour "CARELESS";

waitUntil{(getPosATL reinforceGUE1_pilot) select 2 < 0.5};
doStop reinforceGUE1_pilot;

reinforceGUE1_soldier_group_wp1 = reinforceGUE1_soldier_group addWaypoint [position reinforceGUE1_marker_2,0];
reinforceGUE1_soldier_group_wp1 setWaypointType "SAD";
reinforceGUE1_soldier_group_wp1 setWaypointCombatMode "RED";
reinforceGUE1_soldier_group_wp1 setWaypointFormation "WEDGE";
reinforceGUE1_soldier_group_wp1 setWaypointSpeed "NORMAL";
reinforceGUE1_soldier_group_wp1 setWaypointBehaviour "AWARE";
reinforceGUE1_soldier_group_wp1 setWaypointCompletionRadius 0;

reinforceGUE1_pilot_group_wp3 = reinforceGUE1_pilot_group addWaypoint [getMarkerPos "reinforceGUE1_marker_1",0];
reinforceGUE1_pilot_group_wp3 setWaypointType "MOVE";
reinforceGUE1_pilot_group_wp3 setWaypointCombatMode "YELLOW";
reinforceGUE1_pilot_group_wp3 setWaypointSpeed "FULL";
reinforceGUE1_pilot_group_wp3 setWaypointBehaviour "CARELESS";
reinforceGUE1_pilot_group_wp3 setWaypointStatements ["true", "deleteVehicle reinforceGUE1_helo; deleteVehicle reinforceGUE1_pilot; hint ''"];

}
else {sleep 100;
start = 1; 
hint ""};

It's not finished, but I was just trying to get the darn soldiers to spawn first. You can take most out and they still do not spawn.

EDIT: Yeah, I just tried again. I took everything out but the creation of the groups, helo and soldiers. Still no soldiers.

---------- Post added at 05:15 PM ---------- Previous post was at 04:47 PM ----------

OK, this has to be a BIS problem. How can this NOT work? (OR, what the hell am I missing?)

if (start == 1) then {

       start = 0;

reinforceGUE1_pilot_group = createGroup east;
reinforceGUE1_soldier_group = createGroup east;

reinforceGUE1_helo = createVehicle ["UH1H_TK_GUE_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];

reinforceGUE1_helo addEventHandler ["killed", "terminate script; hint ''; terminate null0; start = 1"];

reinforceGUE1_pilot = reinforceGUE1_pilot_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_pilot moveInDriver reinforceGUE1_helo;

reinforceGUE1_soldier2 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier2 moveInTurret [reinforceGUE1_helo,[0]];

reinforceGUE1_soldier3 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_MG_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier3 moveInTurret [reinforceGUE1_helo,[1]];

reinforceGUE1_soldier4 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier4 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier5 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AAT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier5 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier6 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier6 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier7 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier7 moveInCargo reinforceGUE1_helo;

reinforceGUE1_helo flyInHeight 100;

}

Like I said, the helo spawns (and I have the helo set to NONE 'cus it just crashes into the ground with no pilot).

Edited by CyOp

Share this post


Link to post
Share on other sites
again... check your error log for where the problem might be. Make sure you are not missing any of the ; signifying line termination. In your code you are missing them. http://community.bistudio.com/wiki/RPT

I do check for errors! Sheeesh! :p

=====================================================================

== E:\ArmA 2\arma2oa.exe

== "E:\ArmA 2\arma2oa.exe" -nosplash -showScriptErrors

=====================================================================

Exe timestamp: 2010/07/10 22:06:10

Current time: 2010/08/29 21:59:25

Item str_disp_server_control listed twice

Updating base class ->RscText, by ca\ui\config.bin/RscSplashText/

Added texture headers from file "ca\air_e\texheaders.bin"

Added texture headers from file "ca\animals_e\texheaders.bin"

Added texture headers from file "ca\ca_e\texheaders.bin"

Added texture headers from file "ca\characters_e\texheaders.bin"

Added texture headers from file "ca\desert_e\texheaders.bin"

Added texture headers from file "ca\l39\texheaders.bin"

Added texture headers from file "ca\misc_e\texheaders.bin"

Added texture headers from file "ca\missions_e\texheaders.bin"

Added texture headers from file "ca\modules_e\texheaders.bin"

Added texture headers from file "ca\plants_e\texheaders.bin"

Added texture headers from file "ca\roads_e\texheaders.bin"

Added texture headers from file "ca\rocks_e\texheaders.bin"

Added texture headers from file "ca\signs_e\texheaders.bin"

Added texture headers from file "ca\structures_e\texheaders.bin"

Added texture headers from file "ca\takistan\data\texheaders.bin"

Added texture headers from file "ca\takistan\data\layers\texheaders.bin"

Added texture headers from file "ca\tracked_e\texheaders.bin"

Added texture headers from file "ca\weapons_e\texheaders.bin"

Added texture headers from file "ca\wheeled_e\texheaders.bin"

Added texture headers from file "ca\zargabad\texheaders.bin"

Checking texture headers done - ok = 5591, failed = 0, patched = 0.

Exe version: 1.52.71816

Warning: looped for animation: ca\wheeled\data\anim\uaz_cargo01_v0.rtm differs (looped now 0)! MoveName: kia_uaz_cargo02

Warning: looped for animation: ca\wheeled\data\anim\uaz_cargo01_v0.rtm differs (looped now 1)! MoveName: uaz_cargo02

^ That's all I am showing.

Share this post


Link to post
Share on other sites
He's using the correct createUnit array syntax which was introduced in ArmA 1. :)

Ah, interesting.

Script runs fine in my editor, at any rate. I added start = 1 to my init.sqf and ran the script as an sqf from a radio trigger. Helo spawns in on the ground with all the troops loaded. This leads me to believe there is a problem with the way you are calling the script, or with the variables you are using.

Share this post


Link to post
Share on other sites
Ah, interesting.

Script runs fine in my editor, at any rate. I added start = 1 to my init.sqf and ran the script as an sqf from a radio trigger. Helo spawns in on the ground with all the troops loaded. This leads me to believe there is a problem with the way you are calling the script, or with the variables you are using.

Well, I have changed so much, so many times, I am going to just the basics right now to see what happens. Also, I had changed variable, like ' start ', and it still did not work. I also, had... start = 1; ...in the init file, when I had used common variables.

Ghost BTW, the script was closed ealier. That was just a bad copy and paste in the later reply.

---------- Post added at 10:54 PM ---------- Previous post was at 10:45 PM ----------

fatty86,

I'm calling you out! ;) I want you to post what you had that worked.

Share this post


Link to post
Share on other sites

Just some general observations not really related to your problem:

1) The whole else statement looks really weird. Technically it's nothing wrong with it, the engine will understand it just fine. But it fails wrt maintaining good readability. As long as you use if (condition) then { ... in the same line, the suggested method is } else { followed by else statements on the following line(s), closing it neatly up with a }; at the end of everything.

2) terminate script; terminate null0; - Again nothing technically wrong with it, but script and null0 sounds like poorly chosen names if you need to deal with these handles later on (like for termination i.e.). I suggest using more descriptive names, possibly with scipters tag in front of it (tag_scriptthatdoesthisandthat) to avoid even the most remote chance of a conflict with other scripts (and/or poorly written addons?).

Share this post


Link to post
Share on other sites
Well, I have changed so much, so many times, I am going to just the basics right now to see what happens. Also, I had changed variable, like ' start ', and it still did not work. I also, had... start = 1; ...in the init file, when I had used common variables.

Ghost BTW, the script was closed ealier. That was just a bad copy and paste in the later reply.

---------- Post added at 10:54 PM ---------- Previous post was at 10:45 PM ----------

fatty86,

I'm calling you out! ;) I want you to post what you had that worked.

In init.sqf:

start = 1;

In test.sqf:

if (start == 1) then {

       start = 0;

reinforceGUE1_pilot_group = createGroup east;
reinforceGUE1_soldier_group = createGroup east;

reinforceGUE1_helo = createVehicle ["UH1H_TK_GUE_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];

reinforceGUE1_helo addEventHandler ["killed", "terminate script; hint ''; terminate null0; start = 1"];

reinforceGUE1_pilot = reinforceGUE1_pilot_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_pilot moveInDriver reinforceGUE1_helo;

reinforceGUE1_soldier2 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier2 moveInTurret [reinforceGUE1_helo,[0]];

reinforceGUE1_soldier3 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_MG_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier3 moveInTurret [reinforceGUE1_helo,[1]];

reinforceGUE1_soldier4 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Bonesetter_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier4 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier5 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AAT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier5 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier6 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_AT_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier6 moveInCargo reinforceGUE1_helo;

reinforceGUE1_soldier7 = reinforceGUE1_soldier_group createUnit ["TK_GUE_Soldier_Sniper_EP1", getMarkerPos "reinforceGUE1_marker_1", [], 0, "NONE"];
reinforceGUE1_soldier7 moveInCargo reinforceGUE1_helo;

reinforceGUE1_helo flyInHeight 100;

}

Added radio trigger Alpha, with onAct:

nul=[] execVM "test.sqf";

I put a marker called reinforceGUE1_marker_1 on the map, and away I went.

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  

×