Practical GameMaker Projects by Ben Tyers

Practical GameMaker Projects by Ben Tyers

Author:Ben Tyers
Language: eng
Format: epub, pdf
Publisher: Apress, Berkeley, CA


//previous throws

var size=ds_list_size(global.last);

for (var i = 0; i < size; i += 1)

{

draw_text(950,60+(20*i),global.last[|i]);

}

draw_text(830,20,"Running Total");

draw_text(950,20,"Throws");

///draw_hints

draw_text(room_width/2,720,text);

Add a Global Left Pressed Mouse Event that creates an instance of obj_throw:

/// @description Create a throw

if !instance_exists(obj_throw) && !instance_exists(obj_dart_path);

{

instance_create_layer(x,y,"Dart",obj_throw);

}

That is all for this object. Place one instance of this object on the room’s Score layer.

Next is obj_center . Assign it spr_center. Add a Create Event that sets the starting values:

/// @description set up

angle=0;

throw=0;

segment=0;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.