Garry's Mod

Garry's Mod

[simfphys] Float Base
 This topic has been pinned, so it's probably important
DangerKiddy  [developer] Jun 18, 2018 @ 8:33am
For developers:
If you want make your vehicle floating, add these lines under Mass = 100,

OnSpawn = function(ent) ent:SetNWInt("_direction_", 0) ent:SetNWInt("__SetBuoyancyRatio__", 1.5) ent:SetNWBool("_can_swim__", true) ent:SetNWBool("_isboat", true) end,

SetBuoyancyRatio means - How good it will float?
_isboat - it disable my another scripts for boats.So, use it only if you make boat, not car or amphibian vehicle
_can_swim - can swim?
direction - all cars have their own direction, if your car will float right or back, change it:
0 - Forward
1 - Left
2 - Right
Last edited by DangerKiddy; Jun 18, 2018 @ 8:33am
< >
Showing 1-6 of 6 comments
Wild Wrecker Apr 4, 2020 @ 6:48am 
@DK is this for the direction the boat is heading in?
Supine 💖 59 Jul 7, 2020 @ 7:14am 
bruh
Wild Wrecker Jul 7, 2020 @ 7:27am 
Originally posted by Supine:
bruh
i re read it a while ago and saw it
Grass Sep 8, 2022 @ 9:34am 
Thanks
Sikanagto Apr 27, 2023 @ 3:45am 
how to use this?
Wild Wrecker Dec 9, 2023 @ 5:08am 
Originally posted by DangerKiddy:
If you want make your vehicle floating, add these lines under Mass = 100,

OnSpawn = function(ent) ent:SetNWInt("_direction_", 0) ent:SetNWInt("__SetBuoyancyRatio__", 1.5) ent:SetNWBool("_can_swim__", true) ent:SetNWBool("_isboat", true) end,

SetBuoyancyRatio means - How good it will float?
_isboat - it disable my another scripts for boats.So, use it only if you make boat, not car or amphibian vehicle
_can_swim - can swim?
direction - all cars have their own direction, if your car will float right or back, change it:
0 - Forward
1 - Left
2 - Right
question how do i fix boats sinking when a i use the phys gun?
< >
Showing 1-6 of 6 comments
Per page: 1530 50