Garry's Mod

Garry's Mod

[simfphys] Float Base
 Denne tråd er blevet fastgjort, så den er sikkert vigtig
DangerKiddy  [udvikler] 18. juni 2018 kl. 8:33
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
Sidst redigeret af DangerKiddy; 18. juni 2018 kl. 8:33
< >
Viser 1-6 af 6 kommentarer
Wild Wrecker 4. apr. 2020 kl. 6:48 
@DK is this for the direction the boat is heading in?
Supine 💖 59 7. juli 2020 kl. 7:14 
bruh
Wild Wrecker 7. juli 2020 kl. 7:27 
Oprindeligt skrevet af Supine:
bruh
i re read it a while ago and saw it
Grass 8. sep. 2022 kl. 9:34 
Thanks
Lyeanie 27. apr. 2023 kl. 3:45 
how to use this?
Wild Wrecker 9. dec. 2023 kl. 5:08 
Oprindeligt skrevet af 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?
< >
Viser 1-6 af 6 kommentarer
Per side: 1530 50