ForbodingAngel

Untitled

May 1st, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. common = {
  2.  
  3. CustomEmitter = function (unitID, pieceName, effectName)
  4. --Spring.Echo(unitID, pieceName, effectName)
  5. local x,y,z,dx,dy,dz = spGetUnitPiecePosDir(unitID,pieceName)
  6.  
  7. Spring.SpawnCEG(effectName, x,y,z, dx, dy, dz)
  8. end,
  9.  
  10. setSFXoccupy = function (setSFXoccupy_argument)
  11. local terrainType = setSFXocupy_argument
  12. if terrainType == 2 then
  13. Move(base, y_axis, -0.85, 50)
  14. SetUnitValue(COB.UPRIGHT, 1)
  15. else
  16. Move(base, y_axis, 0, 50)
  17. SetUnitValue(COB.UPRIGHT, 0)
  18. end
  19.  
  20. if terrainType == 4 then
  21. Move(base, y_axis, 0, 50)
  22. SetUnitValue(COB.UPRIGHT, 0)
  23. else
  24. Move(base, y_axis, -0.85, 50)
  25. SetUnitValue(COB.UPRIGHT, 1)
  26. end
  27. end,
  28.  
  29. DirtTrail = function ()
  30. while isMoving do
  31. 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
  32. Sleep(400)
  33. end
  34. end
  35. }
  36. return common
Advertisement
Add Comment
Please, Sign In to add comment