The Dink Network

ice orb release

January 14th 2006, 12:22 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
after testing numerous times, i think i'm finally ready to release ice orb. one last runthrough and i will upload it.

ADD: after further testing i've noticed that you don't get experience by JUST killing the enemy with the spell, i'll check the fireball scripts and maybe find some answers...
January 14th 2006, 12:37 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
hmmm...can't find a fix. can anyone solve this problem? if you kill an enemy just by using the spell, you get no experience!? but if you hit the enemy just once, and then use a spell, you do get experience. this is the final thing that needs fixing. any help would be greatly appreciated.
January 14th 2006, 01:05 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
I think it might have something to do with the harm command, though I'm not sure. I'll need the script to look into it, really.
January 14th 2006, 01:30 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Does your spell uses a missile brain(11 or 17)?
January 14th 2006, 01:38 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
it uses brain 11
January 14th 2006, 01:41 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
anyways... heres the item-script

void use( void )
{

&mydir = sp_dir(1, -1);

//disallow diagonal fireballs for now

if (sp_dir(1, -1) == 1)
sp_dir(1, 4);
if (sp_dir(1, -1) == 3)
sp_dir(1, 6);
if (sp_dir(1, -1) == 7)
sp_dir(1, 4);
if (sp_dir(1, -1) == 9)
sp_dir(1, 6);

&basehit = sp_dir(1, -1);
&basehit += 320;

sp_seq(1, &basehit);
sp_frame(1, 1); //reset seq to 1st frame
sp_kill_wait(1); //make sure dink will punch right away
sp_nocontrol(1, 1); //dink can't move until anim is done!
&magic_level = 0;
draw_status();
&mholdx = sp_x(1, -1);
&mholdy = sp_y(1, -1);
//freeze(1);

wait(100);

if (&mydir == 1)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_mx(&junk, -6);
sp_my(&junk, +2);

}

if (&mydir == 4)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_dir(&junk, 4);
}

if (&mydir == 6)
{
// &mholdy -= 10;
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_dir(&junk, 6);
}

if (&mydir == 3)
{
&mholdx += 30;

&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_mx(&junk, +6);
sp_my(&junk, +2);

}

if (&mydir == 2)
{
&junk = create_sprite(&mholdx, &mholdy, 11, 852, 1);
sp_seq(&junk, 852);
sp_dir(&junk, 2);
}

if (&mydir == 7)
{
&mholdx -= 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 854, 1);
sp_seq(&junk, 854);
sp_mx(&junk, -6);
sp_my(&junk, -2);

}

if (&mydir == 8)
{
&junk = create_sprite(&mholdx, &mholdy, 11, 858, 1);
sp_seq(&junk, 858);
sp_dir(&junk, 8);
}

if (&mydir == 9)
{
&mholdx += 30;
&junk = create_sprite(&mholdx, &mholdy, 11, 856, 1);
sp_seq(&junk, 856);
sp_mx(&junk, +6);
sp_my(&junk, -2);

}

//create fake shadow effect
playsound(17, 8000,0,&junk,0);

sp_timing(&junk, 0);
sp_speed(&junk, 2);
sp_strength(&junk, -1);
sp_range(&junk, 10);
//this makes it easier to hit stuff
sp_flying(&junk, 1);
sp_script(&junk, "dam-iORB");
//when the projectile hits something, it will look to this script, this way
//we can burn trees when appropriate (in this case, put out fireplace fires)
&mshadow = create_sprite(&mholdx, &mholdy, 15, 432, 3);
sp_brain_parm(&mshadow, &junk);
sp_que(&mshadow, -500);
sp_brain_parm(&junk, 1);
sp_brain_parm2(&junk, &mshadow);

unfreeze(1);
}

void disarm(void)
{
init("load_sequence graphics\dink\hit\magic\ds-m2- 322 30 60 84 -15 -9 16 7");
init("load_sequence graphics\dink\hit\magic\ds-m4- 324 30 61 86 -13 -7 15 8");
init("load_sequence graphics\dink\hit\magic\ds-m6- 326 30 60 86 -11 -8 13 9");
init("load_sequence graphics\dink\hit\magic\ds-m8- 328 30 61 83 -15 -4 15 14");
&magic_cost = 0;
kill_this_task();

}

void arm(void)
{
Debug("Preloading fireball");

int &basehit;
int &mholdx;
int &mholdy;
int &junk;
int &mshadow;
int &mydir;
&magic_cost = 1000;

preload_seq(854);
preload_seq(856);
preload_seq(858);
preload_seq(322);
preload_seq(324);
preload_seq(326);
preload_seq(328);
preload_seq(322);

//change magic hit
init("load_sequence_now graphics\dink\hit\magic2\ds-m2- 322 30 60 84 -15 -9 16 7");
init("load_sequence_now graphics\dink\hit\magic2\ds-m4- 324 30 61 86 -13 -7 15 8");
init("load_sequence_now graphics\dink\hit\magic2\ds-m6- 326 30 60 86 -11 -8 13 9");
init("load_sequence_now graphics\dink\hit\magic2\ds-m8- 328 30 61 83 -15 -4 15 14");

}

void pickup(void)
{
Debug("Player now owns this item.");
kill_this_task();
}

void drop(void)
{
Debug("Item dropped.");
kill_this_task();
}

January 14th 2006, 01:42 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
and the damage script...

void main( void )
{
int &mcrap;
int &scrap;
int &junk;
}

void damage( void )
{
//make dink immune
if (&missile_target == 1)
{
return;
}
//do the fireplace thing
int &isfire = sp_seq(&missile_target,-1);
if (&isfire == 86)
{
int &msavex = sp_x(&missile_target,-1);
int &msavey = sp_y(&missile_target,-1);

//kill fire
sp_active(&missile_target,0);

//shift coordinates to properly align
&msavex += 8;
&msavey -= 7;

//make empty fireplace
int &empty = create_sprite(&msavex,&msavey,0,64,6);

//shift coordinates to properly align
&msavex -= 8;

//make smoke
int &smoke = create_sprite(&msavex,&msavey,0,70,11);
sp_speed(&smoke,2);
sp_dir(&smoke,8);

//smoke que
&msavey += 25;
sp_que(&smoke,&msavey);

//sizzle
Playsound(51,22050,0,0,0);

//dink commentates on fire
say("Prevent forest fires.",1);

move(&smoke,8,-100,1);
}

//if thing we are shooting has hitpoint value
//obviously its intended for us to kill it
//so we dont need to mess with brain numbers
if (sp_hitpoints(&missile_target, -1) > 0)
{
//freezing targets
&frozen = &missile_target;
freeze(&missile_target);
spawn("frozen");

//hurt the target random amount * magic level
int &damage = random(3,1);
&damage += &magic;
//factor out targets defense
&damage -= sp_defense(&missile_target, -1);

//see if target is going to die
int &hpsu = sp_hitpoints(&missile_target, -1))
if (&damage >= &hpsu)
{
//change targets death sequence to the ice shatter one
sp_base_death(&missile_target,860);
//set the direction to play the proper sequence
sp_dir(&missile_target, 1);
//play shatter sound
Playsound(50,22050,0,0,0);
}

//factor target's defense back in
&damage += sp_defense(&missile_target, -1);
hurt(&missile_target, &damage);
}
&scrap = &current_sprite;
playsound(18, 8000,0,0,0);
kill_shadow(&scrap);
sp_seq(&scrap, 855);
sp_pseq(&scrap, 855);
sp_frame(&scrap, 1);
sp_brain(&scrap, 7);
&mcrap = sp_y(&scrap, -1);
&mcrap -= 35;
sp_y(&scrap, &mcrap);

&mcrap = sp_pseq(&missile_target, -1);
&scrap = sp_pframe(&missile_target, -1);
int &hold = sp_editor_num(&missile_target);
}
January 16th 2006, 10:00 AM
anon.gif
rabidwolf9
Ghost They/Them
 
can any experienced dinkers please help. this spell doesn't give experience when used alone. i keep looking it over and still have no idea as to how to fix this. and as of now, the spell is kind of useless b/c you don't get experience from killing a monster with it unless you actually hit the monster as well. this is the last thing that needs fixing before i upload it, all help will be greatly appreciated!!
January 16th 2006, 02:11 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
The only reason for not giving you experience I found was the fact that you used hurt. This way, the engine won't consider that dink killed the monster. If you want me to look at the entire spell and try to fix it, send it here or here.
January 16th 2006, 02:19 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Ah yes, that's what I meant with "harm", you used the hurt command, which doesn't trigger the exp I think. Though I have no clue how to fix it.
January 16th 2006, 03:01 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
i sent it. let me know if you can/can't fix it.
January 18th 2006, 06:55 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
just uploaded it, so it should be up soon. almost flawless