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!
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: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


Alarms Q&A

View previous topic View next topic Go down

Alarms Q&A

Post by -js1210- on 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!
avatar
-js1210-
Super 500 GML
Super 500 GML

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

View user profile http://www.yoyogames.com/members/js1210

Back to top Go down

Re: Alarms Q&A

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

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

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

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

Back to top Go down

Re: Alarms Q&A

Post by Vivi_IX on 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
avatar
Vivi_IX
Tres GameML Ninja
Tres GameML Ninja

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

View user profile http://www.yoyogames.com/members/Vivi_IX

Back to top Go down

Re: Alarms Q&A

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

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

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

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

Back to top Go down

Re: Alarms Q&A

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

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

_________________
we are the champions - my friends
And we'll keep on fighting - till the end -
We are the champions -
We are the champions
No time for losers
'Cause we are the champions - of the world -
avatar
fooey
Moderator
Moderator

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

View user profile

Back to top Go down

Re: Alarms Q&A

Post by Sparx the Cy-Wolf on 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.
avatar
Sparx the Cy-Wolf
Admin
Admin

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

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

Back to top Go down

Re: Alarms Q&A

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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