Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- common = {
- CustomEmitter = function (unitID, pieceName, effectName)
- --Spring.Echo(unitID, pieceName, effectName)
- local x,y,z,dx,dy,dz = spGetUnitPiecePosDir(unitID,pieceName)
- Spring.SpawnCEG(effectName, x,y,z, dx, dy, dz)
- end,
- setSFXoccupy = function (setSFXoccupy_argument)
- local terrainType = setSFXocupy_argument
- if terrainType == 2 then
- Move(base, y_axis, -0.85, 50)
- SetUnitValue(COB.UPRIGHT, 1)
- else
- Move(base, y_axis, 0, 50)
- SetUnitValue(COB.UPRIGHT, 0)
- end
- if terrainType == 4 then
- Move(base, y_axis, 0, 50)
- SetUnitValue(COB.UPRIGHT, 0)
- else
- Move(base, y_axis, -0.85, 50)
- SetUnitValue(COB.UPRIGHT, 1)
- 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