The Dink Network

Reply to Re: Making a Boss with special attacks

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 8th 2010, 10:16 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I haven't looked at the script very thoroughly, but in general loops in the main procedure are problematic. The problem is that when the enemy is hit the hit procedure is run and the main procedure aborted. This means that the script rarely ever gets to the 'goto attacks;' line.

The solution is to make a separate script run these special attacks. You'll need a way to check if the boss is still alive though. The easiest way for this is to use a global variable (I hope you have a spare one around that can be freely modified in the fight and used for something else later) and to set it to wether or not the boss is alive.

So when I'm using a global called '&boslife' I use this in the boss's main procedure:
&boslife = 1;

And this in his die procedure:
&boslife = 0;

Then you can built in a check in the other script:
if (&boslife == 0)
{
//Abort the loop:
kill_this_task();
}

EDIT: Feel free to ask if something isn't clear. I kinda rushed this answer, so if I'm not clear on something I (or someone else) can probably clarify things.