ForbodingAngel

Untitled

May 2nd, 2014
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 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 = Spring.GetUnitPiecePosDir(unitID,pieceName)
  6.  
  7. Spring.SpawnCEG(effectName, x,y,z, dx, dy, dz)
  8. end,
  9.  
  10. setSFXoccupy = function (setSFXoccupy_argument)
  11. Spring.Echo(type(setSFXoccupy_argument))
  12. Spring.Echo("common.setSFXoccupy is being called", setSFXoccupy_argument)
  13. Spring.Echo(setSFXocupy_argument == 1, setSFXocupy_argument == 2)
  14. Spring.Echo(setSFXocupy_argument == 4, setSFXocupy_argument == 3, setSFXocupy_argument == 0)
  15. if setSFXocupy_argument == 1 or setSFXocupy_argument == 2 then
  16. Move(base, y_axis, 0, 50)
  17. SetUnitValue(COB.UPRIGHT, 0)
  18. Spring.Echo("Setting Upright: 0")
  19. elseif setSFXocupy_argument == 4 or setSFXocupy_argument == 3 or setSFXocupy_argument == 0 then
  20. SetUnitValue(COB.UPRIGHT, 1)
  21. Spring.Echo("Setting Upright: 1")
  22. end
  23. end,
  24.  
  25. DirtTrail = function ()
  26. while isMoving do
  27. common.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
  28. Sleep(400)
  29. end
  30. end,
  31. }
  32. return common
Advertisement
Add Comment
Please, Sign In to add comment