Fangames > Programming Questions
Mid-Boss Avoidance
BaronBlade:
Hello! I'm making a medley, and most of my bosses are going to have avoidance segments in the middle. However, I'm not quite sure how to change to the avoidance room, then go back with the boss's HP at the same level. I would guess that you could make the boss a persistent object, but is there anything else to keep in mind? Any help would be much appreciated. Thanks!
lawatson:
a global variable should work. in the room with the post-avoidance phase of the boss, just put in the create event, hp=global variable. of course this is literally a 5-second line of code i thought out, so there might be a more optimized way to do this.
edit: if this is studio where variables are treated like assdicks then yeah listen to someone else lol
Kyir:
If you want it to transition to an avoidance at the same HP value every time, you could make a duplicate of the boss that just starts at whatever value that is. So you'd have the original boss object that that ends when the avoidance starts, and then when that ends you just bring in the second one starting at the proper value.
Derf:
No you should be fine with a persistent object as long as you make sure to write in the object's code not to trigger any of its attacks if the room = the avoidance room. Lawatson's suggestion of a global.variable works as well and might be less cumbersome than using persistent objects in all honestly. Kyir's suggestion seems pointlessly inefficient to me.
I'd go with the global.variable suggestion if I were you, just make sure to reset it when the payer dies and you should be a-ok. Failing that persistent objects will do fine.
Kyir:
Persistence is more trouble than it's worth in my opinion. My way has the added benefit of simplifying things if you want attacks to change after the avoidance. There are plenty of options to choose from when it comes to this sort of thing though.
Navigation
[0] Message Index
[#] Next page
Go to full version