S
Sam (Deleted User)
Guest
This is the first time I recall the need to dynamically create a timeline in GameMaker: Studio.
The problem is I want to create at random moments a new instance (with 55 * room_speed as the max), but instead of creating them all at different moments, they are all created at moment (step) zero simultaneously.
Can someone please explain what I am doing wrong here?
Also, are dynamic timelines still officially supported?
I received no error stating use of obsolete functions.
Thanks
The problem is I want to create at random moments a new instance (with 55 * room_speed as the max), but instead of creating them all at different moments, they are all created at moment (step) zero simultaneously.
Code:
// Create Event
tl=timeline_add();
for (i=0; i<=50; i+=1) {
random_x[i]=random_range(256,room_width-256);
random_time[i]=round(random(55 * room_speed));
timeline_moment_add_script(tl,random_time[i],
instance_create(random_x[i],0,obj_Ball));
}
// Global Mouse Left Pressed
for (i=0; i<=50; i+=1) {
// this demonstrates the 50 different values are indeed random and not all zeros.
show_message(random_time[i])
}
Also, are dynamic timelines still officially supported?
I received no error stating use of obsolete functions.
Thanks