The Dink Network

2 questions

April 4th 2010, 02:49 AM
duckdie.gif
1.Gimme a script to create a sprite
2.How to add new keys to function for example x button to trigger somthing
April 4th 2010, 03:03 AM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
1. What?
2. Make a script called "key_xxx.c" (where "xxx" is the number of the button) and write the code you want to be executed when that button is pressed

I can't remember the numbers of each button, but I'm sure there is a list somewhere.
April 4th 2010, 03:20 AM
duckdie.gif
OK, I mean, to create a sprite entirely outta scripts
April 4th 2010, 03:34 AM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
Like, write a script that draws a sprite? I don't think that's possible in DinkC. Such a commandset would be very useful.
April 4th 2010, 03:38 AM
goblinh.gif
mkbul
Peasant He/Him Greece
TPA~ 
int &omg = create_sprite(x, y, brain, seq, frame);

perhaps?
April 4th 2010, 04:08 AM
custom_iplaydink.gif
Iplaydink
Peasant He/Him Sweden
Hmm.. 
You didn't know fb5?
Quite important for you fireballs!
April 4th 2010, 04:14 AM
duckdie.gif
3.Now, when I add the DarkDink to GRAPHICS, i put it in a folder called "evil". so the hit is in "evil/hit...."
Now I copied the lines from Dink.ini to load dink s[prite but changed the "dink/hit" to evil/hit and so on. And it crashes!Any solution?
April 4th 2010, 04:41 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Could be one of a few different comming issues to do with the INI. Perhaps it's a priority issue? A faulty load_graphic line?

When does the game crash?
April 4th 2010, 05:15 AM
knightgl.gif
zeddexx
Peasant He/Him New Zealand
I'm pretty sure I'm worth atleast SIX goats... 
oh boy... i know how to help you, but im far to lazy to... sorry.
April 4th 2010, 06:08 AM
duckdie.gif
No, its all right( the line). For the hit example:
load_sequence_now graphics\evil\idle\ds-i2- 12 250 33 70 -12 -9 12 9
load_sequence_now graphics\evil\idle\ds-i4- 14 250 30 71 -11 -9 11 9
load_sequence_now graphics\evil\idle\ds-i6- 16 250 36 70 -11 -9 11 9
load_sequence_now graphics\evil\idle\ds-i8- 18 250 32 68 -12 -9 12 9
April 4th 2010, 06:11 AM
duckdie.gif
And at the WinDinkEdit+ sprite mode the DarkDink sprite doesn't show up anyway while when I press the start button of the D-Mod EvilDink2(the one I'm developing, hope its better ) it crashes! Come on Zed, help me
April 4th 2010, 06:45 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Are you trying to load the original Dink grapics as well? Those are the same slots that it used.

If your idea is to replace Dink for the entire game, just put your evil Dink graphics in exactly the same spots as original Dink in your graphics folder, with the same filenames, then you won't need to worry about anything.
April 4th 2010, 10:24 AM
duckdie.gif
no its another sprite that is congruent to dink
April 4th 2010, 03:43 PM
knightgl.gif
zeddexx
Peasant He/Him New Zealand
I'm pretty sure I'm worth atleast SIX goats... 
sorry doodler im using a psp.
April 4th 2010, 05:53 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Then don't load it in the same sequences as Dink. 12/14/16/18.
April 5th 2010, 09:48 AM
duckdie.gif
whaddaya mean?
April 5th 2010, 11:00 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
load_sequence_now graphics\evil\idle\ds-i2- 12 250 33 70 -12 -9 12 9
load_sequence_now graphics\evil\idle\ds-i4- 14 250 30 71 -11 -9 11 9
load_sequence_now graphics\evil\idle\ds-i6- 16 250 36 70 -11 -9 11 9
load_sequence_now graphics\evil\idle\ds-i8- 18 250 32 68 -12 -9 12 9


The bolded numbers are the sequence numbers you are loading the graphics to. You need to load them to different slots such as 852, 854 856, 858. Otherwise, you are overwriting Dink's original sequences.
April 5th 2010, 01:31 PM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Assuming you know what .ini editing means, this should be easy to fix.
April 6th 2010, 04:01 AM
duckdie.gif
I got it guys. Thanks a lot!
Another question Sorry
4.How do you create a explosion animation at the place where dink is standing when x buton is pressed. I know you save the script as key-88.c
April 6th 2010, 04:29 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Do the script in void main and create a sprite, give it touch damage and brain and end with sp_seq or it wont run the animation.
April 6th 2010, 08:34 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
You might also want to use preload_seq() for the explosion, I've had trouble with that before.
April 6th 2010, 10:39 AM
duckdie.gif
5.How do you "spawn" a script at the end of another
April 6th 2010, 10:53 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
spawn("scriptname"); will create a persistent new script.

If you want to replace the script of the sprite you are replacing it from however, you need to do a little trick just to be safe:

int &old = &current_sprite;
sp_script(&old, "newscript");
April 6th 2010, 11:12 AM
duckdie.gif
6. I managed to get an EvilDink as a seperate sprite but his hit sequence makes him turn into the real dink(any weapons)

Weapons sprite script in Dink.ini:
load_sequence_now graphics\evil\sword\hit\d-sa2- 932 75 52 92 -23 -12 24 11
load_sequence_now graphics\evil\sword\hit\d-sa4- 934 75 74 90 -23 -13 23 14
load_sequence_now graphics\evil\sword\hit\d-sa6- 936 75 33 92 -18 -14 18 10
load_sequence_now graphics\evil\sword\hit\d-sa8- 938 75 46 109 -17 -16 17 10

load_sequence_now graphics\evil\hit\normal\ds-h2- 951 75 60 72 -19 -9 19 9
load_sequence_now graphics\evil\hit\normal\ds-h4- 953 75 61 73 -19 -10 19 10
load_sequence_now graphics\evil\hit\normal\ds-h6- 955 75 58 71 -18 -10 18 10
load_sequence_now graphics\evil\hit\normal\ds-h8- 957 75 61 71 -19 -10 19 10

//bow weapon diags

load_sequence_now graphics\evil\bow\hit\d-ba1- 931 75 57 84 -20 -12 20 12
load_sequence_now graphics\evil\bow\hit\d-ba3- 933 75 33 86 -19 -13 19 13

load_sequence_now graphics\evil\bow\hit\d-ba7- 935 75 54 82 -19 -11 19 11
load_sequence_now graphics\evil\bow\hit\d-ba9- 937 75 37 78 -21 -10 21 10
and the script that makes Dink turn into evil dink:
void main( void)
{
freeze(1);
say_stop("Transform!", 1)
sp_base_walk(1, 900);
sp_base_idle(1, 920);
sp_base_attack(1, 950);
push_active(0);
unfreeze(1);
}
April 6th 2010, 11:22 AM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Because weapon/fist scripts tell Dink to hit with a base of 100. Base_attack() won't do anything for Dink. You'll have to modify them.