if setting[0,0] > 5 setting[0,0] = 1 if setting[0,0] < 1 setting[0,0] = 5 if setting[1,0] > 1 setting[1,0] = 0 if setting[1,0] < 0 setting[1,0] = 1 if setting[2,0] > 5 setting[2,0] = 1 if setting[2,0] < 1 setting[2,0] = 5 if setting[3,0] > 20 setting[3,0] = 1 if setting[3,0] < 1 setting[3,0] = 20 if setting[4,0] > 1 setting[4,0] = 0 if setting[4,0] < 0 setting[4,0] = 1 if setting[5,0] > 50 setting[5,0] = 1 if setting[5,0] < 1 setting[5,0] = 50 if setting[6,0] > 1 setting[6,0] = 0 if setting[6,0] < 0 setting[6,0] = 1
- Game Maker Community
- → Viewing Profile: Topics: PixelGuts
PixelGuts
Member Since 27 Sep 2011Offline Last Active Mar 20 2013 12:22 PM
About Me
Ever since I was little I've been interested in game making, drawing and animation.
I've worked in Game Maker for about a year now.
I've worked in Game Maker for about a year now.
Community Stats
- Group New Member
- Active Posts 19
- Profile Views 1725
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Version
Unknown
0
none
Latest Visitors
Topics I've Started
Help me make this code shorter
09 February 2012 - 12:27 PM
Is there any way to make this code shorter? Got tons of these in my menu object..
Expand/hide code within brackets
09 February 2012 - 12:22 PM
Expand and hide text within brackets would be very helpful when cleaning up your code.
Is this coming in future updates? Or is there any Game Maker mods or something?
Is this coming in future updates? Or is there any Game Maker mods or something?
Replay engine problem.....
05 February 2012 - 10:41 AM
I'm making a replay engine for my game but it doesn't seem to work and I can't find the problem. There's no game errors, the files created after recording looks fine, but when you try to replay it nothing happens. I even tried making a complete new .gmk to see if it would work but it didn't. Why!?
Create event for obj_control:
//replay stuff
tl=0
global.r_key_left[0]=0;global.r_key_left[1]=0;global. r_key_left[2]=0;global.r_key_left[3]=0;global.r_key_left[4]=0;
global.r_key_right[0]=0;global.r_key_right[1]=0;global. r_key_right[2]=0;global.r_key_right[3]=0;global.r_key_right[4]=0;
global.r_key_jump[0]=0;global.r_key_jump[1]=0;global. r_key_jump[2]=0;global.r_key_jump[3]=0;global.r_key_jump[4]=0;
global.r_key_crouch[0]=0;global.r_key_crouch[1]=0;global. r_key_crouch[2]=0;global.r_key_crouch[3]=0;global.r_key_crouch[4]=0;
if global.replay=1
execute_file("gameplay.play")
else
{
rec=file_text_open_write("gameplay.play");
file_text_write_string(rec,"tl=timeline_add(); timeline_index=tl; timeline_running=true;")
}
Step event for obj_control:
tl+=1
Room end obj_control:
if global.replay=0
{
file_text_write_string(rec,"timline_index=tl" );
file_text_close(rec)
}
Step event for obj_player:
//replay/record
if global.replay=true
{
control=0
move_left=global.r_key_left[index]
move_right=global.r_key_right[index]
move_jump=global.r_key_jump[index]
move_crouch=global.r_key_crouch[index]
}
else
{
if keyboard_check( key_left ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_left[" +string(index)+"]=1)") }
if keyboard_check( key_right ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_right[" +string(index)+"]=1)") }
if keyboard_check_pressed( key_jump ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_jump[" +string(index)+"]=1)") }
if keyboard_check( key_down ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_crouch[" +string(index)+"]=1)") }
}
//movement
if ((keyboard_check_direct( key_right )) && control) or (move_right && !control){
//walk
} else if ((keyboard_check_direct( key_left )) && control) or (move_left && !control){
//walk
}
(obviously it doesn't really say "//walk")
Here's what the gameplay.play file would look like after a few seconds of capturing:
Oh, you choose between recording and replaying in the main menu.
Please help me out here!
Create event for obj_control:
//replay stuff
tl=0
global.r_key_left[0]=0;global.r_key_left[1]=0;global. r_key_left[2]=0;global.r_key_left[3]=0;global.r_key_left[4]=0;
global.r_key_right[0]=0;global.r_key_right[1]=0;global. r_key_right[2]=0;global.r_key_right[3]=0;global.r_key_right[4]=0;
global.r_key_jump[0]=0;global.r_key_jump[1]=0;global. r_key_jump[2]=0;global.r_key_jump[3]=0;global.r_key_jump[4]=0;
global.r_key_crouch[0]=0;global.r_key_crouch[1]=0;global. r_key_crouch[2]=0;global.r_key_crouch[3]=0;global.r_key_crouch[4]=0;
if global.replay=1
execute_file("gameplay.play")
else
{
rec=file_text_open_write("gameplay.play");
file_text_write_string(rec,"tl=timeline_add(); timeline_index=tl; timeline_running=true;")
}
Step event for obj_control:
tl+=1
Room end obj_control:
if global.replay=0
{
file_text_write_string(rec,"timline_index=tl" );
file_text_close(rec)
}
Step event for obj_player:
//replay/record
if global.replay=true
{
control=0
move_left=global.r_key_left[index]
move_right=global.r_key_right[index]
move_jump=global.r_key_jump[index]
move_crouch=global.r_key_crouch[index]
}
else
{
if keyboard_check( key_left ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_left[" +string(index)+"]=1)") }
if keyboard_check( key_right ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_right[" +string(index)+"]=1)") }
if keyboard_check_pressed( key_jump ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_jump[" +string(index)+"]=1)") }
if keyboard_check( key_down ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl, "+string((obj_control.tl))+",global.r_key_crouch[" +string(index)+"]=1)") }
}
//movement
if ((keyboard_check_direct( key_right )) && control) or (move_right && !control){
//walk
} else if ((keyboard_check_direct( key_left )) && control) or (move_left && !control){
//walk
}
(obviously it doesn't really say "//walk")
Here's what the gameplay.play file would look like after a few seconds of capturing:
Spoiler
tl=timeline_add(); timeline_index=tl; timeline_running=true;timeline_moment_add(tl,277,global. r_key_left[0]=1)timeline_moment_add(tl,278,global.r_key_left[0]=1)timeline_moment_add(tl, 279,global.r_key_left[0]=1)timeline_moment_add(tl,280, global.r_key_left[0]=1)timeline_moment_add(tl,341,global. r_key_jump[1]=1)timeline_moment_add(tl,429,global.r_key_crouch[1]=1)timeline_moment_add(tl, 430,global.r_key_crouch[1]=1)timeline_moment_add(tl, 431,global.r_key_crouch[1]=1)timeline_moment_add(tl, 432,global.r_key_crouch[1]=1)timeline_moment_add(tl, 433,global.r_key_crouch[1]=1)timeline_moment_add(tl, 434,global.r_key_crouch[1]=1)timeline_moment_add(tl, 435,global.r_key_crouch[1]=1)timeline_moment_add(tl, 436,global.r_key_crouch[1]=1)timeline_moment_add(tl, 437,global.r_key_crouch[1]=1)timeline_moment_add(tl, 438,global.r_key_crouch[1]=1)timeline_moment_add(tl, 439,global.r_key_crouch[1]=1)timeline_moment_add(tl, 440,global.r_key_crouch[1]=1)timeline_moment_add(tl, 441,global.r_key_crouch[1]=1)timeline_moment_add(tl, 442,global.r_key_crouch[1]=1)timeline_moment_add(tl, 522,global.r_key_left[0]=1)timeline_moment_add(tl,523, global.r_key_left[0]=1)timeline_moment_add(tl,524,global. r_key_left[0]=1)timeline_moment_add(tl,525,global.r_key_left[0]=1)timeline_moment_add(tl, 584,global.r_key_jump[0]=1)timeline_moment_add(tl,584, global.r_key_jump[1]=1)timline_index=tl
Oh, you choose between recording and replaying in the main menu.
Please help me out here!
Replay engine problem
04 February 2012 - 01:55 PM
I'm making a replay engine for my game but it doesn't seem to work and I can't find the problem. There's no game errors, the files created after recording looks fine, but when you try to replay it nothing happens.
Create event for obj_control:
//replay stuff
tl=0
global.r_key_left[0]=0;global.r_key_left[1]=0;global.r_key_left[2]=0;global.r_key_left[3]=0;global.r_key_left[4]=0;
global.r_key_right[0]=0;global.r_key_right[1]=0;global.r_key_right[2]=0;global.r_key_right[3]=0;global.r_key_right[4]=0;
global.r_key_jump[0]=0;global.r_key_jump[1]=0;global.r_key_jump[2]=0;global.r_key_jump[3]=0;global.r_key_jump[4]=0;
global.r_key_crouch[0]=0;global.r_key_crouch[1]=0;global.r_key_crouch[2]=0;global.r_key_crouch[3]=0;global.r_key_crouch[4]=0;
if global.replay=1
execute_file("gameplay.play")
else
{
rec=file_text_open_write("gameplay.play");
file_text_write_string(rec,"tl=timeline_add(); timeline_index=tl; timeline_running=true;")
}
Step event for obj_control:
tl+=1
Room end obj_control:
if global.replay=0
{
file_text_write_string(rec,"timline_index=tl");
file_text_close(rec)
}
Step event for obj_player:
//replay/record
if global.replay=true
{
control=0
move_left=global.r_key_left[index]
move_right=global.r_key_right[index]
move_jump=global.r_key_jump[index]
move_crouch=global.r_key_crouch[index]
}
else
{
if keyboard_check( key_left ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_left["+string(index)+"]=1)") }
if keyboard_check( key_right ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_right["+string(index)+"]=1)") }
if keyboard_check_pressed( key_jump ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_jump["+string(index)+"]=1)") }
if keyboard_check( key_down ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_crouch["+string(index)+"]=1)") }
}
//movement
if ((keyboard_check_direct( key_right )) && control) or (move_right && !control){
//walk
} else if ((keyboard_check_direct( key_left )) && control) or (move_left && !control){
//walk
}
(obviously it doesn't really say "//walk")
I hope I didn't forget something. Oh, you choose between recording and replaying in the main menu.
Please help me out here!
Create event for obj_control:
//replay stuff
tl=0
global.r_key_left[0]=0;global.r_key_left[1]=0;global.r_key_left[2]=0;global.r_key_left[3]=0;global.r_key_left[4]=0;
global.r_key_right[0]=0;global.r_key_right[1]=0;global.r_key_right[2]=0;global.r_key_right[3]=0;global.r_key_right[4]=0;
global.r_key_jump[0]=0;global.r_key_jump[1]=0;global.r_key_jump[2]=0;global.r_key_jump[3]=0;global.r_key_jump[4]=0;
global.r_key_crouch[0]=0;global.r_key_crouch[1]=0;global.r_key_crouch[2]=0;global.r_key_crouch[3]=0;global.r_key_crouch[4]=0;
if global.replay=1
execute_file("gameplay.play")
else
{
rec=file_text_open_write("gameplay.play");
file_text_write_string(rec,"tl=timeline_add(); timeline_index=tl; timeline_running=true;")
}
Step event for obj_control:
tl+=1
Room end obj_control:
if global.replay=0
{
file_text_write_string(rec,"timline_index=tl");
file_text_close(rec)
}
Step event for obj_player:
//replay/record
if global.replay=true
{
control=0
move_left=global.r_key_left[index]
move_right=global.r_key_right[index]
move_jump=global.r_key_jump[index]
move_crouch=global.r_key_crouch[index]
}
else
{
if keyboard_check( key_left ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_left["+string(index)+"]=1)") }
if keyboard_check( key_right ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_right["+string(index)+"]=1)") }
if keyboard_check_pressed( key_jump ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_jump["+string(index)+"]=1)") }
if keyboard_check( key_down ) { file_text_write_string(obj_control.rec,"timeline_moment_add(tl,"+string((obj_control.tl))+",global.r_key_crouch["+string(index)+"]=1)") }
}
//movement
if ((keyboard_check_direct( key_right )) && control) or (move_right && !control){
//walk
} else if ((keyboard_check_direct( key_left )) && control) or (move_left && !control){
//walk
}
(obviously it doesn't really say "//walk")
I hope I didn't forget something. Oh, you choose between recording and replaying in the main menu.
Please help me out here!
Keep HUD size
03 January 2012 - 07:49 PM
I want to change the view size without making the HUD look bigger.
Can anyone help me?
MODERATOR EDIT : This topic has been moved to the Novice Q&A section due to it not following the Advanced Section Rules and Guidlines. Please read the section rules of the forum before posting....
Can anyone help me?
MODERATOR EDIT : This topic has been moved to the Novice Q&A section due to it not following the Advanced Section Rules and Guidlines. Please read the section rules of the forum before posting....
- Game Maker Community
- → Viewing Profile: Topics: PixelGuts
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content