Maybe A 'wait' Command.
#1
Posted 09 October 2006 - 03:09 AM
Tell one object to wait a certain amount of miliseconds before doing something else. That would help alot!
#2
Posted 09 October 2006 - 03:23 AM
#3
Posted 09 October 2006 - 03:34 AM
uhh... its called an alarm... or you can make the whole game pause for a moment with the sleep function.
That's just it. Alarms are too complicated, always screw up my game, and the sleep command freezes everything!
#4
Posted 09 October 2006 - 04:14 AM
ON CREATE:
alarm[0]=1000;
ON ALARM 0:
// Do something!
Simple!
-Steve
#5
Posted 09 October 2006 - 05:25 AM
Just try to get started. Read the manual, see the example games. If you need help, the Novice Q&A is the best forum, and people will be glad to help. Good luck!
Regards,
SleeK GeeK.
#6
Posted 09 October 2006 - 06:24 AM
Of course, to solve this, only set an alarm when it hasn't already been set, which means checking if it equals 0...
Smarttart and Sleek... get some different avatars... it's freakn hard to tell the difference!
#7
Posted 09 October 2006 - 10:13 AM
I've mentioned above not to set an alarm in an unconditional step event, that is setting it in every single step.Most of the time, an alarm is set in the creation event or any other event other than an unconditional step event.
Regards,
SleeK GeeK.
Edited by SleeK GeeK, 09 October 2006 - 10:14 AM.
#8
Posted 09 October 2006 - 11:16 AM
I was actually also a bit mad about it, you could in Warcraft III map editor, but they were running individual.
#9
Posted 09 October 2006 - 11:36 AM
#10
Posted 15 October 2006 - 10:38 AM
Create an object, that object takes a screen capture of the window and sets it as a sprite, then it deactivates all instances except it's self.
#11
Posted 15 October 2006 - 05:30 PM
that will freeze the game for .1 of a second I think
sleep(1000)
that will freeze the game for 1 second I think
#12
Posted 16 October 2006 - 09:56 PM
as everyone has been saying... USE ALARMS.
#13
Posted 16 November 2011 - 06:53 PM
I want to create an object that removes 1 health every 10 frames but only when you're touching it, when I use an alarm it keeps going on removes health even when the Player-object has gone away from the health removing object.
So I want it to do something like "(event)When collision with player-(commands)Set health relative -1, wait 10 frames before repeating it."
With an alarm i can't make it stop...
#14
Posted 16 November 2011 - 09:52 PM
// Create Event
delay = 10;
// Step Event
if ( delay > 0) delay -= 1 else delay = 10;
if ( place_meeting( x, y, obj_player) && delay == 0) {
health -= 1;
}
#15
Posted 05 February 2012 - 10:40 PM
How are alarms complicated!?
ON CREATE:
alarm[0]=1000;
ON ALARM 0:
// Do something!
Simple!
-Steve
I'm really confused. I have gamemaker 8.0. If I click on an object, and an event of an alarm, it doesnt bring up anywhere where I can change anything or edit the alarm etc, it just adds 'alarm' to my event list.
I'm trying to get an object to change to another and back again, every maybe 3 seconds, from the very beginning, just as an automatic thing - I'm trying to make a banner around my game and I want every object in the banner to change colour and back again, continuously, to make it interesting (its for children).
Hope this makes sense and hope someone can help me.
Thanks
#16
Posted 22 March 2012 - 11:05 AM
I want that option too, you see...
I want to create an object that removes 1 health every 10 frames but only when you're touching it, when I use an alarm it keeps going on removes health even when the Player-object has gone away from the health removing object.
So I want it to do something like "(event)When collision with player-(commands)Set health relative -1, wait 10 frames before repeating it."
With an alarm i can't make it stop...
try "if [collision] player - set health -1 relative - set alarrm 10 (convert frames to milliseconds) REPEAT"
The "repeat" bit is the most important. That way it checks for the player touching the object every time it wants to remove health.
You might want to also do an "if else" bit.
#17
Posted 23 March 2012 - 01:52 AM
#18
Posted 25 March 2012 - 09:55 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











