The Dink Network

Re: spin

November 12th 2007, 04:36 PM
wizardb.gif
Where are the graphics to make dink spin around.
November 12th 2007, 04:40 PM
dinkdead.gif
I think it's frames from the dink\fall\ graphics.
November 12th 2007, 04:43 PM
wizardb.gif
That is not the one.
Dink can actually spin in 360.
I once saw the graphics, but cannot
remember where they are at.
November 12th 2007, 04:52 PM
dinkdead.gif
Yeah, I think it's those but for example just frame 1 in directions 2, 4, 6, 8. Make them into a sequence by themselves maybe.

IIRC Dink spinning is in Creeping Sands but the graphics are in .ff format so I can't tell. Might be in another D-Mod though.
November 12th 2007, 11:20 PM
wizardb.gif
I saw dink spinning in a dmod where you go into a basement
and fight a duck, and after the duck, you fight a stone giant.
when you beat him you get to spin.
November 12th 2007, 11:26 PM
wizardb.gif
Guess what, I found the code to make dink spin
so I will post it so all can know.

I just remembered where I had it.
kind of awkward I know, but
at least now everyone can know how
to make dink spin and not get
stumped.

here it is, the script is called spindink.c

//Spinning Dink

void main ( void )
{
int &rwait = 40;
loopy:
sp_dir(1, 2);
wait(&rwait);
sp_dir(1, 4);
wait(&rwait);
sp_dir(1, 8);
wait(&rwait);
sp_dir(1, 6);
wait(&rwait);
if (&player_map == 698)
goto loopy;
kill_this_task();
}

don't worry about the &player_map.
you just use what ever screen you
need.
This set of code is for warping
while making dink spin.
so hope you enjoy.
November 12th 2007, 11:44 PM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
i think it is both quicker and easier to type wait(40); instead of int &rwait = 40; wait(&rwait);

so just type wait(40); since it is quicker and easier
November 13th 2007, 05:21 AM
dinkdead.gif
I thought you were asking for special graphics.
In Creeping Sands he spins round while kind of sitting down and does somersaults as well.
November 13th 2007, 05:51 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
The point is that if you figure out that 40 is a bad value, and you want to try another, you only have to change it in one place instead of in all the wait commands. Classical programming procedure.
November 13th 2007, 03:30 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
You could also subtract from &rwait within the loop to make him spin from slow to fast. That might look a little better.
November 13th 2007, 11:35 PM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
void main ( void )
{
sp_dir(1, 2);
wait(50);
sp_dir(1, 4);
wait(40);
sp_dir(1, 8);
wait(30);
sp_dir(1, 6);
wait(20);
sp_dir(1, 2);
wait(30);
sp_dir(1, 4);
wait(40);
kill_this_task();
}

easier than having &rwait -= 10 in each line
November 15th 2007, 02:51 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
Fireball...

"The point is that if you figure out that 40 is a bad value, and you want to try another, you only have to change it in one place instead of in all the wait commands. Classical programming procedure."

It's easy anyway, as you just copy-paste that line whenever needed.
November 15th 2007, 04:39 AM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
i actually find that my way is easier
November 15th 2007, 01:40 PM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
No it isn't. Copying and pasting is just as fast in either cases, and you'll be in more trouble when you want to change the delay to 60. After all, it takes way longer to change 20 lines rather than just 1 (that variable).

You should seriously start learning programming tricks like this.
November 15th 2007, 02:35 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
Trick? It's programming 101.
November 15th 2007, 03:16 PM
knights.gif
Indeed, set one variable to stay, instead of 100 to-boot!
November 16th 2007, 04:15 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
I couldn't find a better term at the time of writing.