Jump to content
Sign in to follow this  
philcommando

Anyone for a swim?

Recommended Posts

Swimming is possible, but i am not sure if it is still considered a limitation. I know the COC has a diver, Pappy has a liferaft concept, but mine is directly onto the soldier thru the addaction command.

Pic:-

horse415tc.jpg

How its done:-

1. An invisible boat addon is created(1m X 1m box with driver) with speed and view config to suit soldier

2. A script is created so that it appears on the command menu of the soldier. When he needs to swim, the boat is created instantly and he is movein as driver, thus he survives on the water.

3. When he gets on land, he gets out of the 'boat' and continues his journey. The boat is then 'deletevehicle' away.

Thing is, is there any other better way to implement this feature

*globally into every soldier, and

* detect water and land level (real height)and

*is any animator willing to create a breaststroke driver action? ( although not really necessary as the body is underwater, just like in real)

Share this post


Link to post
Share on other sites

Script i used:-

Quote[/b] ]

_vehicle = _this select 0

#Swim

_vehicle removeaction swim

_vehicle setdammage 0

platform = "PCswim" createvehicle getPos ( _this select 0)

_vehicle moveindriver platform

exit

Share this post


Link to post
Share on other sites

No animations. The proxy driver is using the pbr driver - standing. Once ingame u will realize that animations may be useless as the water is not see thru and the level raises and fall, overwelhming the swimmer if animations is used.

Thing is, are we satisfied with what we currently have or this addon is not necessary anymore?

Share this post


Link to post
Share on other sites

if you get the guy in a lying position and let him move arms and legs, it would look like swimming, that's what i meant

Share this post


Link to post
Share on other sites

maybe this is stupid, i'm not too knowledgeable with these things, but could you use the setpos command to put the guy half in the water and then use the swimming anim so you can see him swim

Share this post


Link to post
Share on other sites

What if transparant water gets released? We've already seen it in screenshots.

Reggy

Share this post


Link to post
Share on other sites

Thats great, australian, perhaps u may wanna make contact with wildo, as he had kindly volunteered to make anims? smile_o.gif

As for the illusive water land absolute height thingy that has been haunting us since ofp1 came out, its no longer a hindrance.

Here's how:-

Quote[/b] ]

_vehicle = _this select 0

#loop

?(getpos man1 select 2) - (getpos _vehicle select 2)<=-0.5: [man1] exec "\PCswim\swim1.sqs"

~0.23

goto "loop"

#exit

exit

Sheesh!...only 1 damn line crazy_o.gif

Basically, what i did was

1.to put a pbr ingame, and init it with the script :- [this] exec "onland.sqs"

2. what the script does is that it acts as a height detector - for it lies on the 0 level.

3. So, when the ai soldier named man1 runs into the shoreline and slightly beyond or starts on water, the script detects he is at below 0 height - 0.5 - and exec the swim1 script.

crazy_o.gif  crazy_o.gif  crazy_o.gif  crazy_o.gif  crazy_o.gif

now to see how to make the ai auto delete. gotta becareful here, cos if auto script delete, he may never enter anyother vehicle above 0 level!  crazy_o.gif

chalky, no worries, no one is stupid, just have not come across the situation before. U cant jst simply setpos vehicles including men for gravity will react and fall. If u have a solid surface, your setpos thingy will land on the surface, and overwater,it will just sink as water is not solid. Only objects that are without engine or has canfloat in their config can be setpos over water. Thanks anyway smile_o.gif

Share this post


Link to post
Share on other sites

I actually meant a looped setpos which would repeatedly set the units pos to 0. but I tried it and came across to many problems (the unit swinging around and ending up upside down being one)

Share this post


Link to post
Share on other sites

Wow. This sounds great Philcommando! If you could make a demo of it using the CoC diver model (which they released to the public to modify) after you get the animations, that would truly be fantastic.

One of the biggest problems with the CoC diver (which overall is pretty good) is that the AI DON'T FOLLOW WAYPOINTS when in the water. So this prevents mission makers from making missions where a squad of Navy SEALs deploy from a Zodiac boat and swim to the shore or where they parachute into a coastal area into the water and swim to shore. Instead you can only make James Bond type one-man missions with the diver which is very limiting.

So if you can get the AI to swim with this system, it will be a big breakthru I think. Also check out the CoC swimming animations...I think they have something on their diver.

Chris G.

aka-Miles Teg<GD>

Share this post


Link to post
Share on other sites

Thanks miles. As for the coc diver, i have not downloaded it yet, for i was looking into an across the board solution to swimming. From what i have read from the posts, much thanks to matthis for comming out with it - it took 9 months into developement for that addon.

However it was done at a time when many aspects of ofp was unknown. Now i only took 9hours to get a semblance of across the board swimming for Ai troops. I was only lucky to have stumble upon this solution while seeking some solution to an improved horse performance and not in the league of serious researchers like matthis.

As for this swimming addon, it is now possible for the ai to get into water and start swimming as a team, and when they reach the shore, with a waypoint, it automatically getout vehicle, or with a single 'disembark' command, when the reach the shore, they getout of the vehicle and move to wherever u want them to do so. Reason perhaps cos i use the invisible boat addon instead of a car addon, for the boat will never go onland and any commands to do so will make the driver get out of the boat to move on land.

As for animations, personally i think it wont be necessary as the soldier has his head above water only, but i would love to see what rommel and wildo can amaze us with smile_o.gif

Share this post


Link to post
Share on other sites

Phil, why not use the tank commander anim for it, so it looks like hes treading water or something. CoC didn't have an anim, they used the prone one, but it didn't matter since they were underwater, anyways, phil, you better make the script so you can execute it on any soldier, unlike CoC's divers.

Share this post


Link to post
Share on other sites

Would be GREAT philcommando ......... but would be even greater if you can get it so action items for nearby vehicles come up while you are "swimming". ie "Get In Back" etc

That way downed pilots or abandoned ship crew can be picked up.

Share this post


Link to post
Share on other sites

Across the board means this swim feature should be usable to all units.

Bis standard feature:-

----------------------

1. Ai and groups will never want to touch the water, sometimes stop dead 10 meters infront of sea even with waypoints and triggers.

2. Ai touch water and is a goner.

3. Ai vehicle does not react well or follow commands on water.

Now

---------

Tested and it is working, Ai soldiers and groups can go into the sea now and swim to an objective together, or getout from ships/heli into the sea and swim to shore - get on shore and move to their targets on land. Think normandy landings wink_o.gif

Ai can getonboard ships, but if only there are roadways inbuilt into addons. One way to overcome this is to create another invisible addon - a platform whereby ai group can getonboard, and from there, getin to BIS type crafts.

horse443bd.jpg

horse451oq.jpg

horse425jj.jpg

horse432ie.jpg

In anycase, most of the research results are here and i believe any one can do it and do it better than me 10 times over, so there's no need for me to release this addon - its just a basic 02 model and some scripts probably a newbie would do better. Have fun. smile_o.gif

Share this post


Link to post
Share on other sites
its just a basic 02 model and some scripts probably a newbie would do better.

Very modest philcommando ......... but if I look around ....... I think you were here first ! biggrin_o.gif (with this variation anyway)

If your not taking it further, I'd be interested in playing with it ........ and I am a O2 newbie ! lol

(it fits well with my potential WaterWar project)

Share this post


Link to post
Share on other sites

lol!...there's no price for being first, and if there is a first, its gotta be coc team. i didnt even publish it, but my purpose is to prove not only to myself but to fans that swimming is very possible, after a fashion...doesnt seem to have any limits in ofp. Would be great if u can take it further. Let me tidy it up a bit and i will send my notes over, if u require. All the best smile_o.gif

Share this post


Link to post
Share on other sites

you mean that you'll not release what you have done so far for the swimming anim? sad_o.gif

Share this post


Link to post
Share on other sites

err...there's no anim, just a standing driver pos. by reading the posts, i better not release it if i want to stay alive!!!..they are clamouring for a full swim animation - beyond me as i aint no animator. Best let rommel and gnat come up with something more to the liking of folks here while i am busy swimming away my style in my missions:p

Share this post


Link to post
Share on other sites

Like I said, I would be satisfied with a tank commander anim with his arms up on the surface of the water.

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  

×