Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CustomEmitter = function (unitID, pieceName, effectName)
- --Spring.Echo(unitID, pieceName, effectName)
- local x,y,z,dx,dy,dz = Spring.GetUnitPiecePosDir(unitID,pieceName)
- Spring.SpawnCEG(effectName, x,y,z, dx, dy, dz)
- end
- common = {
- CustomEmitter = CustomEmitter,
- setSFXoccupy = function (setSFXoccupy_argument)
- Spring.Echo("common.setSFXoccupy is being called")
- if setSFXocupy_argument == 2 then
- Move(base, y_axis, -0.85, 50)
- SetUnitValue(COB.UPRIGHT, 1)
- Spring.Echo("Setting Upright 1")
- else
- Move(base, y_axis, 0, 50)
- SetUnitValue(COB.UPRIGHT, 0)
- Spring.Echo("Setting Upright 0")
- end
- end,
- DirtTrail = function ()
- while isMoving do
- CustomEmitter(unitID, dirt, "dirt") -- Second argument is the piece name, third argument needs to be a string because it will be the name of the CEG effect used
- Sleep(400)
- end
- end,
- }
- return common
Advertisement
Add Comment
Please, Sign In to add comment