Fangames > User-Made Creations
Apple Star Script
(1/1)
lawatson:
Not just any apple star creation script, though. Not only does it have what you would normally expect from a star creation code, but it is super controllable too. Like, you can literally micromanage it to such an insane level that I think its existence alone will make aspiring avoidance creators climax in their seats.
Here's the script in its glory:
https://pastebin.com/FLW2fTjW
Or, if you're the type of guy who's too lazy to click it, here's a spoiler with the code instead:
(click to show/hide)//script = make_star(x,y,outer radius,inner radius,lines amount,apples per line,offset,speed,burst);
//argument0 = center x, or where the star is built around.
//argument1 = center y, or where the star is built around.
//argument2 = how far outward the star goes in pixels.
//argument3 = how far outward the star's caves go, in pixels.
//argument4 = how many points the star has.
//argument5 = how many apples are put in between each line.
//argument6 = the offset angle of the star.
//argument7 = the speed multiplier of the apples.
//argument8 = whether the apples start in their normal positions or exactly at the center positions.
for(i=0;i<argument4;i+=1){
angle=(360/argument4*i)+argument6;
angle2=(360/argument4*(i+0.5))+argument6;
p1x=argument0+(argument2*sin(degtorad(angle)));
p1y=argument1+(argument2*cos(degtorad(angle)));
p2x=argument0+(argument3*sin(degtorad(angle2)));
p2y=argument1+(argument3*cos(degtorad(angle2)));
for(amt=0;amt<argument5;amt+=1){
vertical=(p2x-p1x);
if vertical!=0{
slope=(p2y-p1y)/(p2x-p1x);
slopex=(p2x-p1x)*(1/argument5*amt)*point_distance(p1x,p1y,p2x,p2y);
slopey=slopex*slope;
}
else{
slopex=0;
slopey=(p2y-p1y)/argument5*amt;
}
a=instance_create(p1x+slopex,p1y+slopey,apple);
a.direction=point_direction(argument0,argument1,a.x,a.y);
a.speed=point_distance(argument0,argument1,a.x,a.y)/point_distance(p1x,p1y,argument0,argument1)*argument7;
if argument8=1{
a.x=argument0;
a.y=argument1;
}
}
angle2=(360/argument4*(i+0.5))+argument6;
p2x=argument0+(argument3*sin(degtorad(angle2)));
p2y=argument1+(argument3*cos(degtorad(angle2)));
for(amt=0;amt<argument5;amt+=1){
if amt!=0 && amt!=argument5{
vertical=(p2x-p1x);
if vertical!=0{
slope=(p2y-p1y)/(p2x-p1x);
slopex=(p2x-p1x)*(1/argument5*amt)*point_distance(p1x,p1y,p2x,p2y);
slopey=slopex*slope;
}
else{
slopex=0;
slopey=(p2y-p1y)/argument5*amt;
}
a=instance_create(p1x+slopex,p1y+slopey,apple);
a.direction=point_direction(argument0,argument1,a.x,a.y);
a.speed=point_distance(argument0,argument1,a.x,a.y)/point_distance(p1x,p1y,argument0,argument1)*argument7;
if argument8=1{
a.x=argument0;
a.y=argument1;
}
}
}
}
If that's not convincing enough, I think some photographs will change your mind right away.
(click to show/hide)
All of the arguments you can use to control the star are listed inside of the script. If you have the ability to understand the code to its full potential, however, you're free to make special modifications to spice up the star just that much more.
I hope you like it!
also if you experience problems tell me immediately because that would be super problematic lmao
StuzMeiko839:
This beautiful and very well done.
Congrats!, good job <3 :atkHappy:
Kanaris:
aaaaaaaaaaaaaaaaaaa thanks watson
AlextheTroller:
Looks amazing, thank you for making my life easier figuring out how to make cool shapes :atkHappy:
I will make sure to credit you in case I use it. ^^
Navigation
[0] Message Index
Go to full version