Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Alarms Q&A

4 posters

Go down

Alarms Q&A Empty Alarms Q&A

Post by -js1210- Sun Sep 20, 2009 1:40 pm

An alarm is a very simple concept in Gamemaker. Its one of the first things that you learn, but though they are simple there are some nagging questions that go with them. I will answer them here.

Q:How many steps in an alarm counts as 1 second?

A:One second in an alarm is equal to the room speed. For instance if your room speed is 30 then to set an alarm for 4 seconds you make the alarm equal 120 steps(30x4).
Code:

alarm[1]=120

However what if you want to make the room speed change? Then all your alarms would be messed up! Well don't worry simply do this.
Code:

alarm[1]=room_speed*4

"Wow its so simple"

Q:How do I make my own alarms?
A:
Code:

timer+=1
if timer>50{
do this
do this
do this
timer=0}
Using this is a lot more accurate then using normal alarms. Just make sure you put it in the step event of an object. You can also add another "if" before the timer+=1 so it doesn't just keep going after your done with it.

Well that's it. If you have any questions that I should add in here please tell me!
-js1210-
-js1210-
Super 500 GML
Super 500 GML

Posts : 1298
Points : 56522
GameML Reputation : 27
Join date : 2009-06-02
Age : 29
Location : United States

http://www.yoyogames.com/members/js1210

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by Sparx the Cy-Wolf Sun Sep 20, 2009 3:25 pm

I always thought 1 second = 20 steps.
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56275
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by Vivi_IX Thu Sep 24, 2009 6:39 pm

At some point in time I tried to calculate steps per second. I came up with room_speed*2. But more likely it is just room_speed. It may vary on different computers Question
Vivi_IX
Vivi_IX
Tres GameML Ninja
Tres GameML Ninja

Posts : 164
Points : 54268
GameML Reputation : 14
Join date : 2009-07-09
Age : 34
Location : USA: Painesville, Ohio

http://www.yoyogames.com/members/Vivi_IX

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by Sparx the Cy-Wolf Tue Sep 29, 2009 12:57 pm

So therefore, for my computer, 1 second "should" equal 20 steps.
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56275
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by fooey Tue Sep 29, 2009 1:08 pm

on mine its usually 20 but at one point it was a wopping 40
fooey
fooey
Moderator
Moderator

Posts : 1422
Points : 55540
GameML Reputation : 1
Join date : 2009-07-10
Age : 29
Location : here

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by Sparx the Cy-Wolf Wed Sep 30, 2009 5:30 am

You must have a slow computer!

Here's a challenge try using alarms to program speific objects such as a large boss that attracks independently at different times.
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56275
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Alarms Q&A Empty Re: Alarms Q&A

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum