Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("[windgenerator] mod caricata @frows4k\n")
- local function SetWind(enabled)
- local eve = FindFirstOf("CH_P_EVE_01_Blueprint_C")
- if not eve or not eve:IsValid() then
- print("[windgenerator] non trovo eve, rip\n")
- return
- end
- local direction = enabled
- and { X = -1.0, Y = 0.0, Z = 0.0 }
- or { X = 0.0, Y = 0.0, Z = 0.0 }
- local characterOk = pcall(function()
- eve:SetClothAdditiveWindDirection(direction)
- end)
- local changed = 0
- local meshes = FindAllOf("SkeletalMeshComponent")
- if meshes then
- for _, mesh in pairs(meshes) do
- if mesh and mesh:IsValid()
- and string.find(tostring(mesh:GetFullName()), "CH_P_EVE", 1, true) then
- local ok = pcall(function()
- mesh:SetSBKawaiiPhysicsForce(direction, enabled and 500.0 or 0.0)
- end)
- if not ok then
- ok = pcall(function()
- mesh:CallFunction(
- "SetSBKawaiiPhysicsForce",
- direction,
- enabled and 500.0 or 0.0
- )
- end)
- end
- if ok then changed = changed + 1 end
- end
- end
- end
- print("[windgenerator] Wind " .. (enabled and "ON" or "OFF")
- .. " | Character=" .. tostring(characterOk)
- .. " | Meshes=" .. tostring(changed) .. "\n")
- end
- RegisterULocalPlayerExecPreHook(function(Context, InWorld, Command, Ar)
- local cmd = tostring(Command):lower()
- if cmd == "windon" then
- SetWind(true)
- return true, false
- end
- if cmd == "windoff" then
- SetWind(false)
- return true, false
- end
- return nil, true
- end)
- print("[windgenerator] To enable win, simply type these commands: windon | windoff\n")
Advertisement
Comments
-
- Instructions:
- place it in ue4ss/Mods/windgenerator and call it "main.lua"
- then open ue4ss/Mods/mods.txt
- add
- windgenerator : 1
- installed
Add Comment
Please, Sign In to add comment