Fangames > Programming Questions
Handle rotary object
Junior Nintendista:
--- Quote from: Sudnep on September 13, 2015, 06:50:14 PM ---That will create the star object infinitely though.
--- End quote ---
But not infinitely created, created just a few and then did not create more. I'm actually asking these questions because I'm doing the fucking I Wanna Call Me It in my medley.
infern0man1:
Do you not understand why I set alarm[0] in the alarm 0 event? That resets the alarm and the process happens again infinitely.
Junior Nintendista:
--- Quote from: infern0man1 on September 13, 2015, 07:26:20 PM ---Do you not understand why I set alarm[0] in the alarm 0 event? That resets the alarm and the process happens again infinitely.
--- End quote ---
Be more specific, it is very complicated, I am unable to understand.
infern0man1:
--- Quote from: infern0man1 on September 13, 2015, 06:08:49 PM ---//spawning object's create event
alarm[0]=1; //sets the alarm at the start
//spawning object's alarm 0 event
for(i=0;i<(number of objects you want spawned per alarm);i+=1){ //10 stars are created per alarm
instance_create(random(800),random(608),star);
}
alarm[0]=(how frequently you want this to occur); //alarm is reset and everything happens again
--- End quote ---
lawatson:
>tfw
basically alarm events are activated when you set them, so alarm[0]=10 will make alarm 0 activate after 10 frames. if you set an alarm inside an alarm, you can make an infinite loop. Then you just put in the create star code and that should do it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version