This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// par_solid Create Event | |
z = 0; | |
height = 1; | |
width = 2; | |
length = 2; | |
// Assign a proper sprite texture | |
if (sprite_exists(spr_blockOther)) { | |
tex = sprite_get_texture(spr_blockOther, 0); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Collision Event with obj_player | |
if (!held_by_player && place_meeting(x, y, obj_player)) { | |
held_by_player = true; | |
trigger_active = true; | |
// Optionally move out of room | |
// x = y = z = -9999; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensitivity = 0.1 //Mouse movement | |
max_spd = 2; //speed of character | |
acc = 0.1; //acelleration | |
fb_vel = 0; //forwards and backwards velocity | |
rl_vel = 0; //right and left | |
z_vel = 0; | |
jump_spd = 0; | |
depth = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================== | |
// Player-related globals | |
// ============================== | |
global.player_health = 100; | |
global.player_max_health = 100; | |
global.player_shield = 0; | |
global.player_speed = 4; | |
global.player_jump_strength = 8; | |
global.player_score = 0; | |
global.player_ammo = 30; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @description Insert description here | |
// You can write your code in this editor | |
global.paused = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Feather disable all | |
// @ignore | |
function Drago3D_Internals() { | |
static Vertex = function(vbuff, x, y, z, nx, ny, nz, u, v, c, a) { | |
vertex_position_3d(vbuff, x, y, z); | |
vertex_normal(vbuff, nx, ny, nz); | |
vertex_colour(vbuff, c, a); | |
vertex_texcoord(vbuff, u, v); | |
}; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @description Insert description here | |
// You can write your code in this editor | |
/// obj_device_proto Create Event | |
held = false; // Is it currently held by the player? | |
player_ref = noone; // Reference to the player holding it | |
z = 0; // Ground level by default | |
depth = 9999; // For sorting in 3D if needed | |
height = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// --- BuilderController Create Event (Drago3D safe) --- | |
// Debug and editing flags | |
global.debug_mode = false; | |
global.editing_block = false; | |
// Grid and cube defaults | |
global.grid_size = 64; | |
global.current_z = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Create Event of obj_audio_source | |
// Ensure we have a z variable for 3D positioning | |
z = 0; // or whatever default you want | |
// Play a looping sound at this world position | |
sound_id = audio_play_sound_at(snd_generator_hum, x, y, z, 50, 300, 1, true, 1); | |
// Register with the waveform device if it exists | |
if (instance_exists(obj_waveform_device)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @description Set up 3D things | |
depth = 9999; | |
// Bad things happen if you turn off the depth buffer in 3D | |
gpu_set_ztestenable(true); | |
gpu_set_zwriteenable(true); | |
#region vertex format setup | |
// Vertex format: data must go into vertex buffers in the order defined by this | |
vertex_format_begin(); |