This is about Gamemaker Studio 1.4.1763
Hey again. Right now I'm creating a top-down shoot-em-up game. I decided to use timelines to control my levels. The way that I intended to set it up is that groups of enemies are spawned with a period of time in between. Easy task for a timeline, right?
However, I wanted to use code to create the timelines because that way I could easily control the steps. For example, I want to create enemies after the first 5 seconds, so I used room_speed*5 as the step count.
Anyway, I think that creating my own timelines using code actually has a bug. I make and initialize the timeline in the create event of my controller object, but every timeline_moment is executed immediately (in the first step) instead of it functioning properly.
Controller Create Event:
tm_level1 = timeline_add();
//Add a script to the timeline at the given step.
timeline_moment_add_script(tm_level1,room_speed*5,
attackgroup_1()
);
timeline_moment_add_script(tm_level1,room_speed*10,
attackgroup_2()
);
timeline_index = tm_level1;
timeline_position = 0;
timeline_loop = false;
timeline_running = true;
After searching the subreddit, I found multiple posts that mention the same problem.
https://www.reddit.com/r/gamemaker/comments/3ckdor/quick_question_about_timelines/
https://www.reddit.com/r/gamemaker/comments/4fe652/help_coding_timeline/
Is my only solution here to make my own step count? Such as this user outlines?
Thanks for all the help.
Subreddit
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/gamemaker/c...