Jump to content
Sign in to follow this  
*TEK*TONI

Is "WAITUNTIL" the solution for my problem? Never used this command before...

Recommended Posts

Hello Gentlemen,

thanks in advance for taking time to go thrue this thread.

I´ve searched the forum and other pages, but I was not able to find a real solution for following problem.

One of my last missions begins on a lhd deck (GLT-LHD). I managed to place some choppers, objects and the multiplayer squad. This mission contains about 200 enemys, 15 vehicles, triggers, markers and so on and so on....

The problem now is that the carrier, when the mission starts (editor & dedicated server = same result), spawns a split second to late, which causes all objects on the deck to fall into the water. This happens about 4 out of 10 times. :redmad:

My impression is that there are to many objects in my mission, but i´m not willing to reduce it and also not sure if this is the problem.

The objects are attached by using the command "this setPos [(getPos this select 0),(getPos this select 1),15.82];" for example. Was not able to work with the attachTo command.....

Anyway, is there a way to achieve a kind of init order, to make sure that no objects are falling of the flight deck? Maybe with the WaitUntil command....?

I found a thread regarding "order of init..", but this didn´t help me out.

Scripting experience so far, about 20 coop09 missions, implemented in the F2 Framework, designed for dedicated servers. So I´m not new in the world of scripting, but still on a "beginner-level" when it comes to complicated stuff.

So I really would appreciate some help.

Any ideas?

Share this post


Link to post
Share on other sites

Edit mission.sqm and swap the carrier with whatever is the first side=Empty unit.

Although try setting them a little higher than 15.82 so they have a slight drop, since I was under the impression most stuff spawns nearly simultaneously. A little extra time might help though.

Share this post


Link to post
Share on other sites

Hello tcp,

thanks for your respond. It tried to edit the mission.sqm in a few different ways to make it work, but it didn´t.

Class Groups contains side west, east and all their related waypoints and so on.... Side empty is a different class; Class Vehicles. I put class vehicles on first position in the missions.sqm, but after opening the editor, the software restores the Class "Groups" back to the normal order. I also tried to integrade the carrier in the Class Group/Side West. It worked....for two tries only. The mission.sqm had been changed again. This time side east had the first priority in the .sqm. Hmm? Is there really no other way to solve this?

Regarding the height, if I ad a bit more of it, so that the objects can have a slight drop, it happens sometimes that they bounce of the carrier like a ball. They allready have a slight drop (a very small one).

Maybe I didn´t change the right things in the .sqm, but maybe a separated init could help....

Any further ideas?

Share this post


Link to post
Share on other sites

Hey Gents,

i still haven´t found the right solution and I can´t give up, cause there must be a way to solve this.

WaitUntil wouldn´t help, I know this now.

In the CBA Mod are some files wich are related to XEH, like PreInit.sqf and others....

Is there any PRO out there who could state if this would be the right method and maybe (just a bonus) also explain me how to do it?

Thanx for your help in advance,

Share this post


Link to post
Share on other sites

Are you using the full addon or the script version to place the LHD?

Share this post


Link to post
Share on other sites

I haven't messed with the LHD myself but how about using "object enableSimulation false" that will freeze an object even a plane in flight, then set it true a few seconds later.

Share this post


Link to post
Share on other sites

Hey Gents,

many thanx for answers so far!!!

tcp - I´m using the addon version, downloaded at http://www.armaholic.com/page.php?id=5858

Padjur - Seems like I haven´t searched the forum well enough, but the problem wich is stated there from "nominesine" , is exactly the same I have. It appears only, if the deck of the LHD is crowded. Then the carrier mostly spawns a bit delayed. It´s a good idea to try to use an invisible "H", but on the other hand, shouldn´t the carrier-icon in the editor do the same job? Just came home from work, can´t wait to give it a try anyway!

F2k Sel - Sounds also like a good idea! I guess I have to "enable simulation false" in the init-field of the carrier and for "...enable true", I use a trigger with a countdown, right?

Thanx so much for your answers, will give a try tonight...! :218:

Share this post


Link to post
Share on other sites
I haven't messed with the LHD myself but how about using "object enableSimulation false" that will freeze an object even a plane in flight, then set it true a few seconds later.

Wow that really is interesting. Never knew about it. Will the engines still make a sound and everything or does it lock all aspects of the vehicle's behaviour? This could be a solution to something I've been looking at.

Share this post


Link to post
Share on other sites

The method that Tayln describes comes from Carrier Domination so its well tested, maybe the script spawns quicker or something. Myke's addon uses the same script (by armatech) so yea it should do the same job, maybe you could pm Myke about the issue, he'd be the best man to ask.

For myself I'm with Talyn when it comes to not having or avoiding the need for clients to have addons,

so I use scripts whenever I can unless its something like the Chinook, which is a great aircraft to have available.

Share this post


Link to post
Share on other sites

Since the objects are created in the order they are in mission.sqm, make sure the lhd placeholder object is before the stuff put on it.

Share this post


Link to post
Share on other sites

*TEK*TONI You would have to stick it in the init field, yes you could use a trigger. I would then call a script so it would be easier to keep a list.

chris330 The sound will still work (only tested choppers) but all animations will be frozen.

Share this post


Link to post
Share on other sites

Yegads... bugger just tested it and found the same thing myself. I'm goona make a special command request now.

Share this post


Link to post
Share on other sites

I just tried putting some Choppers on the Carrier and didn't have major problems as long as I used getposATL as mentioned by Padjur .

The only thing that does happen is that sometimes they bounce if they're to close to each other or something else.

Share this post


Link to post
Share on other sites

F2k Sel

getposATL as mentioned by Padjur .

Can I check that? I suggested getposASL as in height above sea level, or is it a typo?

Share this post


Link to post
Share on other sites

Padjur / F2k Sel - Talyns method to use a script instead of an addon, works way better for me than using the addon version. Seems to be a bit faster. Unfortunately my main problem is still not solved. I´m able now (better that before) to place for example 20 choppers and 20 units on deck, without any bouncing effects or any other problems. It only becomes a problem, when the map is full. Ready mission, 200 enemys, 20 vehicles, triggers and so on...... Even when the lhd addon or the object wich is initiating the createLhd.sqf is on first position in the mission.sqm, it doesn´t make any difference.

My goal is to create a situation, in wich poeple / players can trust, no to fall thrue the deck right at the mission start. What a major f..k up!

F2k Sel I also to tried to use "object enableSimulation false" (with the addon version), but it didn´t work. In the beginning I thought I did something wrong, but this was not the case. I double checked with flying objects, and there it worked great. Could you please explain me how to use this code in an .sqf / .sqs version? Kinda adding this code to the createLHD.sqf plus a wait order for 5 to 10 seconds and than enable = true..???

Some people use a preload for addons, this is writen in related addon config files. Would this be helpful? And how does the carrier at Utes manage the spawn? I´ve never seen anything falling thrue there....

Gonna work on that 2morrow again, but so far, thanx so much guys for your help!!! I appreciate that !

Share this post


Link to post
Share on other sites
F2k Sel Can I check that? I suggested getposASL as in height above sea level, or is it a typo?

I did use ATL but as I wasn't using the addon carrier the test is probably invalid.

---------- Post added at 02:19 PM ---------- Previous post was at 02:06 PM ----------

*TEK*TONI

The script would look like this P1,p2 ect would be the name of the units.

 
// call the script using a delayed trigger
// null=[] execVM "unfreeze.sqf"


P1 enableSimulation true;
P2 enableSimulation true;
P3 enableSimulation true;
P4 enableSimulation true;
P5 enableSimulation true;

Share this post


Link to post
Share on other sites

You know what guys? I got it working !!!:dancehead:

F2k Sel - Thank you man for showing me the right direction with the code "object enableSimulation value". I have now all objects and units on deck frozen for 5 seconds. A trigger is calling the scripts "unfreeze.sqf" and everything is at the right spot.

Sometimes my playable AI units still get hurt, doesn´t matter if they spawn one feet over the deck or on deck. Some don´t get hurt if they spawn approx one feet inside the surface. However, to solve this I used "allowDamage false/true", combined to a 15sec trigger like the one for freeze/unfreeze.

Thanx again to all of you! :notworthy:

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  

×