ludum-dare-21/scripts/action_create_object/action_create_object.gml

21 lines
568 B
Plaintext
Raw Normal View History

2021-06-16 23:23:00 -07:00
/// @description (Old DnD) - creates an instance of an object at a position
/// @param objInd object to create
/// @param xPos X position to create at
/// @param yPos Y position to create at
function action_create_object(argument0, argument1, argument2) {
if (!object_exists(argument0)) {
show_message( "creating instance for non-existent object" + string(id) );
return 0;
}
if (global.__argument_relative)
{
instance_create( x+argument1, y+argument2, argument0);
} else {
instance_create( argument1, argument2, argument0);
}
}