ForbodingAngel

Untitled

May 2nd, 2014
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. CustomEmitter = function (unitID, pieceName, effectName)
  2. --Spring.Echo(unitID, pieceName, effectName)
  3. local x,y,z,dx,dy,dz = Spring.GetUnitPiecePosDir(unitID,pieceName)
  4.  
  5. Spring.SpawnCEG(effectName, x,y,z, dx, dy, dz)
  6. end
  7.  
  8. common = {
  9.  
  10. CustomEmitter = CustomEmitter,
  11.  
  12. setSFXoccupy = function (setSFXoccupy_argument)
  13. Spring.Echo("common.setSFXoccupy is being called")
  14. if setSFXocupy_argument == 2 then
  15. Move(base, y_axis, -0.85, 50)
  16. SetUnitValue(COB.UPRIGHT, 1)
  17. Spring.Echo("Setting Upright 1")
  18. else
  19. Move(base, y_axis, 0, 50)
  20. SetUnitValue(COB.UPRIGHT, 0)
  21. Spring.Echo("Setting Upright 0")
  22. end
  23. end,
  24.  
  25. DirtTrail = function ()
  26. while isMoving do
  27. 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