Custom Dragon Boss
#16
Posted 17 May 2012 - 10:33 PM
#17
Posted 17 May 2012 - 11:22 PM
What seems unstable about the code? it works fine on rc3.
Edited by tox_von, 17 May 2012 - 11:24 PM.
#18
Posted 17 May 2012 - 11:54 PM
#19
Posted 18 May 2012 - 12:35 AM
What seems unstable about the code? it works fine on rc3.
I guess unstable isn't the word. It's more...unrefined. As an example, say you're scripting a custom shop. When Link pays the shopkeeper for an item, you could just subtract the money from Link's rupee counter, but that wouldn't look very good when played out with no sound effects or anything. It would look choppy and unrefined when compared to a script that drains the rupees over time and plays a sound while doing it. In the same way, your script looks choppy and unrefined when Link collides with the enemy and teleports backwards instead of being knocked back in a fluid motion and shows no auditory or visual indication that he's been hurt, sometimes not even taking damage like he's supposed to. I believe this is what mathewIan13 was talking about when he said it "came out glitched".
#20
Posted 18 May 2012 - 07:35 AM
Link->Action = LA_GOTHURTLAND;
also i figured out how to do link getting hurt and knocked back i will add that soon.
Edited by tox_von, 18 May 2012 - 07:41 AM.
#21
Posted 18 May 2012 - 12:00 PM
There arnt any working examples of other boss codes and only a handful of people have posted codes as big as mine.
Ok then. Here, have a boss:
void run(int enemynum, int tile, int cs1, int cs2){
int timer=0;
Waitframes(5);
if(Screen->NumNPCs()>0){
npc n=Screen->LoadNPC(enemynum);
Ghost_Init(this, n, GHF_IGNORE_WATER);
Ghost_Transform(this, n, tile, cs1, 4, 4);
while(Ghost_HP>60){
if(Distance(this->X, this->Y+16, this->X, Link->Y)>5){
Ghost_MoveAtAngle(Angle(this->X, this->Y+16, this->X, Link->Y), 0.1, 0);
}
timer++;
if(timer>=300){
timer=0;
eweapon fireball=FireAimedEWeapon(EW_FIREBALL, this->X+8, this->Y+8+16*Rand(0, 1), 0, 100, 8, -1, SFX_FIREBALL, 0);
SetEWeaponLifespan(fireball, EWL_TIMER, 180);
SetEWeaponDeathEffect(fireball, EWD_AIM_AT_LINK, 20);
}
UpdateEWeapons();
Ghost_Waitframe(this, n, false, false);
}
n->CollDetection=false;
for(int i=0; i<=50; i++){
lweapon l=Screen->CreateLWeapon(LW_BOMBBLAST);
l->X=Rand(this->X, this->X+48);
l->Y=Rand(this->Y, this->Y+48);
l->CollDetection=false;
for(int i=0; i<2; i++){
Ghost_Waitframe(this, n, false, false);
}
}
n->CollDetection=true;
Ghost_Transform(this, n, tile+1, cs2, 4, 4);
while(Ghost_HP>0){
if(Distance(this->X, this->Y+16, this->X, Link->Y)>5){
Ghost_MoveAtAngle(Angle(this->X, this->Y+16, this->X, Link->Y), 0.5, 0);
}
timer++;
if(timer==60||timer==120||timer==180||timer==240||timer==300){
eweapon fire=FireNonAngularEWeapon(EW_FIRE2, this->X+8, this->Y+8+16*Rand(0, 1), DIR_LEFT, 100, 8, -1, SFX_FIRE, 0);
}
else if(timer>=600){
timer=0;
Screen->Quake=60;
for(int i=0; i<=3; i++){
npc rock=Screen->CreateNPC(NPC_ROCK);
rock->Y=0;
rock->X=Link->X+Rand(-32, 32);
}
}
clearrocks();
Ghost_Waitframe(this, n, false, false);
}
Ghost_Explode(this, n);
while(true){
clearrocks();
Waitframe();
}
}
}
void clearrocks(){
for(int i=1; i<=Screen->NumNPCs(); i++){
npc rock=Screen->LoadNPC(i);
if(rock->Y>160&&rock->ID==NPC_ROCK){
rock->X=-1000;
rock->HP=HP_SILENT;
}
}
}
}
D0 is the number of the enemy onscreen to use for the boss script,
D1 is the combo for the dragon during the first phase of the battle the combo directly after it is the dragon in the second phase of the battle
D2 is the CSet used for the first phase of the battle
D3 is the CSet used for the second phase of the battle
This also fulfills OP's request.
Edited by Moosh, 18 May 2012 - 12:01 PM.
#22
Posted 19 May 2012 - 08:41 AM
import "ghost.zh"
import "string.zh"
other than adding that what did i need to do?
#23
Posted 19 May 2012 - 08:46 AM
import "ghost.zh"
import "string.zh"
other than adding that what did i need to do?
I'm kinda confused as to what you mean? Do you mean to use my script? You set the D values as instructed and put a custom other type enemy onscreen with 120 HP (what the OP requested it for) and place the ffc where you want it to appear.
#24
Posted 19 May 2012 - 08:59 AM
#25
Posted 19 May 2012 - 09:17 AM
#26
Posted 19 May 2012 - 09:34 AM
If the script/boss won's work on Build 1401, could someone please link me to the VERY LATEST version of Zquest Beta so i could use it?
http://www.purezc.co...o...=53770&st=0
Edit: @tox_von: Then you're clearly doing it wrong. Did you place an enemy onscreen and set D0 to the enemy slot you set that enemy to? Did you make sure your boss tiles are 4x4 like those in the OP's post?
Edited by Moosh, 19 May 2012 - 09:37 AM.
#27
Posted 19 May 2012 - 10:19 AM
#28
Posted 19 May 2012 - 01:24 PM
i tried on a fresh page nothing appeared is there an example qst file?
If you insist...
I really hate uploading stuff because it usually takes like 40 attempts before it finally goes through. File storing sites hate me.
#29
Posted 19 May 2012 - 11:01 PM
on the other code the damage zones arnt correct whenever you go near it you get hit also it doesnt move.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users