Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //acs
- script 1 (int Xscale, int Yscale, int which)
- {
- if (Xscale == 0 & Yscale == 0){ PrintBold(s:"Add arguments dummy"; Terminate; }
- if (Yscale == 0){ Yscale = Xscale; }
- switch (which)
- {
- case 0:
- Xscale = Xscale * 0.01
- Yscale = Yscale * 0.01
- Break;
- case 1:
- Xscale = Xscale * 0.001
- Yscale = Yscale * 0.001
- Break;
- case 2:
- Break;
- }
- SetActorProperty(0,APROP_ScaleX,Xscale);
- SetActorProperty(0,APROP_ScaleY,Yscale);
- }
- //decorate
- //Can't pass fixed point through script arguments, so just either use case 0 like so
- actor SomeActor
- {
- States
- {
- GetStretched:
- TNT1 A 0 ACS_ExecuteWithResult(1,11,20)
- Goto See
- }
- }
- //which will set the Xscale to 0.11 and Yscale to 0.20
- //make sure you use the correct arg values! with case 0, 2 is 0.02, not 0.2
- //or use case 1 like so
- actor SomeActor
- {
- States
- {
- GetStretched:
- TNT1 A 0 ACS_ExecuteWithResult(1,301,220,1)
- Goto See
- }
- }
- //which will set the Xscale to 0.301 and Yscale to 0.22
- //make sure you use the correct arg values! with case 1, 22 is 0.022, not 0.22
- //or use case 2 for the most precision possible
- //multiply the fixed point by 65536
- //For instance, below, the arguments passed are equivalent to Xscale of 1.5171 and Yscale of 0.5321
- actor SomeActor
- {
- States
- {
- GetStretched:
- TNT1 A 0 ACS_ExecuteWithResult(1,99425,34878,2)
- Goto See
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement