Meaner Boss
Countdown Timer
Got a scripted encounter with a boss. You need to survive its assault for 2 minutes. And it would be cool if in the last 30 secs, the boss would get enraged and will move faster. Let's say the boss is en-bonc and I'm using Sparrowhawks timer. What do I do to achieve this? So the boss gets enraged after 1min and 30 secs.
Well, obviously, a condition statement within the timer script for when the timer is getting low. In said statement, use get_sprite_with_this_brain() and set the speed from there.
If there are multiple sprites with the same brain, you'll have to use get_next_sprite_with_this_brain() and have some way to identify him like sp_custom("imthaboss",&sprite,1);.
A simpler way would to just use a global for his sprite.
If there are multiple sprites with the same brain, you'll have to use get_next_sprite_with_this_brain() and have some way to identify him like sp_custom("imthaboss",&sprite,1);.
A simpler way would to just use a global for his sprite.
Um, I don't get it to work. It's confusing when there are 2 separate scripts and one (the timer) is spawned in the boss's script.
So the boss script spawns the timer? That makes things easier.
Try this.
Try this.
//Boss Script &save_x = ¤t_sprite; spawn("timer");
//Timer Script int &boss = &save_x; ... .... ..... //somewhere within the loop if (&minutes == 0) { if (&seconds <= 30) { sp_speed(&boss,6); } }
Thanks rabid, works like a charm now.
Hm, I want the boss to be weak to a certain weapon. The weapon will then do more damage to it. How do I achieve that?
I haven't really paid attention to what Rabid told you, but you probably need to do the same thing but instead of setting the speed, add some more strength.
Just use a loop to check what Dink has armed and set the defense accordingly.
Since the timer loop is exclusive to the boss and won't be interrupted by the boss' procedures (hit, attack,etc..), this is probably the best place to put it.
Since the timer loop is exclusive to the boss and won't be interrupted by the boss' procedures (hit, attack,etc..), this is probably the best place to put it.