Sign in to follow this  
Followers 0
Corvine

Floating Objects in Water and Boats

This tutorial is to teach you how to create boats and amphibious vehicles using the boat type block. We’ll focus this tutorial on making a ‘boathog’, which is an amphibious warthog, though much of this would also be important for floating platforms and other such objects.

 

Floating Objects

Vehi

First thing you’ll want to do is set water density to ‘super floater’ right towards the top of the vehi block. This will make the boat float, though for now the game will ignore it after a short time, causing it to sink after a bit. We’ll fix that soon.

JKx16KT6QuEXOFdexzGei8dwFkO7sKJr-Lx-wjMMjClH6uTz6hcw9BawC1-o2Pj5kZwMPjco3m93wrF3QWja7NvVVp7FMooBwQ_okA1Wt1O2SkEq465-9FTfSLFDiB_rKoQ2LtWa

Next you’ll want to make a hull surface element, and a drag element. In drag you’ll want to have linear and angular dampening to be any number above 0, otherwise your vehicle won’t have a top speed and end up an uncontrollable mess. You may also want the material to be ‘liquid_thin_water’ and to have other aspects to it that the warthog comes with by default, but other objects might not. Even for a non vehicle, you may want this so they don’t entirely lack friction and just float away forever in whatever direction they’re pushed.

rBh3INKgmMdQAfDTuf0yCdwv6YMcefpBagVpl479pyOJbVmkO4eEkFnD6v33WWH5IO0HeN-oGNcVdpIc7EOzVSCZ6RyxkaMvEWhIynFg-5aGTPTlDYorqCkeABp1w6MDzZzQmWMO

Mode

Now, to finish off floating and getting it functioning (not sinking after a short period), we’ll need to make an effect, and a jpt! for it to call by duplicating any other effect and jpt tag. Additionally, since you’d ideally be making one effe for every floating object in your map, you’ll also want to open your vehicle’s mode to give it a unique marker for your effect to play from. For this example, we’ll use floating_point.

m1u9WO6hmjzSB3B0WcucCG4Kr0LTEBwGpkqnB975TMRtT_SCKj4sna3rQQ8Bbjwi5JBra4uXVWx3Ujsb7HLcHQl7Cj4kL7JsN96RjIGeiMKYH73VVNsqZRDLYG7XC0azCPD9kbH6

Effe/Jpt! 

In the effect tag, add the marker to your locations block, then have it run an event roughly every 5 seconds (duration bounds 5 min 5 max), set the runtime base group tag to jpt!, and set the Type to the jpt! You’ve created.KEg6NYBLEq3SezDz2DRKFGZt1cErg8am9SE_DbEGkWbGymEEzLmKiJZ6Si82lMBjvh27HEDWOrhyZmMIfExLBKnQkcDs0mrpa3nyOw4OLLcUKpHz_pmh3F7kHJAjPGy4aJQf7rg1

Next, you’re going to want to set the jpt! you’ve made to have a non 0 radius (we’ll use 0.7, though that’s a bit large), and give it an instantaneous acceleration of at least 0.1. Ensure it does 0 damage, and then if it’s not working, adjust numbers, particularly the radius or the marker in the mode of your object till it floats back out of the water.

AiN0bEhNz9LIYtl2w0uFydCKgq2bhWAxWpdCyh7eUq2CUs0ngmQSrDQG20qOFyh3ebC1FwGEVT3WK1u-4xWU8tq8d0jiwGBVVxXRdYfh0CL_poCp3Muf8M_sGs1Uzo7Uon2hBfHv

Finally, you'll want to close and reopen your vehicle tag, and add another element to your attachments block inside of it that points to your effect, with the marker set to the one you're using.

UFyQcAkB_WBNf-Ex5c3O2cvFgWHrTfgZxSwei9hPS_tCjW0wo5H2kt-tFEv3PIMl9BiJNfy6oSo07X2T5ObZkFUtJBLFNJhNcTqzn4IH_yyOEeHwaDfoco1a6oFyz4xVXWaM5HrY

Boat/Amphibious Vehicles

Then add an element to the boat block. If you want it to be like the warthog, copy all the values down to it from the Human Jeep type, including the addresses and entry counts of the ‘gears’ and ‘load and cruise sound’ blocks, which you’ll find by clicking the i icon next to the gear in the block.

_OfEvfwl-nEY5LzvM82b9V6aaJ2BxGUa0wB3TUMnoV8nLuMCU1fHtaPqGtPqnUO6u82KeKTDjkUSA7fBbaOlgi8-rlLoqyjnr0ySGJRvLqDB-uH-YCpHjuTgeEm5doW5cKSKxb_a

If you want to make the boat not amphibious, you’ll want to set the gear ratio in the gears block to 0.

 

Finally, you’ll want to mess around with the block engine block. The propeller marker will need to be any marker on your vehicle that reaches the water, the propeller radius is how far that marker can be from water and still function, the torque scale is how far back the vehicle is flung as it moves forward (or flung forward as it moves back). Reverse linear acceleration is moving backwards, while linear is moving forwards. Angular acceleration is turning, and stabilization is how much the vehicle wants to point a certain angle. The rest of what's in the boat block is either too difficult for me to figure out or outright crashes the game.

iSfOjxQkRGtQQpazy02rhWHrf_GDbEXAeSqRqX7jmW0Q-ovM0Up4mlVUpb0ogAuZzhTS_XI5qRVrfoz4md73lM_qM74Ia5WVcz__kcvx4OCFSO2To9pDkybtJNduTURM0pAvNEi4

 

Congrats!

After you do all of this, you should have a proper boathog, with some bugs I’ll list.

1. The vehicle slides around a lot, like it has low friction

2. The tires aren’t properly animated

3. Moving backwards is really slow (can fix this by making the negative gear shift a much more potent number)

4. The hog gets pushed slightly once every 5 seconds

 

Hopefully none of these are deal breakers for you and who knows? Maybe people will figure out how to fix these.

Zatarita, tarikja and Takka like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

Before I get started, I would like to say thank you so much for participating in the contest c: It means a lot to me personally, but also the community as a whole. Without tutorials like these we wouldn't of gotten as far as we have.. With that aside!

This tutorial presented the steps very well with supporting images. We see you made some adjustments to present the best version of your tutorial c: it does show. While it does present the data very well, there are a few points that slipped through. Some things are assumed knowledge. While I might be able to tell the program you're using is assembly, to a new modder that is key information that is missing. I don't want this to discourage you though! Despite this you still placed
2nd
place with a 9\10. We will be getting into contact with you in regards to your winnings.

Now that scoring is over you are more than welcome to make any adjustments to the post you see fit.

Edited by Zatarita
Corvine and Takka like this

Specifications:

S3dpak - format - Imeta/ipak - format - Fmeta - format

Programs:

H2a-inflate - SuP

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.