This probably exists but i dont know how to do it.
Is there a way to just stop the code from continuing for like 20 frames, while letting the rest of the game continue, then continuing the code?
Or would i need alarms to work this?
It's so it'll work while, for example, a ball is moving.
I have some code but i wanna pause it mid-way, but i want the ball to keep moving, then after the pause
the code will continue functioning the exact same way?
Kinda like a local "sleep()"
Is this possible?
- Game Maker Community
- → Viewing Profile: Topics: Ventwig
Ventwig
Member Since 15 Jan 2011Offline Last Active Oct 12 2012 10:13 PM
Community Stats
- Group New Member
- Active Posts 279
- Profile Views 1855
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Topics I've Started
Pausing code without stopping the whole game
11 October 2012 - 01:34 AM
How to display zeros before number
02 September 2012 - 03:13 PM
Okay, so im currently starting an rpg, and my current problem is my HUD.
What im trying to get it to do is display HP and PP like this:
HP 0500/1750 PP 130/200
So you see, there should be zeroes in front of the first number to be equal to the amount of digits on the bottom.
like so:
300/500 - stays
002/750 - two zeroes
0505/9999 - the one zero added
4 digits is the max, im just trying to get this to work efficiently...
This was probably done before, but thanks anyways.
If it matters, my hp stat variables are hp[0] (current) and hp[1](max)
What im trying to get it to do is display HP and PP like this:
HP 0500/1750 PP 130/200
So you see, there should be zeroes in front of the first number to be equal to the amount of digits on the bottom.
like so:
300/500 - stays
002/750 - two zeroes
0505/9999 - the one zero added
4 digits is the max, im just trying to get this to work efficiently...
This was probably done before, but thanks anyways.
If it matters, my hp stat variables are hp[0] (current) and hp[1](max)
Does GML have an =nil function?
30 April 2012 - 08:29 PM
Hey, I took a break from GM for a few months, and in that time i was working with RPGMaker VXAce.
I was learning some basic Ruby coding,too, so I could code through that maker.
In that maker, if you wanted, you could check if something had an assigned variable or not by using:
if insert_var_name == nil
insert_var_name = 5
and stuff like that. Does GM have that?
I was learning some basic Ruby coding,too, so I could code through that maker.
In that maker, if you wanted, you could check if something had an assigned variable or not by using:
if insert_var_name == nil
insert_var_name = 5
and stuff like that. Does GM have that?
Getting the sprite from a string
18 February 2012 - 12:41 AM
So, I'm working on an RPG where the player gets 5 attacks per character, and then they command those attacks to make more.
Okay, it's confusing.
The problem is the sprites.
There will be many characters, and many attacks, so the thing is, I'm handling the attacks in one object.
The problem is this:
-I set up the attacks by naming them like this:
card1 = "fire"
card2 = "stab"
card3 = "blizzard"
etc.
then when I draw the sprite, i try:
draw_sprite("sprc_"+string(card1),0,50,300)
but then it just shows the first sprite i made.
the sprite i want is called sprc_fire
Help please?
Okay, it's confusing.
The problem is the sprites.
There will be many characters, and many attacks, so the thing is, I'm handling the attacks in one object.
The problem is this:
-I set up the attacks by naming them like this:
card1 = "fire"
card2 = "stab"
card3 = "blizzard"
etc.
then when I draw the sprite, i try:
draw_sprite("sprc_"+string(card1),0,50,300)
but then it just shows the first sprite i made.
the sprite i want is called sprc_fire
Help please?
Scrolling Menu Windows
06 February 2012 - 11:15 PM
- Title: Scrolling Menu Windows
- Description: A scrolling menu for many different purposes!
- GM Version: :GM81:
- Registered: Yes
- File Type: a .gm81 in a .zip
- File Size: 10 KB
- File Link: http://www.mediafire...cs9sv3wttpss3cu
A simple scrolling window.
It can show as many choices as you want using the mouse,
and has an up/down button to scroll or you can use the mouse wheel!

Setup
Copy/Pasted from the code:
Spoiler
//Scrolling Windows Example By Ventwig
//Here, we set up the list
//I recommend keeping the name because you'll need to change alot, but you can.
//You can add as many choices as you'd like
scroll = ds_list_create();
ds_list_add(scroll,"Red");
ds_list_add(scroll,"Blue");
ds_list_add(scroll,"Yellow");
ds_list_add(scroll,"Green");
ds_list_add(scroll,"Orange");
ds_list_add(scroll,"Purple");
ds_list_add(scroll,"Aqua");
ds_list_add(scroll,"Gray");
//These are all of the variables for the window.
scr = 0; //Which choice you start on
scr_size = 5; //How many choices to show
colour = ds_list_find_value(scroll,scr); //This assigns the colour to whichever it starts as (see scr)
drawx = 100; //The x position to start drawing the list
drawy = 50; //The y " "
//These make the up/down buttons. The down is always directly under up, and these
//x and y - position to start
//w and h - how thick
button_x = 50;
button_w = 25;
button_y = 50;
button_h = 25;
//These are just like the draw_rectangle() function.
window_x = 25;
window_y = 25;
window_x2 = 500;
window_y2 = 300;
//Scrolling Windows Example By Ventwig
//Here, we set up the list
//I recommend keeping the name because you'll need to change alot, but you can.
//You can add as many choices as you'd like
scroll = ds_list_create();
ds_list_add(scroll,"Red");
ds_list_add(scroll,"Blue");
ds_list_add(scroll,"Yellow");
ds_list_add(scroll,"Green");
ds_list_add(scroll,"Orange");
ds_list_add(scroll,"Purple");
ds_list_add(scroll,"Aqua");
ds_list_add(scroll,"Gray");
//These are all of the variables for the window.
scr = 0; //Which choice you start on
scr_size = 5; //How many choices to show
colour = ds_list_find_value(scroll,scr); //This assigns the colour to whichever it starts as (see scr)
drawx = 100; //The x position to start drawing the list
drawy = 50; //The y " "
//These make the up/down buttons. The down is always directly under up, and these
//x and y - position to start
//w and h - how thick
button_x = 50;
button_w = 25;
button_y = 50;
button_h = 25;
//These are just like the draw_rectangle() function.
window_x = 25;
window_y = 25;
window_x2 = 500;
window_y2 = 300;
Well, that's pretty much all I can say here.
Version Update
Spoiler
Version 1 -Started up
Version 1.1 - Doubled the colours to show effects better, and added mouse wheel!
Version 1 -Started up
Version 1.1 - Doubled the colours to show effects better, and added mouse wheel!
Update Plans
Spoiler
- Up/Down 5 buttons
- Mouse wheel control
-
Animating choices (Highlighting your current choice) - Liven it!
- Game Maker Community
- → Viewing Profile: Topics: Ventwig
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content