Garry's Mod

Garry's Mod

[simfphys] Float Base
 此主题已被置顶,因此可能具有重要性
DangerKiddy  [开发者] 2018 年 6 月 18 日 上午 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
最后由 DangerKiddy 编辑于; 2018 年 6 月 18 日 上午 8:33
< >
正在显示第 1 - 6 条,共 6 条留言
Wild Wrecker 2020 年 4 月 4 日 上午 6:48 
@DK is this for the direction the boat is heading in?
Supine 💖 59 2020 年 7 月 7 日 上午 7:14 
bruh
Wild Wrecker 2020 年 7 月 7 日 上午 7:27 
引用自 Supine
bruh
i re read it a while ago and saw it
Grass 2022 年 9 月 8 日 上午 9:34 
Thanks
Lyeanie 2023 年 4 月 27 日 上午 3:45 
how to use this?
Wild Wrecker 2023 年 12 月 9 日 上午 5:08 
引用自 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?
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50