|
Post by Supercarson7 on Aug 16, 2008 1:22:37 GMT -5
Hey, for lots of you new game makers or just people who dont know script or maybe you know alot and you want to share here is the place to be, you can send in script you found to make things easier for other or maybe you can ask for some you dont know but here is the place to start
|
|
|
Post by Supercarson7 on Aug 16, 2008 1:26:34 GMT -5
Here is some script im whiling to share. Look at mouse... image_angle= point_direction(x,y,mouse_x,mouse_y) to make it face a object change mouse_ to object.
face direction moving... image_angle= direction
here is some cool script im using in my game for the comp1, its for my fish, so they move towards you but if you get to close they run away, the further away you are from them the faster they go but they only chase you if your within distance...
if distance_to_object(player)<300 { if distance_to_point(player.x,player.y)<30 { if distance_to_point(player.x,player.y)>0 { motion_set(image_angle,-25/distance_to_object(player)) } else motion_set(image_angle,0) } else move_towards_point(player.x,player.y,distance_to_point(player.x,player.y)/25) } image_angle=direction
place this in step
The first 2 credit is not needed but the 3rd give credit, it took me a long time
|
|
|
Post by drizzt7 on Aug 16, 2008 8:49:37 GMT -5
That last one is really cool! I made a script for my fish in my game that makes it so that they only move a certain amount, like the flap their fins and move, then slow to a stop.
Create: Step: Draw:
|
|
|
Post by Supercarson7 on Aug 16, 2008 10:05:40 GMT -5
il go try it out, so you realley think the last one was cool, its my fish ai script
|
|
|
Post by Supercarson7 on Aug 16, 2008 10:11:46 GMT -5
ui tried and a error message apeared, it said it doesent know what col is
|
|
|
Post by drizzt7 on Aug 16, 2008 13:04:35 GMT -5
Yeah, define col in the create event
col=get_color(c_white);
|
|
|
Post by Supercarson7 on Aug 16, 2008 13:46:30 GMT -5
i dont think its working, all i do is chose colour, then it moves me in a random direction left or right
|
|
|
Post by drizzt7 on Aug 16, 2008 15:18:30 GMT -5
Yeah, but it should kinda go in spurts, like it will flap then stop animating, and such.
|
|
|
Post by Supercarson7 on Aug 16, 2008 17:38:02 GMT -5
ok, another donation, pause game, btw i didnt invent this script i got of the resources of yyg
{ draw_set_color(c_red);//color draw_set_halign(fa_center);//sets it to the center of the screen draw_text(room_width/2,100,'press any key to un pause.');//displays message screen_refresh();//refresh it keyboard_wait();//press any keyboard thing to unpause// you can also use mouse_wait() for the mouse instead io_clear();//clears io. }
|
|
|
Post by drizzt7 on Aug 16, 2008 17:56:22 GMT -5
That's useful. I always use one that deactivates all instances, and sets the background to a screenshot.
|
|
|
Post by Supercarson7 on Aug 16, 2008 21:30:03 GMT -5
k
|
|
|
Post by M₳iϾiousMan₲a on Aug 17, 2008 12:47:57 GMT -5
these all sound great but im not much of a scripter myself i might submit one though
|
|
|
Post by Supercarson7 on Aug 17, 2008 14:28:29 GMT -5
if you need script you can ask to
|
|
|
Post by drizzt7 on Aug 17, 2008 18:26:43 GMT -5
Soon I will post a script for pixel-perfect destructible terrain.
|
|
|
Post by Supercarson7 on Aug 17, 2008 18:57:22 GMT -5
cool
|
|