diff --git a/ModelCreator/ModelCreator.yyp b/ModelCreator/ModelCreator.yyp index a93d4f0..4e7fea0 100644 --- a/ModelCreator/ModelCreator.yyp +++ b/ModelCreator/ModelCreator.yyp @@ -1,15 +1,66 @@ { "resources": [ + {"id":{"name":"c_object_create","path":"scripts/c_object_create/c_object_create.yy",},"order":1,}, + {"id":{"name":"c_overlap_world","path":"scripts/c_overlap_world/c_overlap_world.yy",},"order":2,}, + {"id":{"name":"c_object_destroy","path":"scripts/c_object_destroy/c_object_destroy.yy",},"order":2,}, + {"id":{"name":"c_hit_z","path":"scripts/c_hit_z/c_hit_z.yy",},"order":7,}, + {"id":{"name":"c_transform_rotation_axis","path":"scripts/c_transform_rotation_axis/c_transform_rotation_axis.yy",},"order":4,}, + {"id":{"name":"c_object_set_mask","path":"scripts/c_object_set_mask/c_object_set_mask.yy",},"order":5,}, + {"id":{"name":"c_world_destroy","path":"scripts/c_world_destroy/c_world_destroy.yy",},"order":2,}, + {"id":{"name":"c_shape_load_trimesh","path":"scripts/c_shape_load_trimesh/c_shape_load_trimesh.yy",},"order":12,}, + {"id":{"name":"c_shape_add_sphere","path":"scripts/c_shape_add_sphere/c_shape_add_sphere.yy",},"order":5,}, + {"id":{"name":"c_hit_ny","path":"scripts/c_hit_ny/c_hit_ny.yy",},"order":2,}, + {"id":{"name":"c_transform_scaling","path":"scripts/c_transform_scaling/c_transform_scaling.yy",},"order":6,}, + {"id":{"name":"c_raycast_object","path":"scripts/c_raycast_object/c_raycast_object.yy",},"order":3,}, {"id":{"name":"o_softwareManager","path":"objects/o_softwareManager/o_softwareManager.yy",},"order":1,}, + {"id":{"name":"c_init","path":"scripts/c_init/c_init.yy",},"order":7,}, {"id":{"name":"load_obj","path":"scripts/load_obj/load_obj.yy",},"order":1,}, + {"id":{"name":"c_shape_exists","path":"scripts/c_shape_exists/c_shape_exists.yy",},"order":11,}, + {"id":{"name":"c_hit_object","path":"scripts/c_hit_object/c_hit_object.yy",},"order":4,}, + {"id":{"name":"c_overlap_object","path":"scripts/c_overlap_object/c_overlap_object.yy",},"order":0,}, {"id":{"name":"shd_lighting","path":"shaders/shd_lighting/shd_lighting.yy",},"order":0,}, + {"id":{"name":"c_object_set_shape","path":"scripts/c_object_set_shape/c_object_set_shape.yy",},"order":6,}, + {"id":{"name":"c_world_create","path":"scripts/c_world_create/c_world_create.yy",},"order":1,}, + {"id":{"name":"c_shape_begin_trimesh","path":"scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.yy",},"order":7,}, + {"id":{"name":"c_object_set_userid","path":"scripts/c_object_set_userid/c_object_set_userid.yy",},"order":7,}, + {"id":{"name":"c_transform_position","path":"scripts/c_transform_position/c_transform_position.yy",},"order":2,}, + {"id":{"name":"c_world_remove_object","path":"scripts/c_world_remove_object/c_world_remove_object.yy",},"order":6,}, + {"id":{"name":"c_transform_matrix","path":"scripts/c_transform_matrix/c_transform_matrix.yy",},"order":1,}, + {"id":{"name":"c_world_exists","path":"scripts/c_world_exists/c_world_exists.yy",},"order":4,}, + {"id":{"name":"c_world_get_count","path":"scripts/c_world_get_count/c_world_get_count.yy",},"order":5,}, + {"id":{"name":"c_world_add_object","path":"scripts/c_world_add_object/c_world_add_object.yy",},"order":0,}, {"id":{"name":"vertex_create_cube","path":"scripts/vertex_create_cube/vertex_create_cube.yy",},"order":3,}, + {"id":{"name":"c_shape_end_trimesh","path":"scripts/c_shape_end_trimesh/c_shape_end_trimesh.yy",},"order":10,}, + {"id":{"name":"c_raycast_world","path":"scripts/c_raycast_world/c_raycast_world.yy",},"order":4,}, + {"id":{"name":"c_shape_add_plane","path":"scripts/c_shape_add_plane/c_shape_add_plane.yy",},"order":4,}, + {"id":{"name":"c_object_apply_transform","path":"scripts/c_object_apply_transform/c_object_apply_transform.yy",},"order":0,}, + {"id":{"name":"c_shape_add_box","path":"scripts/c_shape_add_box/c_shape_add_box.yy",},"order":0,}, + {"id":{"name":"c_hit_y","path":"scripts/c_hit_y/c_hit_y.yy",},"order":6,}, + {"id":{"name":"c_shape_add_cylinder","path":"scripts/c_shape_add_cylinder/c_shape_add_cylinder.yy",},"order":3,}, {"id":{"name":"load_d3d","path":"scripts/load_d3d/load_d3d.yy",},"order":2,}, + {"id":{"name":"c_shape_add_cone","path":"scripts/c_shape_add_cone/c_shape_add_cone.yy",},"order":2,}, + {"id":{"name":"c_shape_create","path":"scripts/c_shape_create/c_shape_create.yy",},"order":8,}, + {"id":{"name":"c_hit_fraction","path":"scripts/c_hit_fraction/c_hit_fraction.yy",},"order":0,}, + {"id":{"name":"c_overlap_position","path":"scripts/c_overlap_position/c_overlap_position.yy",},"order":1,}, + {"id":{"name":"c_hit_x","path":"scripts/c_hit_x/c_hit_x.yy",},"order":5,}, {"id":{"name":"o_camera","path":"objects/o_camera/o_camera.yy",},"order":0,}, {"id":{"name":"vertex_add_point","path":"scripts/vertex_add_point/vertex_add_point.yy",},"order":0,}, + {"id":{"name":"c_shape_add_triangle","path":"scripts/c_shape_add_triangle/c_shape_add_triangle.yy",},"order":6,}, + {"id":{"name":"c_hit_nz","path":"scripts/c_hit_nz/c_hit_nz.yy",},"order":3,}, + {"id":{"name":"c_sweep_world","path":"scripts/c_sweep_world/c_sweep_world.yy",},"order":5,}, {"id":{"name":"o_element","path":"objects/o_element/o_element.yy",},"order":2,}, + {"id":{"name":"c_transform_identity","path":"scripts/c_transform_identity/c_transform_identity.yy",},"order":0,}, + {"id":{"name":"c_shape_add_capsule","path":"scripts/c_shape_add_capsule/c_shape_add_capsule.yy",},"order":1,}, + {"id":{"name":"c_world_destroy_object","path":"scripts/c_world_destroy_object/c_world_destroy_object.yy",},"order":3,}, {"id":{"name":"s_grid","path":"sprites/s_grid/s_grid.yy",},"order":0,}, + {"id":{"name":"c_transform_rotation","path":"scripts/c_transform_rotation/c_transform_rotation.yy",},"order":3,}, {"id":{"name":"o_userControl","path":"objects/o_userControl/o_userControl.yy",},"order":3,}, + {"id":{"name":"c_transform_rotation_quaternion","path":"scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.yy",},"order":5,}, + {"id":{"name":"o_vertex_point","path":"objects/o_vertex_point/o_vertex_point.yy",},"order":4,}, + {"id":{"name":"c_shape_destroy","path":"scripts/c_shape_destroy/c_shape_destroy.yy",},"order":9,}, + {"id":{"name":"c_object_exists","path":"scripts/c_object_exists/c_object_exists.yy",},"order":3,}, + {"id":{"name":"c_hit_nx","path":"scripts/c_hit_nx/c_hit_nx.yy",},"order":1,}, + {"id":{"name":"c_object_get_userid","path":"scripts/c_object_get_userid/c_object_get_userid.yy",},"order":4,}, {"id":{"name":"Room1","path":"rooms/Room1/Room1.yy",},"order":0,}, ], "Options": [ @@ -43,6 +94,13 @@ {"folderPath":"folders/Animation Curves.yy","order":12,"resourceVersion":"1.0","name":"Animation Curves","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Notes.yy","order":13,"resourceVersion":"1.0","name":"Notes","tags":[],"resourceType":"GMFolder",}, {"folderPath":"folders/Extensions.yy","order":14,"resourceVersion":"1.0","name":"Extensions","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision.yy","order":4,"resourceVersion":"1.0","name":"Venomous Bullet Collision","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/Collision Detection.yy","order":1,"resourceVersion":"1.0","name":"Collision Detection","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/Hit Data.yy","order":2,"resourceVersion":"1.0","name":"Hit Data","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/Object.yy","order":3,"resourceVersion":"1.0","name":"Object","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/Shape.yy","order":4,"resourceVersion":"1.0","name":"Shape","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/Transform.yy","order":5,"resourceVersion":"1.0","name":"Transform","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts/Venomous Bullet Collision/World.yy","order":6,"resourceVersion":"1.0","name":"World","tags":[],"resourceType":"GMFolder",}, ], "AudioGroups": [ {"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",}, @@ -50,7 +108,10 @@ "TextureGroups": [ {"isScaled":true,"autocrop":true,"border":2,"mipsToGenerate":0,"groupParent":null,"targets":-1,"resourceVersion":"1.3","name":"Default","resourceType":"GMTextureGroup",}, ], - "IncludedFiles": [], + "IncludedFiles": [ + {"CopyToMask":9223372036854775807,"filePath":"datafiles","resourceVersion":"1.0","name":"Collisions.dll","resourceType":"GMIncludedFile",}, + {"CopyToMask":-1,"filePath":"datafiles","resourceVersion":"1.0","name":"Collisions.dll","resourceType":"GMIncludedFile",}, + ], "MetaData": { "IDEVersion": "2.3.1.542", }, diff --git a/ModelCreator/datafiles/Collisions.dll b/ModelCreator/datafiles/Collisions.dll new file mode 100644 index 0000000..9e2ed18 Binary files /dev/null and b/ModelCreator/datafiles/Collisions.dll differ diff --git a/ModelCreator/objects/o_element/CleanUp_0.gml b/ModelCreator/objects/o_element/CleanUp_0.gml new file mode 100644 index 0000000..de1b5a6 --- /dev/null +++ b/ModelCreator/objects/o_element/CleanUp_0.gml @@ -0,0 +1 @@ +if (vlist != -1) then ds_list_destroy(vlist); \ No newline at end of file diff --git a/ModelCreator/objects/o_element/Create_0.gml b/ModelCreator/objects/o_element/Create_0.gml index 1acf07c..723aba7 100644 --- a/ModelCreator/objects/o_element/Create_0.gml +++ b/ModelCreator/objects/o_element/Create_0.gml @@ -5,6 +5,8 @@ z = 0; model = -1; texture = -1; +vlist = -1; + // Transform options xsize = 1; ysize = 1; diff --git a/ModelCreator/objects/o_element/Destroy_0.gml b/ModelCreator/objects/o_element/Destroy_0.gml new file mode 100644 index 0000000..de1b5a6 --- /dev/null +++ b/ModelCreator/objects/o_element/Destroy_0.gml @@ -0,0 +1 @@ +if (vlist != -1) then ds_list_destroy(vlist); \ No newline at end of file diff --git a/ModelCreator/objects/o_element/o_element.yy b/ModelCreator/objects/o_element/o_element.yy index 171a230..86547aa 100644 --- a/ModelCreator/objects/o_element/o_element.yy +++ b/ModelCreator/objects/o_element/o_element.yy @@ -20,6 +20,8 @@ "eventList": [ {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"o_element","path":"objects/o_element/o_element.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"parent":{"name":"o_element","path":"objects/o_element/o_element.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":12,"collisionObjectId":null,"parent":{"name":"o_element","path":"objects/o_element/o_element.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":1,"collisionObjectId":null,"parent":{"name":"o_element","path":"objects/o_element/o_element.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, ], "properties": [], "overriddenProperties": [], diff --git a/ModelCreator/objects/o_softwareManager/Create_0.gml b/ModelCreator/objects/o_softwareManager/Create_0.gml index 374cc64..19a82e2 100644 --- a/ModelCreator/objects/o_softwareManager/Create_0.gml +++ b/ModelCreator/objects/o_softwareManager/Create_0.gml @@ -18,13 +18,13 @@ for (var i = 0; i < room_width; i += size) { for (var j = 0; j < room_height; j += size) { var color = c_white; - vertex_add_point(vbuffer, i, j, zz, 0, 0, 1, 0, 0, color, 1); - vertex_add_point(vbuffer, i+size, j, zz, 0, 0, 1, 1, 0, color, 1); - vertex_add_point(vbuffer, i+size, j+size, zz, 0, 0, 1, 1, 1, color, 1); + vertex_add_point(vbuffer, -1, i, j, zz, 0, 0, 1, 0, 0, color, 1); + vertex_add_point(vbuffer, -1, i+size, j, zz, 0, 0, 1, 1, 0, color, 1); + vertex_add_point(vbuffer, -1, i+size, j+size, zz, 0, 0, 1, 1, 1, color, 1); - vertex_add_point(vbuffer, i+size, j+size, zz, 0, 0, 1, 1, 1, color, 1); - vertex_add_point(vbuffer, i, j+size, zz, 0, 0, 1, 0, 1, color, 1); - vertex_add_point(vbuffer, i, j, zz, 0, 0, 1, 0, 0, color, 1); + vertex_add_point(vbuffer, -1, i+size, j+size, zz, 0, 0, 1, 1, 1, color, 1); + vertex_add_point(vbuffer, -1, i, j+size, zz, 0, 0, 1, 0, 1, color, 1); + vertex_add_point(vbuffer, -1, i, j, zz, 0, 0, 1, 0, 0, color, 1); } } @@ -36,6 +36,46 @@ instance_create_depth(xppos, yppos, 0, o_camera); instance_create_depth(xppos, yppos, 0, o_userControl); var cube_size = 96; -var el_obj = instance_create_depth(xppos - cube_size/2, yppos - cube_size/2, 0, o_element); -el_obj.model = vertex_create_cube(0, 0, 0, cube_size, c_gray, 1); -el_obj.z = 25; \ No newline at end of file +var cube_x = xppos - cube_size/2, cube_y = yppos - cube_size/2, cube_z = 25; +var el_obj = instance_create_depth(cube_x, cube_y, 0, o_element); +el_obj.vlist = ds_list_create(); +el_obj.model = vertex_create_cube(el_obj.vlist, 0, 0, 0, cube_size, c_gray, 1); +el_obj.z = cube_z; + +if (el_obj.vlist != -1) { + var vlen = ds_list_size(el_obj.vlist), vcube_size = 10, v_pos_list = ds_list_create(); + for (var i = 0; i < vlen; i++) { + var xx = el_obj.x + ds_list_find_value(el_obj.vlist, i)[0] - vcube_size/2; + var yy = el_obj.y + ds_list_find_value(el_obj.vlist, i)[1] - vcube_size/2; + var zz = el_obj.z + ds_list_find_value(el_obj.vlist, i)[2] - vcube_size/2; + + var v_pos_len = ds_list_size(v_pos_list)-1; + + // Check if our list has entries + var same_vertex_pos = 0; if (v_pos_len > -1) { + var j = 0; while (j <= v_pos_len) { + // Check if the row exists (has a valid value) + if (ds_list_find_value(v_pos_list, j) != undefined && ds_list_find_value(v_pos_list, j) != -1) { + var v_value = ds_list_find_value(v_pos_list, j); + + // Check if it's exactly the same position + if (xx == v_value[0] && yy == v_value[1] && zz == v_value[2]) then same_vertex_pos++; + + j++; + } + } + } + + // Check if there are no vertecies with the same position + if (same_vertex_pos <= 0) { + var vpoint_obj = instance_create_depth(xx, yy, 0, o_vertex_point); + vpoint_obj.z = zz; + vpoint_obj.model = vertex_create_cube(-1, 0, 0, 0, vcube_size, c_orange, 1); + + // Add the new vertex position to the list + ds_list_add(v_pos_list, [xx, yy, zz]); + } + } + // Destroy the temporary list + ds_list_destroy(v_pos_list); +} \ No newline at end of file diff --git a/ModelCreator/objects/o_userControl/Create_0.gml b/ModelCreator/objects/o_userControl/Create_0.gml index 2b7c6f7..04a2c55 100644 --- a/ModelCreator/objects/o_userControl/Create_0.gml +++ b/ModelCreator/objects/o_userControl/Create_0.gml @@ -1,8 +1,5 @@ event_inherited(); -// Z axis -z = 0; - // Rotation look_dir = 0; look_pitch = 0; diff --git a/ModelCreator/objects/o_userControl/Step_0.gml b/ModelCreator/objects/o_userControl/Step_0.gml index da51e97..cde064d 100644 --- a/ModelCreator/objects/o_userControl/Step_0.gml +++ b/ModelCreator/objects/o_userControl/Step_0.gml @@ -8,15 +8,28 @@ window_mouse_set(window_get_width() / 2, window_get_height() / 2); if (keyboard_check_direct(vk_escape)) then game_end(); // Emergency exit // Movement +var dx = 0, dy = 0, len = 0; + var w_s_move = sign(keyboard_check(ord("W")) - keyboard_check(ord("S"))); if (w_s_move != 0) { - x += w_s_move * dcos(look_dir) * move_speed; - y += -(w_s_move * dsin(look_dir)) * move_speed; + dx += w_s_move * dcos(look_dir) * move_speed; + dy += -(w_s_move * dsin(look_dir)) * move_speed; z += -(w_s_move * dsin(look_pitch)) * move_speed; } var a_d_move = sign(keyboard_check(ord("D")) - keyboard_check(ord("A"))); if (a_d_move != 0) { - x -= a_d_move * dsin(look_dir) * move_speed; - y -= a_d_move * dcos(look_dir) * move_speed; -} \ No newline at end of file + dx -= a_d_move * dsin(look_dir) * move_speed; + dy -= a_d_move * dcos(look_dir) * move_speed; +} + +if (a_d_move != 0 || w_s_move != 0) then len = move_speed; + +// Fix diagonal movement (speed fix) +var dir = point_direction(0, 0, dx, dy); +var len_x = 0, len_y = 0; +len_x = lengthdir_x(len, dir); +len_y = lengthdir_y(len, dir); + +x += len_x; +y += len_y; \ No newline at end of file diff --git a/ModelCreator/objects/o_vertex_point/o_vertex_point.yy b/ModelCreator/objects/o_vertex_point/o_vertex_point.yy new file mode 100644 index 0000000..c0078be --- /dev/null +++ b/ModelCreator/objects/o_vertex_point/o_vertex_point.yy @@ -0,0 +1,34 @@ +{ + "spriteId": null, + "solid": false, + "visible": false, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": { + "name": "o_element", + "path": "objects/o_element/o_element.yy", + }, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 1, + "physicsGroup": 1, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Objects", + "path": "folders/Objects.yy", + }, + "resourceVersion": "1.0", + "name": "o_vertex_point", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.gml b/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.gml new file mode 100644 index 0000000..111707b --- /dev/null +++ b/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_fraction() { + /* + Returns a number between 0 and 1, which is the distance to the hit. + */ + return external_call(global._c_hit_fraction); + + +} diff --git a/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.yy b/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.yy new file mode 100644 index 0000000..b4dfaf5 --- /dev/null +++ b/ModelCreator/scripts/c_hit_fraction/c_hit_fraction.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_fraction", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_nx/c_hit_nx.gml b/ModelCreator/scripts/c_hit_nx/c_hit_nx.gml new file mode 100644 index 0000000..b9e6358 --- /dev/null +++ b/ModelCreator/scripts/c_hit_nx/c_hit_nx.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_nx() { + /* + Returns the x component of the normal of the last hit. + */ + return external_call(global._c_hit_nx); + + +} diff --git a/ModelCreator/scripts/c_hit_nx/c_hit_nx.yy b/ModelCreator/scripts/c_hit_nx/c_hit_nx.yy new file mode 100644 index 0000000..54cfffb --- /dev/null +++ b/ModelCreator/scripts/c_hit_nx/c_hit_nx.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_nx", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_ny/c_hit_ny.gml b/ModelCreator/scripts/c_hit_ny/c_hit_ny.gml new file mode 100644 index 0000000..5e58b9d --- /dev/null +++ b/ModelCreator/scripts/c_hit_ny/c_hit_ny.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_ny() { + /* + Returns the y component of the normal of the last hit. + */ + return external_call(global._c_hit_ny); + + +} diff --git a/ModelCreator/scripts/c_hit_ny/c_hit_ny.yy b/ModelCreator/scripts/c_hit_ny/c_hit_ny.yy new file mode 100644 index 0000000..98217fa --- /dev/null +++ b/ModelCreator/scripts/c_hit_ny/c_hit_ny.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_ny", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_nz/c_hit_nz.gml b/ModelCreator/scripts/c_hit_nz/c_hit_nz.gml new file mode 100644 index 0000000..3e47aff --- /dev/null +++ b/ModelCreator/scripts/c_hit_nz/c_hit_nz.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_nz() { + /* + Returns the z component of the normal of the last hit. + */ + return external_call(global._c_hit_nz); + + +} diff --git a/ModelCreator/scripts/c_hit_nz/c_hit_nz.yy b/ModelCreator/scripts/c_hit_nz/c_hit_nz.yy new file mode 100644 index 0000000..6a872be --- /dev/null +++ b/ModelCreator/scripts/c_hit_nz/c_hit_nz.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_nz", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_object/c_hit_object.gml b/ModelCreator/scripts/c_hit_object/c_hit_object.gml new file mode 100644 index 0000000..01ff88f --- /dev/null +++ b/ModelCreator/scripts/c_hit_object/c_hit_object.gml @@ -0,0 +1,13 @@ +/// @param n +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_object(argument0) { + /* + Returns the id's of the collision objects that were hit. + For raycasts and sweeps, only one object can be hit so use 0 as the argument. + Overlap tests can hit multiple objects to use argument0 to access each one. + c_overlap_world() and c_overlap_world_position() return the number of objects that were hit. + */ + return external_call(global._c_hit_object, argument0); + + +} diff --git a/ModelCreator/scripts/c_hit_object/c_hit_object.yy b/ModelCreator/scripts/c_hit_object/c_hit_object.yy new file mode 100644 index 0000000..eb5155a --- /dev/null +++ b/ModelCreator/scripts/c_hit_object/c_hit_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_x/c_hit_x.gml b/ModelCreator/scripts/c_hit_x/c_hit_x.gml new file mode 100644 index 0000000..f7ace1f --- /dev/null +++ b/ModelCreator/scripts/c_hit_x/c_hit_x.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_x() { + /* + Returns the x position of the last hit. + */ + return external_call(global._c_hit_x); + + +} diff --git a/ModelCreator/scripts/c_hit_x/c_hit_x.yy b/ModelCreator/scripts/c_hit_x/c_hit_x.yy new file mode 100644 index 0000000..f050cee --- /dev/null +++ b/ModelCreator/scripts/c_hit_x/c_hit_x.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_x", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_y/c_hit_y.gml b/ModelCreator/scripts/c_hit_y/c_hit_y.gml new file mode 100644 index 0000000..3c53253 --- /dev/null +++ b/ModelCreator/scripts/c_hit_y/c_hit_y.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_y() { + /* + Returns the y position of the last hit. + */ + return external_call(global._c_hit_y); + + +} diff --git a/ModelCreator/scripts/c_hit_y/c_hit_y.yy b/ModelCreator/scripts/c_hit_y/c_hit_y.yy new file mode 100644 index 0000000..c125cad --- /dev/null +++ b/ModelCreator/scripts/c_hit_y/c_hit_y.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_y", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_hit_z/c_hit_z.gml b/ModelCreator/scripts/c_hit_z/c_hit_z.gml new file mode 100644 index 0000000..c2e5d81 --- /dev/null +++ b/ModelCreator/scripts/c_hit_z/c_hit_z.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_hit_z() { + /* + Returns the z position of the last hit. + */ + return external_call(global._c_hit_z); + + +} diff --git a/ModelCreator/scripts/c_hit_z/c_hit_z.yy b/ModelCreator/scripts/c_hit_z/c_hit_z.yy new file mode 100644 index 0000000..8732f0c --- /dev/null +++ b/ModelCreator/scripts/c_hit_z/c_hit_z.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Hit Data", + "path": "folders/Scripts/Venomous Bullet Collision/Hit Data.yy", + }, + "resourceVersion": "1.0", + "name": "c_hit_z", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_init/c_init.gml b/ModelCreator/scripts/c_init/c_init.gml new file mode 100644 index 0000000..eb3cc53 --- /dev/null +++ b/ModelCreator/scripts/c_init/c_init.gml @@ -0,0 +1,63 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_init() { + /* + Call this script once to initialize the collision system before using any of the other scripts. Game start is a good place to do this. + + This is a wrapper of the Bullet 3D collision system for GameMaker. + The original work was done by a user called Venomous on the old GameMaker forums; + the version you're seeing now was cleaned up by DragoniteSpam. + */ + + var dll = "collisions.dll"; + var calltype = dll_cdecl; + global._c_world_create = external_define(dll, "c_world_create", calltype, ty_real, 0); + global._c_world_destroy = external_define(dll, "c_world_destroy", calltype, ty_real, 0); + global._c_world_exists = external_define(dll, "c_world_exists", calltype, ty_real, 0); + global._c_world_add_object = external_define(dll, "c_world_add_object", calltype, ty_real, 1, ty_real); + global._c_world_remove_object = external_define(dll, "c_world_remove_object", calltype, ty_real, 1, ty_real); + global._c_world_get_count = external_define(dll, "c_world_get_count", calltype, ty_real, 0); + global._c_object_create = external_define(dll, "c_object_create", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_object_destroy = external_define(dll, "c_object_destroy", calltype, ty_real, 1, ty_real); + global._c_object_exists = external_define(dll, "c_object_exists", calltype, ty_real, 1, ty_real); + global._c_object_apply_transform = external_define(dll, "c_object_apply_transform", calltype, ty_real, 1, ty_real); + global._c_object_set_shape = external_define(dll, "c_object_set_shape", calltype, ty_real, 2, ty_real, ty_real); + global._c_object_set_mask = external_define(dll, "c_object_set_mask", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_object_set_userid = external_define(dll, "c_object_set_userid", calltype, ty_real, 2, ty_real, ty_real); + global._c_object_get_userid = external_define(dll, "c_object_get_userid", calltype, ty_real, 1, ty_real); + global._c_shape_create = external_define(dll, "c_shape_create", calltype, ty_real, 0); + global._c_shape_destroy = external_define(dll, "c_shape_destroy", calltype, ty_real, 1, ty_real); + global._c_shape_exists = external_define(dll, "c_shape_exists", calltype, ty_real, 1, ty_real); + global._c_shape_add_box = external_define(dll, "c_shape_add_box", calltype, ty_real, 4, ty_real, ty_real, ty_real, ty_real); + global._c_shape_add_sphere = external_define(dll, "c_shape_add_sphere", calltype, ty_real, 2, ty_real, ty_real); + global._c_shape_add_capsule = external_define(dll, "c_shape_add_capsule", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_shape_add_cylinder = external_define(dll, "c_shape_add_cylinder", calltype, ty_real, 4, ty_real, ty_real, ty_real, ty_real); + global._c_shape_add_cone = external_define(dll, "c_shape_add_cone", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_shape_add_plane = external_define(dll, "c_shape_add_plane", calltype, ty_real, 5, ty_real, ty_real, ty_real, ty_real, ty_real); + global._c_shape_begin_trimesh = external_define(dll, "c_shape_begin_trimesh", calltype, ty_real, 0); + global._c_shape_add_triangle = external_define(dll, "c_shape_add_triangle", calltype, ty_real, 9, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real); + global._c_shape_load_trimesh = external_define(dll, "c_shape_load_trimesh", calltype, ty_real, 1, ty_string); + global._c_shape_end_trimesh = external_define(dll, "c_shape_end_trimesh", calltype, ty_real, 1, ty_real); + global._c_hit_x = external_define(dll, "c_hit_x", calltype, ty_real, 0); + global._c_hit_y = external_define(dll, "c_hit_y", calltype, ty_real, 0); + global._c_hit_z = external_define(dll, "c_hit_z", calltype, ty_real, 0); + global._c_hit_nx = external_define(dll, "c_hit_nx", calltype, ty_real, 0); + global._c_hit_ny = external_define(dll, "c_hit_ny", calltype, ty_real, 0); + global._c_hit_nz = external_define(dll, "c_hit_nz", calltype, ty_real, 0); + global._c_hit_fraction = external_define(dll, "c_hit_fraction", calltype, ty_real, 0); + global._c_hit_object = external_define(dll, "c_hit_object", calltype, ty_real, 1, ty_real); + global._c_transform_position = external_define(dll, "c_transform_position", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_transform_rotation = external_define(dll, "c_transform_rotation", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_transform_rotation_quaternion = external_define(dll, "c_transform_rotation_quaternion", calltype, ty_real, 4, ty_real, ty_real, ty_real, ty_real); + global._c_transform_rotation_axis = external_define(dll, "c_transform_rotation_axis", calltype, ty_real, 4, ty_real, ty_real, ty_real, ty_real); + global._c_transform_scaling = external_define(dll, "c_transform_scaling", calltype, ty_real, 3, ty_real, ty_real, ty_real); + global._c_transform_identity = external_define(dll, "c_transform_identity", calltype, ty_real, 0); + global._c_transform_matrix = external_define(dll, "c_transform_matrix", calltype, ty_real, 9, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real); + global._c_raycast_world = external_define(dll, "c_raycast_world", calltype, ty_real, 7, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real); + global._c_raycast_object = external_define(dll, "c_raycast_object", calltype, ty_real, 7, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real); + global._c_overlap_world = external_define(dll, "c_overlap_world", calltype, ty_real, 1, ty_real); + global._c_overlap_world_position = external_define(dll, "c_overlap_world_position", calltype, ty_real, 4, ty_real, ty_real, ty_real, ty_real); + global._c_overlap_object = external_define(dll, "c_overlap_object", calltype, ty_real, 2, ty_real, ty_real); + global._c_sweep_world = external_define(dll, "c_sweep_world", calltype, ty_real, 8, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real, ty_real); + + +} diff --git a/ModelCreator/scripts/c_init/c_init.yy b/ModelCreator/scripts/c_init/c_init.yy new file mode 100644 index 0000000..c357dd5 --- /dev/null +++ b/ModelCreator/scripts/c_init/c_init.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Venomous Bullet Collision", + "path": "folders/Scripts/Venomous Bullet Collision.yy", + }, + "resourceVersion": "1.0", + "name": "c_init", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.gml b/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.gml new file mode 100644 index 0000000..ef319dc --- /dev/null +++ b/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.gml @@ -0,0 +1,11 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_apply_transform(argument0) { + /* + Sets the transformation of the collision object to the currently defined transform. + Note: Scaling has no effect on collision objects, it only works on shapes. + */ + return external_call(global._c_object_apply_transform, argument0); + + +} diff --git a/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.yy b/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.yy new file mode 100644 index 0000000..88718b5 --- /dev/null +++ b/ModelCreator/scripts/c_object_apply_transform/c_object_apply_transform.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_apply_transform", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_create/c_object_create.gml b/ModelCreator/scripts/c_object_create/c_object_create.gml new file mode 100644 index 0000000..32dd99f --- /dev/null +++ b/ModelCreator/scripts/c_object_create/c_object_create.gml @@ -0,0 +1,18 @@ +/// @param shape +/// @param group +/// @param mask +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_create(argument0, argument1, argument2) { + /* + Creates a collision object from a shape and returns the id. + + The "group" argument is an integer bitfield where each bit represents a group. This is the group that this object is in. + The "mask" argument sets which groups this object can collide with. + A bitwise AND operation is performed with the group of one object and the mask of another whenever there is a collision check. + + For a collision to occur between two objects, both objects' masks must include each other. + */ + return external_call(global._c_object_create, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_object_create/c_object_create.yy b/ModelCreator/scripts/c_object_create/c_object_create.yy new file mode 100644 index 0000000..c00ef15 --- /dev/null +++ b/ModelCreator/scripts/c_object_create/c_object_create.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_create", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_destroy/c_object_destroy.gml b/ModelCreator/scripts/c_object_destroy/c_object_destroy.gml new file mode 100644 index 0000000..c20e87e --- /dev/null +++ b/ModelCreator/scripts/c_object_destroy/c_object_destroy.gml @@ -0,0 +1,11 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_destroy(argument0) { + /* + Destroys the collision object, freeing the memory used. + Do not destroy an object while it is in the world. Remove it first or use c_world_destroy_object() instead. + */ + return external_call(global._c_object_destroy, argument0); + + +} diff --git a/ModelCreator/scripts/c_object_destroy/c_object_destroy.yy b/ModelCreator/scripts/c_object_destroy/c_object_destroy.yy new file mode 100644 index 0000000..d3383ff --- /dev/null +++ b/ModelCreator/scripts/c_object_destroy/c_object_destroy.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_destroy", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_exists/c_object_exists.gml b/ModelCreator/scripts/c_object_exists/c_object_exists.gml new file mode 100644 index 0000000..cb5a216 --- /dev/null +++ b/ModelCreator/scripts/c_object_exists/c_object_exists.gml @@ -0,0 +1,10 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_exists(argument0) { + /* + Returns true if the collision object exists, and false otherwise. + */ + return external_call(global._c_object_exists, argument0); + + +} diff --git a/ModelCreator/scripts/c_object_exists/c_object_exists.yy b/ModelCreator/scripts/c_object_exists/c_object_exists.yy new file mode 100644 index 0000000..6899467 --- /dev/null +++ b/ModelCreator/scripts/c_object_exists/c_object_exists.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_exists", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.gml b/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.gml new file mode 100644 index 0000000..fbd0550 --- /dev/null +++ b/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.gml @@ -0,0 +1,11 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_get_userid(argument0) { + /* + Use this to retrieve the value that you set with c_object_set_userid(). + Returns 0 if no value has been set. + */ + return external_call(global._c_object_get_userid, argument0); + + +} diff --git a/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.yy b/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.yy new file mode 100644 index 0000000..b5f1b77 --- /dev/null +++ b/ModelCreator/scripts/c_object_get_userid/c_object_get_userid.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_get_userid", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.gml b/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.gml new file mode 100644 index 0000000..1b8d6d1 --- /dev/null +++ b/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.gml @@ -0,0 +1,12 @@ +/// @param object +/// @param group +/// @param mask +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_set_mask(argument0, argument1, argument2) { + /* + Sets the collision mask of the object. + */ + return external_call(global._c_object_set_mask, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.yy b/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.yy new file mode 100644 index 0000000..9f193f7 --- /dev/null +++ b/ModelCreator/scripts/c_object_set_mask/c_object_set_mask.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_set_mask", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.gml b/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.gml new file mode 100644 index 0000000..bd41efd --- /dev/null +++ b/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.gml @@ -0,0 +1,11 @@ +/// @param object +/// @param shape +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_set_shape(argument0, argument1) { + /* + Sets the shape of the collision object. + */ + return external_call(global._c_object_set_shape, argument0, argument1); + + +} diff --git a/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.yy b/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.yy new file mode 100644 index 0000000..2468c6d --- /dev/null +++ b/ModelCreator/scripts/c_object_set_shape/c_object_set_shape.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_set_shape", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.gml b/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.gml new file mode 100644 index 0000000..3f83d19 --- /dev/null +++ b/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.gml @@ -0,0 +1,12 @@ +/// @param object +/// @param number +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_object_set_userid(argument0, argument1) { + /* + Associate a collision object with any unsigned integer of your choice. + Useful for linking a GameMaker instance with a collision object. + */ + return external_call(global._c_object_set_userid, argument0, argument1); + + +} diff --git a/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.yy b/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.yy new file mode 100644 index 0000000..6926e7c --- /dev/null +++ b/ModelCreator/scripts/c_object_set_userid/c_object_set_userid.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Object", + "path": "folders/Scripts/Venomous Bullet Collision/Object.yy", + }, + "resourceVersion": "1.0", + "name": "c_object_set_userid", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_overlap_object/c_overlap_object.gml b/ModelCreator/scripts/c_overlap_object/c_overlap_object.gml new file mode 100644 index 0000000..1b62573 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_object/c_overlap_object.gml @@ -0,0 +1,12 @@ +/// @param object1 +/// @param object2 +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_overlap_object(argument0, argument1) { + /* + Checks if two objects overlap each other. The objects do not need to be in the world. + Returns true if there is an overlap, and false if not. + */ + return external_call(global._c_overlap_object, argument0, argument1); + + +} diff --git a/ModelCreator/scripts/c_overlap_object/c_overlap_object.yy b/ModelCreator/scripts/c_overlap_object/c_overlap_object.yy new file mode 100644 index 0000000..f54f139 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_object/c_overlap_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_overlap_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_overlap_position/c_overlap_position.gml b/ModelCreator/scripts/c_overlap_position/c_overlap_position.gml new file mode 100644 index 0000000..fe07aa7 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_position/c_overlap_position.gml @@ -0,0 +1,14 @@ +/// @param object +/// @param x +/// @param y +/// @param z +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_overlap_position(argument0, argument1, argument2, argument3) { + /* + Checks if the object will overlap any other object at the given position. The object does not need to be in the world. + Returns the number of objects that are overlapping this object. Use c_hit_object(n) to get those objects. + */ + return external_call(global._c_overlap_world_position, argument0, argument1, argument2, argument3); + + +} diff --git a/ModelCreator/scripts/c_overlap_position/c_overlap_position.yy b/ModelCreator/scripts/c_overlap_position/c_overlap_position.yy new file mode 100644 index 0000000..5f49092 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_position/c_overlap_position.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_overlap_position", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_overlap_world/c_overlap_world.gml b/ModelCreator/scripts/c_overlap_world/c_overlap_world.gml new file mode 100644 index 0000000..2b10002 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_world/c_overlap_world.gml @@ -0,0 +1,11 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_overlap_world(argument0) { + /* + Checks if the object overlaps any other object in the world. The object does not need to be in the world. + Returns the number of objects that are overlapping this object. Use c_hit_object(n) to get those objects. + */ + return external_call(global._c_overlap_world, argument0); + + +} diff --git a/ModelCreator/scripts/c_overlap_world/c_overlap_world.yy b/ModelCreator/scripts/c_overlap_world/c_overlap_world.yy new file mode 100644 index 0000000..529eba0 --- /dev/null +++ b/ModelCreator/scripts/c_overlap_world/c_overlap_world.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_overlap_world", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_raycast_object/c_raycast_object.gml b/ModelCreator/scripts/c_raycast_object/c_raycast_object.gml new file mode 100644 index 0000000..4f10fda --- /dev/null +++ b/ModelCreator/scripts/c_raycast_object/c_raycast_object.gml @@ -0,0 +1,19 @@ +/// @param object +/// @param xfrom +/// @param yfrom +/// @param zfrom +/// @param xto +/// @param yto +/// @param zto +/// @param mask +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_raycast_object(argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7) { + /* + Casts a ray from (xfrom,yfrom,zfrom) to (xto,yto,zto), against the specified object. + Returns true if the ray hit, and false if it did not. + Use the c_hit_* functions to get more information about the hit. + */ + return external_call(global._c_raycast_object, argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7); + + +} diff --git a/ModelCreator/scripts/c_raycast_object/c_raycast_object.yy b/ModelCreator/scripts/c_raycast_object/c_raycast_object.yy new file mode 100644 index 0000000..b48e7a4 --- /dev/null +++ b/ModelCreator/scripts/c_raycast_object/c_raycast_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_raycast_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_raycast_world/c_raycast_world.gml b/ModelCreator/scripts/c_raycast_world/c_raycast_world.gml new file mode 100644 index 0000000..ad4d848 --- /dev/null +++ b/ModelCreator/scripts/c_raycast_world/c_raycast_world.gml @@ -0,0 +1,18 @@ +/// @param xfrom +/// @param yfrom +/// @param zfrom +/// @param xto +/// @param yto +/// @param zto +/// @param mask +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_raycast_world(argument0, argument1, argument2, argument3, argument4, argument5, argument6) { + /* + Casts a ray from (xfrom,yfrom,zfrom) to (xto,yto,zto), against all collision objects in the world, using a mask. + Returns true if the ray hit something, and false if it did not. + Use the c_hit_* functions to get more information about the hit. + */ + return external_call(global._c_raycast_world, argument0, argument1, argument2, argument3, argument4, argument5, argument6); + + +} diff --git a/ModelCreator/scripts/c_raycast_world/c_raycast_world.yy b/ModelCreator/scripts/c_raycast_world/c_raycast_world.yy new file mode 100644 index 0000000..58145d6 --- /dev/null +++ b/ModelCreator/scripts/c_raycast_world/c_raycast_world.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_raycast_world", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.gml b/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.gml new file mode 100644 index 0000000..3cea69c --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.gml @@ -0,0 +1,14 @@ +/// @param shape +/// @param x_half_size +/// @param y_half_size +/// @param z_half_size +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_box(argument0, argument1, argument2, argument3) { + /* + Adds a box to a shape, centered at (0,0,0). + Note: The shape will be added with the currently defined transformation. + */ + return external_call(global._c_shape_add_box, argument0, argument1, argument2, argument3); + + +} diff --git a/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.yy b/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.yy new file mode 100644 index 0000000..1888b53 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_box/c_shape_add_box.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_box", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.gml b/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.gml new file mode 100644 index 0000000..059f7f4 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.gml @@ -0,0 +1,13 @@ +/// @param shape +/// @param radius +/// @param height +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_capsule(argument0, argument1, argument2) { + /* + Adds a z-up facing capsule to a shape, centered at (0,0,0) + Note: The shape will be added with the currently defined transformation. + */ + return external_call(global._c_shape_add_capsule, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.yy b/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.yy new file mode 100644 index 0000000..9a9b9f3 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_capsule/c_shape_add_capsule.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_capsule", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.gml b/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.gml new file mode 100644 index 0000000..1ebac4f --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.gml @@ -0,0 +1,13 @@ +/// @param shape +/// @param radius +/// @param height +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_cone(argument0, argument1, argument2) { + /* + Adds a z-up facing cone to a shape, centered at (0,0,0) + Note: The shape will be added with the currently defined transformation. + */ + return external_call(global._c_shape_add_cone, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.yy b/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.yy new file mode 100644 index 0000000..ead77b7 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_cone/c_shape_add_cone.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_cone", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.gml b/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.gml new file mode 100644 index 0000000..5585a8a --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.gml @@ -0,0 +1,14 @@ +/// @param shape +/// @param x_half_size +/// @param y_half_size +/// @param z_half_size +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_cylinder(argument0, argument1, argument2, argument3) { + /* + Adds a z-up facing cylinder to a shape, centered at (0,0,0). + Note: The shape will be added with the currently defined transformation. + */ + return external_call(global._c_shape_add_cylinder, argument0, argument1, argument2, argument3); + + +} diff --git a/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.yy b/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.yy new file mode 100644 index 0000000..4abc28e --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_cylinder/c_shape_add_cylinder.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_cylinder", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.gml b/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.gml new file mode 100644 index 0000000..4ad3e46 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.gml @@ -0,0 +1,14 @@ +/// @param shape +/// @param nx +/// @param ny +/// @param nz +/// @param distance +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_plane(argument0, argument1, argument2, argument3, argument4) { + /* + Adds an infinite plane that is solid to infinity on one side. It is defined by a surface normal and the distance to the world origin. + */ + return external_call(global._c_shape_add_plane, argument0, argument1, argument2, argument3, argument4); + + +} diff --git a/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.yy b/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.yy new file mode 100644 index 0000000..8bd2713 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_plane/c_shape_add_plane.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_plane", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.gml b/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.gml new file mode 100644 index 0000000..16db426 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.gml @@ -0,0 +1,13 @@ +/// @param shape +/// @param radius +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_sphere(argument0, argument1) { + /* + Adds a sphere to a shape, centered at (0,0,0) + This shape is very efficient, but it can't have a non-uniform scale. + Note: The shape will be added with the currently defined transformation. + */ + return external_call(global._c_shape_add_sphere, argument0, argument1); + + +} diff --git a/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.yy b/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.yy new file mode 100644 index 0000000..55ea2d9 --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_sphere/c_shape_add_sphere.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_sphere", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.gml b/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.gml new file mode 100644 index 0000000..c02277e --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.gml @@ -0,0 +1,18 @@ +/// @param x1 +/// @param y1 +/// @param z1 +/// @param x2 +/// @param y2 +/// @param z2 +/// @param x3 +/// @param y3 +/// @param z3 +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_add_triangle(argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8) { + /* + Adds a triangle to a trimesh. Make sure you call c_shape_begin_trimesh() before adding triangles. + */ + return external_call(global._c_shape_add_triangle, argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8); + + +} diff --git a/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.yy b/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.yy new file mode 100644 index 0000000..57afa0b --- /dev/null +++ b/ModelCreator/scripts/c_shape_add_triangle/c_shape_add_triangle.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_add_triangle", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.gml b/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.gml new file mode 100644 index 0000000..099fde8 --- /dev/null +++ b/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.gml @@ -0,0 +1,10 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_begin_trimesh() { + /* + Creates a trimesh that you can add triangles to. Call this before adding any triangles. + Note: Trimeshes cannot collide with other trimeshes. Intended use is static level geometry. + */ + return external_call(global._c_shape_begin_trimesh); + + +} diff --git a/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.yy b/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.yy new file mode 100644 index 0000000..ad0a752 --- /dev/null +++ b/ModelCreator/scripts/c_shape_begin_trimesh/c_shape_begin_trimesh.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_begin_trimesh", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_create/c_shape_create.gml b/ModelCreator/scripts/c_shape_create/c_shape_create.gml new file mode 100644 index 0000000..205bb86 --- /dev/null +++ b/ModelCreator/scripts/c_shape_create/c_shape_create.gml @@ -0,0 +1,10 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_create() { + /* + Creates an empty shape and returns the id. + A shape can be used by any number of objects and can contain any number of sub-shapes. + */ + return external_call(global._c_shape_create); + + +} diff --git a/ModelCreator/scripts/c_shape_create/c_shape_create.yy b/ModelCreator/scripts/c_shape_create/c_shape_create.yy new file mode 100644 index 0000000..5dfb801 --- /dev/null +++ b/ModelCreator/scripts/c_shape_create/c_shape_create.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_create", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.gml b/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.gml new file mode 100644 index 0000000..fbe38d1 --- /dev/null +++ b/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.gml @@ -0,0 +1,10 @@ +/// @param shape +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_destroy(argument0) { + /* + Destroys the shape, freeing the memory used. Don't destroy a shape while there are objects using it. + */ + return external_call(global._c_shape_destroy, argument0); + + +} diff --git a/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.yy b/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.yy new file mode 100644 index 0000000..5c49a62 --- /dev/null +++ b/ModelCreator/scripts/c_shape_destroy/c_shape_destroy.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_destroy", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.gml b/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.gml new file mode 100644 index 0000000..415f536 --- /dev/null +++ b/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.gml @@ -0,0 +1,12 @@ +/// @param shape +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_end_trimesh(argument0) { + /* + Call this when done adding triangles to a trimesh. This function adds the trimesh to the shape. + Note: The trimesh will be added with the currently defined transformation. + Note: Trimeshes cannot collide with other trimeshes. Intended use is static level geometry. + */ + return external_call(global._c_shape_end_trimesh, argument0); + + +} diff --git a/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.yy b/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.yy new file mode 100644 index 0000000..65b693f --- /dev/null +++ b/ModelCreator/scripts/c_shape_end_trimesh/c_shape_end_trimesh.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_end_trimesh", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_exists/c_shape_exists.gml b/ModelCreator/scripts/c_shape_exists/c_shape_exists.gml new file mode 100644 index 0000000..82ac73b --- /dev/null +++ b/ModelCreator/scripts/c_shape_exists/c_shape_exists.gml @@ -0,0 +1,10 @@ +/// @param shape +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_exists(argument0) { + /* + Returns true if the shape exists, and false otherwise. + */ + return external_call(global._c_shape_exists, argument0); + + +} diff --git a/ModelCreator/scripts/c_shape_exists/c_shape_exists.yy b/ModelCreator/scripts/c_shape_exists/c_shape_exists.yy new file mode 100644 index 0000000..8b8f238 --- /dev/null +++ b/ModelCreator/scripts/c_shape_exists/c_shape_exists.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_exists", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.gml b/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.gml new file mode 100644 index 0000000..56029f0 --- /dev/null +++ b/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.gml @@ -0,0 +1,13 @@ +/// @param filename +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_shape_load_trimesh(argument0) { + /* + Loads a trimesh from a GameMaker model file. + Only triangle lists are supported. Triangle fans/strips don't load properly and primitive shapes are ignored. + Returns 1 if successful, 0 for undefined trimesh, and -1 for file system error. + */ + + return external_call(global._c_shape_load_trimesh, argument0); + + +} diff --git a/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.yy b/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.yy new file mode 100644 index 0000000..c4acb5b --- /dev/null +++ b/ModelCreator/scripts/c_shape_load_trimesh/c_shape_load_trimesh.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Shape", + "path": "folders/Scripts/Venomous Bullet Collision/Shape.yy", + }, + "resourceVersion": "1.0", + "name": "c_shape_load_trimesh", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_sweep_world/c_sweep_world.gml b/ModelCreator/scripts/c_sweep_world/c_sweep_world.gml new file mode 100644 index 0000000..24fb546 --- /dev/null +++ b/ModelCreator/scripts/c_sweep_world/c_sweep_world.gml @@ -0,0 +1,19 @@ +/// @param shape +/// @param xfrom +/// @param yfrom +/// @param zfrom +/// @param xto +/// @param yto +/// @param zto +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_sweep_world(argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7) { + /* + Performs a convex sweep from (xfrom,yfrom,zfrom) to (xto,yto,zto), against all collision objects in the world, using a mask. + A sweep is like a ray cast except it uses a shape to check for collisions instead of a ray. + Since this is a convex sweep test, the shape should only have 1 sub-shape. If there are multiple sub-shapes the first one is used for the sweep test. + Returns true if there was a hit, and false otherwise. Use the c_hit_* functions to get more information about the hit. + */ + return external_call(global._c_sweep_world, argument0, argument1, argument2, argument3, argument4, argument5, argument6, argument7); + + +} diff --git a/ModelCreator/scripts/c_sweep_world/c_sweep_world.yy b/ModelCreator/scripts/c_sweep_world/c_sweep_world.yy new file mode 100644 index 0000000..cf5a604 --- /dev/null +++ b/ModelCreator/scripts/c_sweep_world/c_sweep_world.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Collision Detection", + "path": "folders/Scripts/Venomous Bullet Collision/Collision Detection.yy", + }, + "resourceVersion": "1.0", + "name": "c_sweep_world", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_identity/c_transform_identity.gml b/ModelCreator/scripts/c_transform_identity/c_transform_identity.gml new file mode 100644 index 0000000..1b44d92 --- /dev/null +++ b/ModelCreator/scripts/c_transform_identity/c_transform_identity.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_identity() { + /* + Resets the transformation to the identity transform. + */ + return external_call(global._c_transform_identity); + + +} diff --git a/ModelCreator/scripts/c_transform_identity/c_transform_identity.yy b/ModelCreator/scripts/c_transform_identity/c_transform_identity.yy new file mode 100644 index 0000000..a2f5900 --- /dev/null +++ b/ModelCreator/scripts/c_transform_identity/c_transform_identity.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_identity", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.gml b/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.gml new file mode 100644 index 0000000..bc1103c --- /dev/null +++ b/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.gml @@ -0,0 +1,12 @@ +/// @param matrix +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_matrix(argument0) { + /* + Sets the translation and rotation from a 4x4 matrix. Set scaling separately. + */ + var m = argument0; + var r = external_call(global._c_transform_matrix, m[0], m[1], m[2], m[4], m[5], m[6], m[8], m[9], m[10]); + r = c_transform_position(m[12], m[13], m[14]); + + +} diff --git a/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.yy b/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.yy new file mode 100644 index 0000000..c4f8349 --- /dev/null +++ b/ModelCreator/scripts/c_transform_matrix/c_transform_matrix.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_matrix", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_position/c_transform_position.gml b/ModelCreator/scripts/c_transform_position/c_transform_position.gml new file mode 100644 index 0000000..f68e0d2 --- /dev/null +++ b/ModelCreator/scripts/c_transform_position/c_transform_position.gml @@ -0,0 +1,12 @@ +/// @param x +/// @param y +/// @param z +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_position(argument0, argument1, argument2) { + /* + Sets the translation of the transformation. + */ + return external_call(global._c_transform_position, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_transform_position/c_transform_position.yy b/ModelCreator/scripts/c_transform_position/c_transform_position.yy new file mode 100644 index 0000000..c2f931b --- /dev/null +++ b/ModelCreator/scripts/c_transform_position/c_transform_position.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_position", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.gml b/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.gml new file mode 100644 index 0000000..56aab77 --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.gml @@ -0,0 +1,14 @@ +/// @param xrot +/// @param yrot +/// @param zrot +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_rotation(argument0, argument1, argument2) { + /* + Sets the rotation of the transformation in euler angles. + Note: Angles are in degrees. You can easily modify this script to use radians instead. + */ + return external_call(global._c_transform_rotation, degtorad(-argument0), degtorad(-argument1), degtorad(-argument2)); + //return external_call(global._c_transform_rotation, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.yy b/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.yy new file mode 100644 index 0000000..48cfb09 --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation/c_transform_rotation.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_rotation", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.gml b/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.gml new file mode 100644 index 0000000..41aea8a --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.gml @@ -0,0 +1,14 @@ +/// @param xa +/// @param ya +/// @param za +/// @param angle +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_rotation_axis(argument0, argument1, argument2, argument3) { + /* + Sets the rotation of the transformation as an angle around an axis. + Note: Angle is in radians. + */ + return external_call(global._c_transform_rotation_axis, argument0, argument1, argument2, argument3); + + +} diff --git a/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.yy b/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.yy new file mode 100644 index 0000000..de5296c --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation_axis/c_transform_rotation_axis.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_rotation_axis", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.gml b/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.gml new file mode 100644 index 0000000..32fdf8c --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.gml @@ -0,0 +1,13 @@ +/// @param x +/// @param y +/// @param z +/// @param w +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_rotation_quaternion(argument0, argument1, argument2, argument3) { + /* + Sets the rotation of the transformation as a quaternion. + */ + return external_call(global._c_transform_rotation_quaternion, argument0, argument1, argument2, argument3); + + +} diff --git a/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.yy b/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.yy new file mode 100644 index 0000000..9d5c2c9 --- /dev/null +++ b/ModelCreator/scripts/c_transform_rotation_quaternion/c_transform_rotation_quaternion.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_rotation_quaternion", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.gml b/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.gml new file mode 100644 index 0000000..a36df17 --- /dev/null +++ b/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.gml @@ -0,0 +1,14 @@ +/// @param x +/// @param y +/// @param z +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_transform_scaling(argument0, argument1, argument2) { + /* + Sets the scaling of the transformation. + Note: Scaling only applies to shapes and will have no effect when applied to a collision object. + Note: Not all shapes support non-uniform scaling. + */ + return external_call(global._c_transform_scaling, argument0, argument1, argument2); + + +} diff --git a/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.yy b/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.yy new file mode 100644 index 0000000..0d104bf --- /dev/null +++ b/ModelCreator/scripts/c_transform_scaling/c_transform_scaling.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Transform", + "path": "folders/Scripts/Venomous Bullet Collision/Transform.yy", + }, + "resourceVersion": "1.0", + "name": "c_transform_scaling", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_add_object/c_world_add_object.gml b/ModelCreator/scripts/c_world_add_object/c_world_add_object.gml new file mode 100644 index 0000000..8632942 --- /dev/null +++ b/ModelCreator/scripts/c_world_add_object/c_world_add_object.gml @@ -0,0 +1,10 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_add_object(argument0) { + /* + Adds a collision object to the world, so it will participate in world collision checks. + */ + return external_call(global._c_world_add_object, argument0); + + +} diff --git a/ModelCreator/scripts/c_world_add_object/c_world_add_object.yy b/ModelCreator/scripts/c_world_add_object/c_world_add_object.yy new file mode 100644 index 0000000..506c2db --- /dev/null +++ b/ModelCreator/scripts/c_world_add_object/c_world_add_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_add_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_create/c_world_create.gml b/ModelCreator/scripts/c_world_create/c_world_create.gml new file mode 100644 index 0000000..97397a7 --- /dev/null +++ b/ModelCreator/scripts/c_world_create/c_world_create.gml @@ -0,0 +1,11 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_create() { + /* + Creates the collision world. There can only be one world at a time. Returns true if successful. + The collision world lets you perform collision checks against multiple objects at once. + You must create the collision world before you call perform any collision checks, even if you are only performing checks on individual objects. + */ + return external_call(global._c_world_create); + + +} diff --git a/ModelCreator/scripts/c_world_create/c_world_create.yy b/ModelCreator/scripts/c_world_create/c_world_create.yy new file mode 100644 index 0000000..6524433 --- /dev/null +++ b/ModelCreator/scripts/c_world_create/c_world_create.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_create", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_destroy/c_world_destroy.gml b/ModelCreator/scripts/c_world_destroy/c_world_destroy.gml new file mode 100644 index 0000000..0d30ae4 --- /dev/null +++ b/ModelCreator/scripts/c_world_destroy/c_world_destroy.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_destroy() { + /* + Destroys the world and all the collision objects in it. Shapes are not destroyed. + */ + return external_call(global._c_world_destroy); + + +} diff --git a/ModelCreator/scripts/c_world_destroy/c_world_destroy.yy b/ModelCreator/scripts/c_world_destroy/c_world_destroy.yy new file mode 100644 index 0000000..5f8feb0 --- /dev/null +++ b/ModelCreator/scripts/c_world_destroy/c_world_destroy.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_destroy", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.gml b/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.gml new file mode 100644 index 0000000..f5ee624 --- /dev/null +++ b/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.gml @@ -0,0 +1,12 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_destroy_object(argument0) { + /* + Removes the object from the world and then destroys it, freeing the memory used. + A convenience script. Same thing as removing the object and then destroying it yourself. + */ + c_world_remove_object(argument0); + c_object_destroy(argument0); + + +} diff --git a/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.yy b/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.yy new file mode 100644 index 0000000..2d4851d --- /dev/null +++ b/ModelCreator/scripts/c_world_destroy_object/c_world_destroy_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_destroy_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_exists/c_world_exists.gml b/ModelCreator/scripts/c_world_exists/c_world_exists.gml new file mode 100644 index 0000000..3a3798a --- /dev/null +++ b/ModelCreator/scripts/c_world_exists/c_world_exists.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_exists() { + /* + Retuns true if the collision world exists, and false otherwise. + */ + return external_call(global._c_world_exists); + + +} diff --git a/ModelCreator/scripts/c_world_exists/c_world_exists.yy b/ModelCreator/scripts/c_world_exists/c_world_exists.yy new file mode 100644 index 0000000..bc837e2 --- /dev/null +++ b/ModelCreator/scripts/c_world_exists/c_world_exists.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_exists", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_get_count/c_world_get_count.gml b/ModelCreator/scripts/c_world_get_count/c_world_get_count.gml new file mode 100644 index 0000000..5a7f232 --- /dev/null +++ b/ModelCreator/scripts/c_world_get_count/c_world_get_count.gml @@ -0,0 +1,9 @@ +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_get_count() { + /* + Returns the number of collision objects that are in the world. + */ + return external_call(global._c_world_get_count); + + +} diff --git a/ModelCreator/scripts/c_world_get_count/c_world_get_count.yy b/ModelCreator/scripts/c_world_get_count/c_world_get_count.yy new file mode 100644 index 0000000..56044dd --- /dev/null +++ b/ModelCreator/scripts/c_world_get_count/c_world_get_count.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_get_count", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.gml b/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.gml new file mode 100644 index 0000000..d354278 --- /dev/null +++ b/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.gml @@ -0,0 +1,11 @@ +/// @param object +/// @author https://web.archive.org/web/20191214124933/https://gmc.yoyogames.com/index.php?showtopic=632606 +function c_world_remove_object(argument0) { + /* + Removes a collision object from the world. Does not destroy the object, it only removes it from the world. + The object will no longer participate in world collision checks. + */ + return external_call(global._c_world_remove_object, argument0); + + +} diff --git a/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.yy b/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.yy new file mode 100644 index 0000000..66a05a4 --- /dev/null +++ b/ModelCreator/scripts/c_world_remove_object/c_world_remove_object.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "World", + "path": "folders/Scripts/Venomous Bullet Collision/World.yy", + }, + "resourceVersion": "1.0", + "name": "c_world_remove_object", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/ModelCreator/scripts/vertex_add_point/vertex_add_point.gml b/ModelCreator/scripts/vertex_add_point/vertex_add_point.gml index 4d51da0..d06e1c6 100644 --- a/ModelCreator/scripts/vertex_add_point/vertex_add_point.gml +++ b/ModelCreator/scripts/vertex_add_point/vertex_add_point.gml @@ -1,6 +1,7 @@ -/// @function vertex_add_point(vbuffer, x, y, z, nx, ny, nz, u, v, color, alpha); +/// @function vertex_add_point(vbuffer, vertex_list, x, y, z, nx, ny, nz, u, v, color, alpha); /// @param vbuffer +/// @param vlist /// @param xx /// @param yy /// @param zz @@ -12,9 +13,12 @@ /// @param color /// @param alpha -function vertex_add_point(vbuffer, xx, yy, zz, nx, ny, nz, u, v, color, alpha) { +function vertex_add_point(vbuffer, vlist, xx, yy, zz, nx, ny, nz, u, v, color, alpha) { vertex_position_3d(vbuffer, xx, yy, zz); vertex_normal(vbuffer, nx, ny, nz); vertex_texcoord(vbuffer, u, v); vertex_color(vbuffer, color, alpha); + + // Save every vertex point inside a list + if (vlist != -1) then ds_list_add(vlist, [xx, yy, zz, nx, ny, nz, u, v, color, alpha]); } \ No newline at end of file diff --git a/ModelCreator/scripts/vertex_create_cube/vertex_create_cube.gml b/ModelCreator/scripts/vertex_create_cube/vertex_create_cube.gml index 3fe922b..f1279ed 100644 --- a/ModelCreator/scripts/vertex_create_cube/vertex_create_cube.gml +++ b/ModelCreator/scripts/vertex_create_cube/vertex_create_cube.gml @@ -1,5 +1,6 @@ -/// @function vertex_add_point(x, y, z, size, color, alpha); +/// @function vertex_add_point(vertex_list, x, y, z, size, color, alpha); +/// @param vlist /// @param xx /// @param yy /// @param zz @@ -7,64 +8,64 @@ /// @param color /// @param alpha -function vertex_create_cube(xx, yy, zz, size, color, alpha) { +function vertex_create_cube(vlist, xx, yy, zz, size, color, alpha) { // Create cube test model var vCube = vertex_create_buffer(); vertex_begin(vCube, o_softwareManager.vformat); // Cube model: bottom - vertex_add_point(vCube, xx, yy, zz, 0, 0, -1, 0, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz, 0, 0, -1, 1, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz, 0, 0, -1, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, 0, 0, -1, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz, 0, 0, -1, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz, 0, 0, -1, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz, 0, 0, -1, 1, 1, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz, 0, 0, -1, 0, 1, color, alpha); - vertex_add_point(vCube, xx, yy, zz, 0, 0, -1, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz, 0, 0, -1, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz, 0, 0, -1, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, 0, 0, -1, 0, 0, color, alpha); // Cube model: front - vertex_add_point(vCube, xx, yy, zz, 0, -1, 0, 0, 0, color, alpha); - vertex_add_point(vCube, xx, yy, zz+size, 0, -1, 0, 1, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz+size, 0, -1, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, 0, -1, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz+size, 0, -1, 0, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz+size, 0, -1, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz+size, 0, -1, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz, 0, -1, 0, 0, 1, color, alpha); - vertex_add_point(vCube, xx, yy, zz, 0, -1, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz+size, 0, -1, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz, 0, -1, 0, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, 0, -1, 0, 0, 0, color, alpha); // Cube model: left - vertex_add_point(vCube, xx, yy, zz, -1, 0, 0, 0, 0, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz, -1, 0, 0, 1, 0, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz+size, -1, 0, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, -1, 0, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz, -1, 0, 0, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz+size, -1, 0, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz+size, -1, 0, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx, yy, zz+size, -1, 0, 0, 0, 1, color, alpha); - vertex_add_point(vCube, xx, yy, zz, -1, 0, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz+size, -1, 0, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz+size, -1, 0, 0, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz, -1, 0, 0, 0, 0, color, alpha); // Cube model: back - vertex_add_point(vCube, xx, yy+size, zz, 0, 1, 0, 0, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz, 0, 1, 0, 1, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 0, 1, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz, 0, 1, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz, 0, 1, 0, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz+size, 0, 1, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 0, 1, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz+size, 0, 1, 0, 0, 1, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz, 0, 1, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz+size, 0, 1, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz+size, 0, 1, 0, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz, 0, 1, 0, 0, 0, color, alpha); // Cube model: right - vertex_add_point(vCube, xx+size, yy, zz, 1, 0, 0, 0, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz, 1, 0, 0, 1, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 1, 0, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz, 1, 0, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz, 1, 0, 0, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz+size, 1, 0, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 1, 0, 0, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz+size, 1, 0, 0, 0, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz, 1, 0, 0, 0, 0, color, alpha); + vertex_add_point(vCube, vlist,xx+size, yy+size, zz+size, 1, 0, 0, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz+size, 1, 0, 0, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz, 1, 0, 0, 0, 0, color, alpha); // Cube model: top - vertex_add_point(vCube, xx, yy, zz+size, 0, 0, 1, 0, 0, color, alpha); - vertex_add_point(vCube, xx, yy+size, zz+size, 0, 0, 1, 1, 0, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 0, 0, 1, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz+size, 0, 0, 1, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx, yy+size, zz+size, 0, 0, 1, 1, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz+size, 0, 0, 1, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy+size, zz+size, 0, 0, 1, 1, 1, color, alpha); - vertex_add_point(vCube, xx+size, yy, zz+size, 0, 0, 1, 0, 1, color, alpha); - vertex_add_point(vCube, xx, yy, zz+size, 0, 0, 1, 0, 0, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy+size, zz+size, 0, 0, 1, 1, 1, color, alpha); + vertex_add_point(vCube, vlist, xx+size, yy, zz+size, 0, 0, 1, 0, 1, color, alpha); + vertex_add_point(vCube, vlist, xx, yy, zz+size, 0, 0, 1, 0, 0, color, alpha); vertex_end(vCube);