Home   Help Search Login Register  

Author Topic: My epic beach assault  (Read 2594 times)

0 Members and 1 Guest are viewing this topic.

John Smith

  • Guest
My epic beach assault
« on: 12 Jul 2005, 15:17:09 »
I've been working on this beach assualt for ages and when everything goes right it looks amazing. The only problem is that when the landing craft approach the beach it sometimes occurs that 1 to 3 of the landing crafts attempts to avoid and beach usually turning right at an angle of 100 degrees. I've seen this a lot in the past and I'm sure many people know what I'm talking about so if you know how to ensure that the landing craft will go on a straight path without changing direction until they are told to get out along with their men please tell me. I would really appreciate it.
« Last Edit: 22 Jul 2005, 08:28:39 by bedges »

Offline Pilot

  • Contributing Member
  • **
Re:My epic beach assualt
« Reply #1 on: 12 Jul 2005, 15:22:08 »
Yes, this 'feature' of OFP can be a pain.  You could try one of several things:
1: Change the behaviour of the ships to "CARELESS"
2: Change the speed of the boats to "LIMITED" when they get near the shore
3: Give the boats a continuous setvelocity command to keep them going in a straight line

I'm not sure if #1 and #2 would work, I'm just grasping at straws.  I am sure that #3 would work

-Student Pilot

John Smith

  • Guest
Re:My epic beach assualt
« Reply #2 on: 12 Jul 2005, 15:27:36 »
About the first idea. If I put them on careless won't it mean that once they get out of the boats they have to take their guns off their backs.

About the second one, I'll try it as soon as I get the chance.

About the third one, I tried giving the vehicles a little setvelocity jolt right before the beach but because the driver still has power over the direction of the boat the setvelocity idea isn't very effective. I could of course make the jolt stronger but then most of the boats would probably land half way up the beach. However I haven't tried continuous setvelocity yet. Thanks for the idea.

Any more ideas would be appreciated.

John Smith

  • Guest
Re:My epic beach assualt
« Reply #3 on: 12 Jul 2005, 16:31:44 »
Is there a way maybe to use a sort of command like switchmove. For example with units you can tell them to run forward using a command instead of a waypoint, isn't that possible with vehicles.

Offline Pilot

  • Contributing Member
  • **
Re:My epic beach assualt
« Reply #4 on: 12 Jul 2005, 16:41:16 »
I don't know of any way like that besides setvelocity.  You could try either deleting the crew of the boats, or disableAI "MOVE" them and then use setvelocity.  However, if you did that, they wouldn't be available for use later in the mission.

-Student Pilot

John Smith

  • Guest
Re:My epic beach assualt
« Reply #5 on: 12 Jul 2005, 16:59:56 »
Is there a way maybe to make the driver dead but not look like he's dead and then bring him back to life later on and that the enemy still thinks he's alive and shoots at him.

UNN

  • Guest
Re:My epic beach assualt
« Reply #6 on: 12 Jul 2005, 17:25:29 »
I did something similar:



You can use SetDir to keep the boats running parallel to each other. With a bit of trial and error on the Move Waypoint you can get them to hit the beach in good order.

Code: [Select]
_Boat=_This Select 0

_Dir=GetDir _Boat

#Loop

_Boat SetDir _Dir

~0.001

If !(UnitReady _Boat) Then {goto "Loop"}

Thats the basic idea, you would have to mess around with different ways of ending the script. But it does work, there is a video example here:

WW2 Beach Landing (4mb)
« Last Edit: 12 Jul 2005, 17:26:29 by UNN »

Offline 456820

  • Contributing Member
  • **
Re:My epic beach assualt
« Reply #7 on: 12 Jul 2005, 19:00:00 »
use careless on the boat only but the groups first waypoint can be set as combat
i had this problem in one of my beach missions all fixed now because of that careless waypont and put the waypoint of transport unload alot further p the beach so they turn of later into the beach workd for me

John Smith

  • Guest
Re:My epic beach assualt
« Reply #8 on: 13 Jul 2005, 08:43:48 »
About only giving the driver a careless behaviour, well, the problem is is that there are some features in my beach assualt which require the driver and it's group to be in the same squad.

I have two questions for UNN:

1: When it comes to script I only use simple ones, so my question is can that script be put in an initialisation or On Activation field just like that or do I have to use a command like: "this exec" and then refer to the script.

2: I saw from your screenshots that you used a different landing craft and I was just wondering where you got it, because it seems to be much more appropriate than the one I downloaded from ofp.gamezone.cz. Maybe you could give me a link. Thanks.




UNN

  • Guest
Re:My epic beach assualt
« Reply #9 on: 13 Jul 2005, 10:44:43 »
Quote
1: When it comes to script I only use simple ones, so my question is can that script be put in an initialisation or On Activation field just like that or do I have to use a command like: "this exec" and then refer to the script.

Depends how your boats are approaching the beach, for my example I had the boats pointing towards the beach from the start of the mission. So I ran a script from the init line of each boat, that stopped when it reached a waypoint.

Quote
2: I saw from your screenshots that you used a different landing craft and I was just wondering where you got it, because it seems to be much more appropriate than the one I downloaded from ofp.gamezone.cz. Maybe you could give me a link. Thanks.

I don't have the original link, but that version was modified by myself to animate the door and allow the AI to run onshore. But your welcome to that:

MP Higgens

John Smith

  • Guest
Re:My epic beach assualt
« Reply #10 on: 15 Jul 2005, 12:26:00 »
You said it depends how my boats are approaching the beach. In my case the boats are already facing the beach and their first waypoint is to move to a position in front of the waypoint and then the next waypoint is for them to get out. (The reason for the first waypoint is what I used to minimise the probability that this problem would occur and it did work slightly however the problem still remains). So how would you use that setdir command if you were me.

Also, that link you gave me for the Higgens which has an openable door, well, it doesn't work. When I use it the door is already open and I can't close it and when troops get out they just do so like with every other boat. Is this normal or do I have to use a script or something.
« Last Edit: 15 Jul 2005, 12:35:07 by John Smith »

UNN

  • Guest
Re:My epic beach assualt
« Reply #11 on: 16 Jul 2005, 00:05:53 »
Hi,

Use the animate command to open and close it:

To open the ramp :
Code: [Select]
Boat01 Animate ["CloseRamp",0]To close the ramp :
Code: [Select]
Boat01 Animate ["CloseRamp",1]
Quote
Is this normal or do I have to use a script or something.

Yeah, you will have to use something like this, instead of the GetOut waypoint:


Code: [Select]
_Boat=_This Select 0

{_Pos=GetPos _x ; _x Action ["GetOut",_Boat] ; _x SetPos _Pos} ForEach (Crew _Boat)-[Driver _Boat]

I lost the old test mission I used for the video :( otherwise you could have had that to.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:My epic beach assualt
« Reply #12 on: 16 Jul 2005, 00:18:40 »
thats an awsome higgens UNN, could you please do the same thing with the MI26 addon, http://ofp.gamezone.cz/index.php?showthis=8085

its the same as the higgens except the door opens in the back, the door already opens via the action menue, so how would i get the troops to charge out the back of the helocopter? thanks


also, i think i know the problem,

give the higgens a move waypoint that is still in the water right before where you want them to land like 5 meters out from the land, then give it a unload waypoint on the beach itself. or you may just use UNNs script.

UNN

  • Guest
Re:My epic beach assualt
« Reply #13 on: 16 Jul 2005, 03:25:42 »
Hi,

The original Higgens was by Mars911:

http://ofp.gamezone.cz/index.php?sekce=unofaddons/boats&archiv=true&page=2

The Higgens cargo positions are already standing, so it's easier to get the transition. It's the same principle I used for the Caribou para scripts. But again, when your cargo is seated. You really need custom animations to get them in the correct positions to walk\run off. But you could get away without anims for the MI26, as long as you did not look to closely when they start standing up. I barley started messing around with OFPAnim, have to check how easy it is to move them off centre.

I should really do a proper version of the Higgens, they just rush out on mass in the video. But it could all be self contained, with functions for Safe and Combat unload.

Cheers
« Last Edit: 16 Jul 2005, 03:27:40 by UNN »

John Smith

  • Guest
Re:My epic beach assualt
« Reply #14 on: 16 Jul 2005, 08:51:29 »
"_Boat=_This Select 0

{_Pos=GetPos _x ; _x Action ["GetOut",_Boat] ; _x SetPos _Pos} ForEach (Crew _Boat)-[Driver _Boat]"

About that script, (sorry I don't know how to quote only parts of a reply) I can't just put it in an init field or On Activation field can I. I have to refer to it with the exec command in one of those fields, could you tell me exactly how to do that because despite my talents at making good missions I've always managed to get past using those kind of scripts. I even use civilians in completely different places to run through triggers for me and that kind of stuff. So could you tell me exactly how to use that script.

Also another question, about the setdir thing, how do I use it and will it solve all my problems because you see I have 11 landing craft each with twelve men approaching the beach and all the men have all been giving "this setunitpos "up"" in their init fields. That's a 132 men running up the beach. However the landing craft approach the beach in four distinct rows instead of just going at a bearing of 0 degrees. Will the setdir thing solve that as well?
Also UNN said that if the boats are already facing the beach directly then the setdir thing could be inserted in the init field. I tried that and the game blocked it and said something about global variables but then again I copied that setdir thing entirely. I assume you have to type it in a different way or use slightly different commands. How?

In other words, I need an exact description of how to get those men out of the landing craft like in that video, and I need an exact description of how to use that setdir command in the init field like you did in the video.

Cheers
« Last Edit: 16 Jul 2005, 15:04:43 by John Smith »