• API
• FAQ
• Tools
• Archive
daily pastebin goal
66%
SHARE
TWEET

# Fangames: Make Apple Star Code

a guest Nov 27th, 2015 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
2. //argument0 = center x, or where the star is built around.
3. //argument1 = center y, or where the star is built around.
4. //argument2 = how far outward the star goes in pixels.
5. //argument3 = how far outward the star's caves go, in pixels.
6. //argument4 = how many points the star has.
7. //argument5 = how many apples are put in between each line.
8. //argument6 = the offset angle of the star.
9. //argument7 = the speed multiplier of the apples.
10. //argument8 = whether the apples start in their normal positions or exactly at the center positions.
11.
12. for(i=0;i<argument4;i+=1){
13.         angle=(360/argument4*i)+argument6;
14.         angle2=(360/argument4*(i+0.5))+argument6;
19.         for(amt=0;amt<=argument5;amt+=1){
20.                 vertical=(p2x-p1x);
21.                 if vertical!=0{
22.                         slope=(p2y-p1y)/(p2x-p1x);
23.                         slopex=(p2x-p1x)*(1/argument5*amt);
24.                         slopey=slopex*slope;
25.                 }
26.                 else{
27.                         slopex=0;
28.                         slopey=(p2y-p1y)/argument5*amt;
29.                 }
30.                 a=instance_create(p1x+slopex,p1y+slopey,deliciousFruit);
31.                 a.direction=point_direction(argument0,argument1,a.x,a.y);
32.                 a.speed=point_distance(argument0,argument1,a.x,a.y)/point_distance(p1x,p1y,argument0,argument1)*argument7;
33.                 if argument8=1{
34.                         a.x=argument0;
35.                         a.y=argument1;
36.                 }
37.         }
38.         angle2=(360/argument4*(i-0.5))+argument6;
41.         for(amt=0;amt<argument5;amt+=1){
42.                 if amt!=0 && amt!=argument5{
43.                         vertical=(p2x-p1x);
44.                         if vertical!=0{
45.                                 slope=(p2y-p1y)/(p2x-p1x);
46.                                 slopex=(p2x-p1x)*(1/argument5*amt);
47.                                 slopey=slopex*slope;
48.                         }
49.                         else{
50.                                 slopex=0;
51.                                 slopey=(p2y-p1y)/argument5*amt;
52.                         }
53.                         a=instance_create(p1x+slopex,p1y+slopey,deliciousFruit);
54.                         a.direction=point_direction(argument0,argument1,a.x,a.y);
55.                         a.speed=point_distance(argument0,argument1,a.x,a.y)/point_distance(p1x,p1y,argument0,argument1)*argument7;
56.                         if argument8=1{
57.                                 a.x=argument0;
58.                                 a.y=argument1;
59.                         }
60.                 }
61.         }
62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top