Reply to Making a Boss with special attacks
If you don't have an account, just leave the password field blank.
Ok, so I'm getting more into difficult (well, difficult for someone like me, anyway) scripts now. I've had a go at making my own enemies and stuff, and now I'm making a boss. But I didn't want the boss to just be a fast/invincible enemy, so I'm trying to give him special attacks (Yays!). Anyway, for some reason that is beyond me, my code doesn't actually work...
(Bear with me on all the random capitals here, the boss is meant to be insane... )
The whole script I deemed too large for me to post, the above is just an excerpt (is that the word?) So all that is inside the boss's main procedure, looping around. But I'm getting several issues such as the boss staying permanently invisible and the boss sometimes using no more special attacks after summoning pillbugs. Any help's appreciated Also, the script is attatched to the boss via an sp_script() command in a different script, if that affects anything.
(Bear with me on all the random capitals here, the boss is meant to be insane... )
attacks: &appear = 0; &attack = 0; &pillbugs = 0; &pillbugs2 = 0; wait(1500); &appear = random(5000, 4000); &attack = random(5, 0); //This attack is the goblin-eating-pillbug summon //en-pilg is not a typo if (&attack == 3) { say("`4I tHiNk I mAy iNviTe a FeW pILLbuGs tO CoMe aND heLp OuT!!", ¤t_sprite); wait(200); &pillbugs = create_sprite(417, 185, 0, 0, 0); &pillbugs2 = create_sprite(206, 174, 0, 0, 0); sp_script(&pillbugs, "en-pilg"); sp_target(&pillbugs, 1); sp_script(&pillbugs2, "en-pilg"); sp_target(&pillbugs2, 1); } //This is the temporary speed boost if (&attack == 2) { say("`4CaN YoU sTiLL EvaDe Me iF I sPeEd uP!?!?", ¤t_sprite); wait(200); sp_speed(¤t_sprite, 3); wait(&appear); sp_speed(¤t_sprite, 1); } //This is the temporary invisibility if (&attack == 1) { say("`4LetS SeE iF yOu Can kiLL WhaT yOu Can'T SeE!!", ¤t_sprite); wait(200); sp_nodraw(¤t_sprite, 1); wait(&appear); sp_nodraw(¤t_sprite, 0); } //This one makes him talk if (&attack == 0) { &insult = random(3, 0); if (&insult == 0) { say("`4WhY DiD tHiS hAVe tO HapPeN To mE? It hUrTS So mUcH!!", ¤t_sprite); } if (&insult == 1) { say("`4tHiS pLaCe sHaLL BecOmE yOUr GraVe, ApPLe ThiEf!!", ¤t_sprite); } if (&insult == 2) { say("`4GiVe uP NoW, ChiLd!!", ¤t_sprite); } } goto attacks;
The whole script I deemed too large for me to post, the above is just an excerpt (is that the word?) So all that is inside the boss's main procedure, looping around. But I'm getting several issues such as the boss staying permanently invisible and the boss sometimes using no more special attacks after summoning pillbugs. Any help's appreciated Also, the script is attatched to the boss via an sp_script() command in a different script, if that affects anything.