Forum Jump :

Author Message


Posts: 8

Level: Member

Country: us
In-game name:

#105616 Posted at 2011-06-08 00:37        
Hey guys, I've been having some trouble trying to make my own version of Warfare. Here's what my idea is: Warfare BE type game, except have each side start on their own aircraft carrier at opposite ends of the map. I want to have each MHQ along with all player slots start out on their respective aircraft carrier. So the the teams will have to lift their MHQs to land, then start capturing towns like normal Warfare. I don't know a whole lot of scripting, although I've been learning and can do basic things. So I figured I would just use one of the WarfareBE missions as a template and just edit that. Well I've been successful in getting most things the way I want them with the exception of the starting locations.

In the mission editor, there are 20 or so game logics named StartingLocation#, starting at StartingLocation0. In the parameters for the warfare mission, theres also a setting that lets me specify West North | East South for starting locations, which, from what I can tell, just causes StartingLocation0 to be used for West, and StartingLocation1 to be used for East. Now, I tried just moving StartingLocation0 to one carrier, and StartingLocation1 to the other carrier, and put the following in the Init box of the game logic starting locations:
this setPosition [locationPosition this select 0, locationPosition this select 1, 18];
However, when I save the mission, export to MP as PBO, and host local game to test the mission (selecting the West North | East South option in parameters), it gets stuck at the black screen with "Loading..." and doesn't let me play (although I can hear game sounds in the background). When I chose blufor, after a few seconds at the Loading screen I see "HQ Destroyed" in the corner of the screen. I don't see "HQ Destroyed' when I try it as opfor, so I'm assuming the blufor HQ is getting destroyed due to being placed in the water. However, i can't seem to figure out why its hanging at the Loading screen like this.

I also tried putting the following code in the Init box of each MHQ and player:
this setPosASL [getPosASL this select 0, getPosASL this select 1, 18]
But this doesn't seem to do the trick either.

When I move the StartingLocations 0 and 1 to somewhere on land, then start the game, it loads fine and it starts me at the place where I put the StartingLocation. So I'm guessing there is some problem with putting the starting locations over water?

I've tried a few other things, such as messing with the script files Init_Server.sqf and Init_Client.sqf. I tried manually specifying the starting locations in those files (although I'm not entirely sure I did it correctly) but had no luck, same issue: it would hang at the black "Loading..." screen when I tested it in MP. To be honest, I feel like I'm in way over my head here with editing the Warfare BE mission script like this, cuz I really don't understand half of the scripts here. But they say the best way to learn to swim is to dive right in, right?

So if anyone can lend me any assistance here I would appreciate it. I'm not looking for someone to do the work for me, just point me in the right direction. I'd be perfectly happy if I could just remove all StartingLocations and just have the players and MHQs always start where I place them on the map in the editor, that way I could definitely place them on the carrier. But alas, I tried removing all the game logic starting locations and placing the units where I wanted them, but it didn't seem to work (same problem as before, hangs at Loading...). My guess is that it's hanging because it's trying to find a safe start location and can't find one.

So in a sentence, I'm asking: How do I set starting locations so the players and MHQ will start on top of the carrier, and not so far apart that they fall into the water?

Thanks in advance for any advice!

I tried a few things and still have the same issues :-( Here's what I did...
Moved StartingLocation0 and 1 to the carriers and put this line in their init boxes:
this setPosition [locationPosition this select 0, locationPosition this select 1, 18];
Then I modified a section in Client\Init\Init_Client.sqf from
/* Positionate the client at the previously defined location */
player setPos ([getPos _base,20,30] Call GetRandomPosition);
to this:
/* Positionate the client at the previously defined location */
player setPosASL ([[getPosASL _base select 0, getPosASL _base select 1, 18],10,10] Call GetRandomPosition);
I figured this would work because it seemed llike the numbers 20 and 30 there were being passed to GetRandomPosition as some kind of area limit, so I thought I'd reduce it to 10.

Then I also changed a section in Server\Init\Init_Server.sqf from
//--- Moving each non-owner objects to the location.
EastMHQ setPos getPos _eastLocation;
WestMHQ setPos getPos _westLocation;
to this:
//--- Moving each non-owner objects to the location.
EastMHQ setPosASL [getPosASL _eastLocation select 0, getPosASL _eastLocation select 1, 18];
WestMHQ setPosASL [getPosASL _westLocation select 0, getPosASL _westLocation select 1, 18];
I did this in an attempt to set the MHQs at the right height on the starting locations. Now, I figured that all this combined would HAVE to work....but alas, I still get the same issue when starting the game: it gets stuck at the black "Loading..." screen. Although, when I was blufor and started the mission, I no longer see the "HQ Destroyed" message after a few seconds at the loading screen. So maybe there is some progress being made? I can't tell...

Any body know what I'm doing wrong here?

(incase anyone wants to know, I'm using the USS Nimitz addon for my carriers, and i used WarfareV2_068LiteCO.isladuala as my template for this mission)
I've also posted at this same question.

This post was edited by anzu (2011-06-11 08:32, ago)

Check out our ArmA 2 & DayZ Community at :)