Legacy GM Help, coding!

P

prithvidiamond

Guest
hello every one,
I had a small doubt of how to declare a certain amount of code as 1 statement instead of copying and pasting the entire 700 line code again and again.

an answer to this will be highly appreciated.

prithvidiamond
 
P

prithvidiamond

Guest
It is in a draw event, so can I put it in a script?
 
J

Jordan Robinson

Guest
Yes, you would put the code into the script, and then call the script from the draw event.
 
P

prithvidiamond

Guest
there is a problem in this code when I put the repeated code in the script:

globalvar points;

points = 0;

if (mouse_check_button_pressed(vk_left) and fruit = fruitguess)
{
points += 1;
repeat(scr_draw_obj1);
repeat(scr_draw_obj2);

}

please tell where I have gone wrong,

prithvidiamond
 
Top