Ships that can't be beached help

Ask questions, discuss ideas, get answers
User avatar
Iced Earth
Posts: 209
Joined: Sun Oct 18, 2009 2:07 pm
Contact:

Ships that can't be beached help

Post by Iced Earth »

Hey guys, I'm working on an idea already, but thought I would post here to see if anyone had any creative ideas that I might not have thought of.

Anyone that runs a public server knows that idiots beaching ships on purpose can be a big pain in the ass. I wanted to fix that by making all ships "smacktard proof", and even noob-proof.

Right now I'm experimenting with sandbags at sandbar height, addTemplate'd to the shokaku. On wake island (and should be about the same for all water maps), the sand bar is about 5 meters below the water surface level, give or take. One problem I could see with the sandbags is that torpedoes could hit them...which would be bad. :oops: In that regard I was thinking wheels/springs might be good, added as kind of "bumpers" in the water to hit the sandbar head-on and stop the ship or send it backwards a bit.

One random question: Is it possible to change the geometry size of an object when you are addTemplate-ing it to a Complex? If so I don't know the command.

thanks
Image
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: Ships that can't be beached help

Post by tekk »

Well my thoughts on the sandbags would be that if your spawning them 5+ meters below the waterline that the torpedos should go right above them, I dont think torpedoes go any lower than 1-2 meters right? But also whats to say that the same beaching effect wouldnt happen to the sandbags as it does the hull?
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Ships that can't be beached help

Post by freddy »

yess i have a idea, or infact i have used a variant of this to prevent ships (carriers) to be beached

look at his code, this wheels have no networkinfo so you can add them to whatever engine you like, just when your testing make them visible so you can see there position. then rotate them 180 so they will drive the ship backwards out in the sea again

Code: Select all

rem *** PT_FrontWheel ***
ObjectTemplate.create Spring PT_FrontWheel
ObjectTemplate.geometry Willy_WheelR_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.Grip c_PGFEngineGrip
ObjectTemplate.setStrength 25
ObjectTemplate.setDamping 5
ObjectTemplate.createInvisible 1
the "original" engine doesnt have any network info either but havent tested using it in ssm, i think its better to addtemplate the wheels to the carrier engine

Code: Select all

ObjectTemplate.create Engine PT_FrontLandEngine
ObjectTemplate.setAttachToListener 1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate PT_FrontWheel
ObjectTemplate.setPosition 1.54/1.64/8.9
ObjectTemplate.addTemplate PT_FrontWheel
ObjectTemplate.setPosition -1.699/1.64/8.9
rem -------------------------------------
ObjectTemplate.setMinRotation 0/0/-4000
ObjectTemplate.setMaxRotation 0/0/2500
ObjectTemplate.setMaxSpeed 0/0/5000
ObjectTemplate.setAcceleration 0/0/5000
ObjectTemplate.setInputToRoll c_PIThrottle
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setEngineType c_ETCar
ObjectTemplate.setTorque 8
ObjectTemplate.setDifferential 2
ObjectTemplate.setNumberOfGears 5
ObjectTemplate.setGearUp 0.95
ObjectTemplate.setGearDown 0.4
good luck
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Re: Ships that can't be beached help

Post by MR PINK BALLS »

attach some super big object like a crane or something to the ship,that way when the before the ship hist land the crane will and it will make it bounce away
Image Image

I <3 Ironmen
Poow
Posts: 271
Joined: Sun Nov 01, 2009 8:00 pm
Location: Germany
Contact:

Re: Ships that can't be beached help

Post by Poow »

:lol:
You’re entering a world of pain!
User avatar
MR PINK BALLS
Posts: 267
Joined: Sun Oct 18, 2009 4:01 pm

Re: Ships that can't be beached help

Post by MR PINK BALLS »

:L ^^
Image Image

I <3 Ironmen
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Ships that can't be beached help

Post by POTAmatt »

Forgotten Hope Secret Weapons cut a ledge into the heightmap. It helps a bunch with the large ships. They bounce right back. I'm also looking forward to trying Freddy's idea with the additional no network wheels.
P.S. Does anyone have any idea as to how to display the sea floor?

Image
User avatar
Losnar
Posts: 5
Joined: Thu Jan 14, 2010 4:09 pm

Re: Ships that can't be beached help

Post by Losnar »

Give the boats reverse nitrous. I prefer to have both forward/reverse nitrous on left/right click. Thems be some fun boats! Mmmmmhmmm!
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Ships that can't be beached help

Post by POTAmatt »

Ahaha. It would be a riot on that Prince of Wales.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Ships that can't be beached help

Post by fo0k »

POTAmatt wrote: Does anyone have any idea as to how to display the sea floor?
not in terms of code.. but you could create a low detail model of the sea floor then it would always be there. pretty easy to do this in max when you import the heightmap.. just cut off everything above the waterline then optimise the mesh until happy.. even a 500kb mesh would hold good detail without lag. My underwater reflections vid used this technique and the mesh was as big as the whole map (but top and bottom cut off)


..Maybe dont stop the beaching! Assist it!

Image
Post Reply