Adding A Bobbing Boat To Your Map

This tutorial by br3nt shows you how to add a bobbing boat.


  1. First Create A Small Test Map Put Some Water In it Somewhere......u Cant See It...But Its There...

  2. Creat a Script_model and add these parameters:

KEY:model
VALUE:xmodel/ship_supplyboat

KEY:targetname
VALUE:boat

Thats it Compile Your Map.

Reference Pics Below:

Now for the Script... In you main() section of your script place this line:

thread boatbobbing();

Then Place this Function at the Bottom of Your Script:

boatbobbing()
{
boat = getent("boat","targetname"); // Get the name of the script_model
wait (randomfloat (1.5)); // Generate a random Number of Seconds Between Bobbings
org = (-64, 96, 72); // Define Origin or Location of Your Boat/script_model
timer = 1; // Speed of the Bobbing - Higer Number Slower Bobbing
while (1)
{
boat moveto (org + (0,0,2), timer, timer*0.5, timer*0.5); // 2 is the number of units to go Above Original Location
wait (timer);
boat moveto (org + (0,0,-2), timer, timer*0.5, timer*0.5); // 2 is the number of units to go Below Original Location
wait (timer);
}
}

Thats it...e to See If It Works...

Remember This Function Can Also Be Used By Making A Script_Brushmodel of a Plank or Anything You Can Build Basically.

Isnt Scripting FUN...

This page was last edited on 2024-06-07 17:38

Powered by vCoDMods

This page was last edited on 2024-06-07 17:38

Join our Discord
https://discord.gg/8hNC2M6MdS

Powered by vCoDMods