Advertisement
scroton

Untitled

Nov 21st, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. //acs
  2. script 1 (int Xscale, int Yscale, int which)
  3. {
  4. if (Xscale == 0 & Yscale == 0){ PrintBold(s:"Add arguments dummy"; Terminate; }
  5. if (Yscale == 0){ Yscale = Xscale; }
  6. switch (which)
  7. {
  8. case 0:
  9. Xscale = Xscale * 0.01
  10. Yscale = Yscale * 0.01
  11. Break;
  12. case 1:
  13. Xscale = Xscale * 0.001
  14. Yscale = Yscale * 0.001
  15. Break;
  16. case 2:
  17. Break;
  18. }
  19. SetActorProperty(0,APROP_ScaleX,Xscale);
  20. SetActorProperty(0,APROP_ScaleY,Yscale);
  21. }
  22.  
  23. //decorate
  24. //Can't pass fixed point through script arguments, so just either use case 0 like so
  25.  
  26. actor SomeActor
  27. {
  28. States
  29. {
  30. GetStretched:
  31. TNT1 A 0 ACS_ExecuteWithResult(1,11,20)
  32. Goto See
  33. }
  34. }
  35.  
  36. //which will set the Xscale to 0.11 and Yscale to 0.20
  37. //make sure you use the correct arg values! with case 0, 2 is 0.02, not 0.2
  38. //or use case 1 like so
  39.  
  40. actor SomeActor
  41. {
  42. States
  43. {
  44. GetStretched:
  45. TNT1 A 0 ACS_ExecuteWithResult(1,301,220,1)
  46. Goto See
  47. }
  48. }
  49.  
  50. //which will set the Xscale to 0.301 and Yscale to 0.22
  51. //make sure you use the correct arg values! with case 1, 22 is 0.022, not 0.22
  52. //or use case 2 for the most precision possible
  53. //multiply the fixed point by 65536
  54. //For instance, below, the arguments passed are equivalent to Xscale of 1.5171 and Yscale of 0.5321
  55.  
  56. actor SomeActor
  57. {
  58. States
  59. {
  60. GetStretched:
  61. TNT1 A 0 ACS_ExecuteWithResult(1,99425,34878,2)
  62. Goto See
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement