Fangames > Programming Questions
Timelines and Boss Fights Help
(1/1)
PlainZombie:
I'm currently messing around with some ideas, and I'm trying to figure out how to do something like this: Say the boss has an attack pattern, and then you get him to half health or something and there's a little break in the action, and then he resumes his original (but maybe harder this time) timeline loop. Or the same thing but with out the transitional period.
I'm trying to get the original timeline to stop and be replaced by the new timeline, but it just won't have any of it and the boss keeps doing his original attack pattern. It's likely I'm just setting everything up incorrectly, or checking the wrong things or what have you. I'm currently using the Health variable and checking to see if it reaches a certain value, which in turn would in theory stop the current timeline and start the next one.
klazen108:
It would really help to see your code, so that we can see what might be wrong. You can cut out the unimportant parts if you don't want to reveal all your secret boss designs :Kappa:
If you want to post the full timeline, you can use pastebin.com to upload the "Show Information" dialog which will show all the code in the timeline. If you have any alarms or step events that are supposed to affect it then post those too. Switching timelines is possible so we'll figure out why it's not working in your case.
PlainZombie:
--- Quote from: klazen108 on January 06, 2015, 12:01:34 PM ---It would really help to see your code, so that we can see what might be wrong. You can cut out the unimportant parts if you don't want to reveal all your secret boss designs :Kappa:
If you want to post the full timeline, you can use pastebin.com to upload the "Show Information" dialog which will show all the code in the timeline. If you have any alarms or step events that are supposed to affect it then post those too. Switching timelines is possible so we'll figure out why it's not working in your case.
--- End quote ---
Yeah sorry I should have led with that. So right now what I've got is this on creation and maybe that's part of the problem:
(click to show/hide)
I can't figure out how to establish a timeline purely in code. The code on the inside of that block looks like this:
--- Quote ---timeline_delete(timelinePhoenix);
--- End quote ---
At one point I was using the Timeline Stop block in place but that didn't work either. I feel like there's something very simple I'm missing. The main timeline loops correctly, it's just a matter of having it stop and then correctly starting the new Timeline.
SirRouven:
I donīt know wether you put this in the create event or the step event but it cannot work either way.
If you put this in the create event, the health gets set to 6 at the beginning and the boss checks if his health is at 5 at the same time.
After that, he will never check his health again.
If you put this in the step event, the boss sets his health to 6 the whole battle long and you practically cannot do any damage to him.
To make your code work you would have to put the first 2 blocks into the create event and the rest into the step event.
You also need to add another variable so that the boss would not repeat setting the new timeline when he is at 5 health.
I hope this helps.
If necessary I can post an example for you.
PlainZombie:
--- Quote from: SirRouven on January 06, 2015, 02:23:34 PM ---I donīt know wether you put this in the create event or the step event but it cannot work either way.
If you put this in the create event, the health gets set to 6 at the beginning and the boss checks if his health is at 5 at the same time.
After that, he will never check his health again.
If you put this in the step event, the boss sets his health to 6 the whole battle long and you practically cannot do any damage to him.
To make your code work you would have to put the first 2 blocks into the create event and the rest into the step event.
You also need to add another variable so that the boss would not repeat setting the new timeline when he is at 5 health.
I hope this helps.
If necessary I can post an example for you.
--- End quote ---
Nah this makes a ton of sense. Thanks a bunch. It's little things like this where it's nice to have someone to ask because now that I hear it the solution sounds super obvious. I had a feeling it was something stupid I was missing.
Navigation
[0] Message Index
Go to full version