The Dink Network

Story scripts suck

August 17th 2005, 04:31 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Story scripts just don't work for me. Like for example (sorry if there's emoticons):

void main( void )
{
if (&story == 0)
{
say_stop("`1You better not edited the C files player.",&current_sprite);

if (&story == 1)
{
freeze(1);
say_stop("You were calling me?", 1);
wait(500);
say_stop("`1Yes. It's dinner time.",&current_sprite);
wait(500);
say_stop("Yay! What are we having?", 1);
wait(500);
say_stop("`1Well, I wanted to have duck but we're all out.",&current_sprite);
wait(500);
say_stop("Fine. I'll get the duck.", 1);
wait(500);
say_stop("`1And I'll get the axe.",&current_sprite);
wait(500);
say_stop("Please hurry Dink, it's getting dark...", 1);
wait(500);
&story = 2;
unfreeze(1);
{

if (&story == 2)
{
say_stop("`1Hurry up and get the duck please Dink.",&current_sprite);

if (&story == 3)
{
say_stop("`1JUST GET THE DUCK DINK!",&current_sprite);

void hit(void)
{
freeze(1);
say_stop("`1DON'T HIT ME!.",&current_sprite);
wait(500);
say_stop("DON'T SHOUT AT ME!", 1);
wait(500);
&story = 3;
unfreeze(1);
}

And this doesn't work either (I don't want it seeable untill the story is over 2 if thats the problem):

void main(void)
{
if (&story >= 2)
{
&vision = 1;
}
if (&story <= 2)
{
&vision = 0;
August 17th 2005, 06:20 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
http://www.dinknetwork.com/forum.cgi?MID=51761&Posts=1

Just so you can modify you old post.
August 18th 2005, 11:23 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
That's for the help Davince but that address doesn't work for some reason. Can you just edit it and present it in another post?
August 19th 2005, 12:12 AM
goblinm.gif
The link works fine for me, and Cypry's advice was on point. You need to close your braces. Think of braces like you think of parentheses. If you have a starting parenthesis, you need an ending parenthesis. Further, the way you place the braces matters to what order stuff is run in.

EDIT: A fix of your script

void main( void )
{
if (&story == 0)
{
say_stop("`1You better not edited the C files player.",&current_sprite);
}//you needed this extra brace

if (&story == 1)
{
freeze(1);
say_stop("You were calling me?", 1);
wait(500);
say_stop("`1Yes. It's dinner time.",&current_sprite);
wait(500);
say_stop("Yay! What are we having?", 1);
wait(500);
say_stop("`1Well, I wanted to have duck but we're all out.",&current_sprite);
wait(500);
say_stop("Fine. I'll get the duck.", 1);
wait(500);
say_stop("`1And I'll get the axe.",&current_sprite);
wait(500);
say_stop("Please hurry Dink, it's getting dark...", 1);
wait(500);
&story = 2;
unfreeze(1);
}//this brace was going backwards before

if (&story == 2)
{
say_stop("`1Hurry up and get the duck please Dink.",&current_sprite);
}//you needed this extra brace
//also consider using say instead of say_stop

if (&story == 3)
{
say_stop("`1JUST GET THE DUCK DINK!",&current_sprite);
}//you needed this extra brace
//again, say may be better than say_stop here
//say_stop does funny things when Dink isn't frozen

}//you needed this extra brace...
//...to close out your main procedure

void hit(void)
{
freeze(1);
say_stop("`1DON'T HIT ME!.",&current_sprite);
wait(500);
say_stop("DON'T SHOUT AT ME!", 1);
wait(500);
&story = 3;
unfreeze(1);
}
August 19th 2005, 09:35 AM
goblins.gif
igloo15
Peasant He/Him
 
I suggest using some kind of dinkc editor like easy dink c or cedit. You have alot of bracket errors.
August 19th 2005, 10:38 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Thanks, I been having the same problem in an Epic D-mod I am trying to make but as I told Ameboa Lord (sorry if I spelt it wrong) expect it like nest year beacuase I am not very experienced. And can you fix my vision one too? My laziness is overwhelming.
August 20th 2005, 09:07 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
<Long Sigh> Vision is really annoying me... Is "vision 1" invisble and "vision 0" visible?
The script is up above if you wanna know what I am trying to do...
August 20th 2005, 12:27 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
I was too lazy to read your script, but I'll tell ya wat vision is.
Sometimes, you need to add some objects, but they should appear only later in the game, or only at the begining. For example, you put an NPC, that should dissapear after you talk to him. First, you edit the screen, without the NPC, then you change the vision to 1 and put the NPC. Create the screen script, and put there somrthing like this:
void main(void)
{
If (&talk_npc == 0)//you didn't talk with the NPC
{
&vision = 1;
}
}

In the NPC script, make sure to add the following line in the talk procedure:
&talk_npc = 1;
Of course, this was a simple examle.
You can use the vision to make the screen look different in different stuations.
Just leave the blank screen on vision 0, and edit the screen in vision 1, vision 2...and so on.
Just remember that the sprites you see in vision 0, you see in all the vision.
August 20th 2005, 11:12 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I think I get it. So I put in all my sprites, then go to the world mappy thing and change the squares vision (using s or v or whatever) then I place in the sprite with the script that only makes it visible when the story is &story >= 2. Because if that's what you said, I did and it doesn't work so it must be my script.
August 20th 2005, 11:20 PM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
I had a lot of trouble with the visions too.
In Terrania, I made a script just for visions
on the particular screen and attached it to the
base of the screen.You hit 'B' when you're
editing the screen.It's better than attatching
to a sprite because, um, I say so!

It went like:

void main(void)
{

if (&story < 5)
{
&vision = 1;
}
if (&story == 5)
{
&vision = 2;
}

if (&story > 5)
{
&vision = 2;
}
}

I'm not sure if that is helpful or not.

EDIT: Also when you do the hit script...

void hit(void)
{
freeze(1);
say_stop("`1DON'T HIT ME!.",&current_sprite);
wait(500);
say_stop("DON'T SHOUT AT ME!", 1);
wait(500);
unfreeze(1);
}

don't put the: &story = 3; in there
August 21st 2005, 02:41 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
To attach a script to a screen, in DinkEdit press B (like Carrie said). In WinDinkEdit, just right click on the screen -->Properties, then fill the Script box.
August 21st 2005, 03:06 PM
goblinm.gif
It's better than attaching to a sprite because attaching to a sprite doesn't work (it changes vision too late.) Attaching to screen is the ONLY way to change vision AFAIK.
August 22nd 2005, 04:23 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I am kinda over vision, now I want a script for a bombable rock that will @#$%ING STAY BOMBED AND WON'T CRASH MY GAME!!

Can it be a modifiable C file too?
August 22nd 2005, 06:47 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
Cloud Castle 2 has bombable rocks. Download it and check out the scripts item-bom, dam-bom and pun-bomb.

I think the last script is for punching bombs however, and won't prove too useful.
August 22nd 2005, 08:07 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
In the main Dink game, you have to blow up a rock to get into the duck shrine. Maybe you can take a look at that script.
August 22nd 2005, 11:15 AM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
int &hold = sp_editor_num(&current_sprite);

if (&hold != 0)
{
this was placed by the editor, lets make the barrel stay flat
editor_type(&current_sprite, 3);
editor_seq(&current_sprite, 173);
editor_frame(&current_sprite, 4);
type means show this seq/frame combo as background in the future
}

Editor_type can be set to the following:
0 - no change
1 - kill sprite completely
2 - draw pic from enclosed seq/frame data as a sprite WITHOUT hardness
3 - draw pic from enclosed seq/frame data as a BACKGROUND object WITH
hardness (can't walk behind)
4 - draw pic from enclosed seq/frame data as a sprite WITH hardness
5 - draw pic from enclosed seq/frame data as a BACKGROUND object WITHOUT
hardness (can't walk behind)
6 - kill sprite, but let him come back after 5 minutes
7 - kill sprite, but let him come back after 3 minutes
8 - kill sprite, but let him come back after 1 minute

I took that from dinkc.txt . You can find this file in the "Develop" folder of your game. Read it. It's very useful.
August 22nd 2005, 06:53 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Yeah I originally tried the Original Dink game but I couldn't find the script because the bombable rock is drawn from another script.

And I always go though all folder and files when I download something (including the original Dink game) and I'm pretty sure that I missed it. Thanks for your help Cypry, but I'll probably download Cloud Castle 2 (GOD I LOVE ITALICS) because it might have some other scripts I can use.
August 22nd 2005, 07:00 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Found a useful script:

void hit( void )
{
int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
if (&rcrap == 1)
{
//rock just got hit by a sprite with a script named dam-bomn, I'm gonna
//guess it was the bomb.
//remove rocks hardness and sprite
sp_hard(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
sp_active(&current_sprite, 0);
playsound(43, 22050, 0,0,0);
//kill this item so it doesn't show up again for this player
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}
}

It has a bug, though. If a bomb on the screen currently hits something other than the rock, and you hit the rock with your fists, then it'll also go away. There should be something to fix that, such as the sp_gold() trick and a simple modification in the bomb scripts, but I'm too lazy to make those now
August 23rd 2005, 02:47 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Was that from SOB? Cause I took one from SOB, and now my computer is crashing when I bomb it! dang you SimonK!!
August 23rd 2005, 09:31 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
No, I believe that's the one from Cloud Castle 2. I forgot about that bug...
August 23rd 2005, 12:11 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I don't know... I modified it from some script of, I believe, the original game. The file starts with "secret 1 for area 4". Originally, when you bomb it, a golden heart appears. It wasn't from CC2, I'm very sure. The script dates from 3 years ago
August 23rd 2005, 12:32 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
No? My bad.

It was the bug you mentioned that confused me... we had that in Cloud Castle 2, so I just presumed the script was from that. Never mind.
August 23rd 2005, 02:18 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
Beheaded duck, I don't know, but for becoming a good DMOD author, you should read some tutorials first. Those are really helpfull.
August 23rd 2005, 03:28 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I didn't even experience the bug with the script myself, but since it only checks for the script of a &missile_source sprite, it doesn't check if it actually was thát sprite who hit it.

A better way is to set "sp_gold(&current_sprite, 23);" to all things you want bombable, and add a proc called "void bomb( void )". Then, in the script of the bomb, do a check for "sp_gold(&missile_target, -1)" and see if it's 23. Then run_script_by_number() (after finding out the number) and specify the bomb proc. Easy, right

EDIT: enemy_sprite() doesn't return the bomb sprite. I've tried with a fireball and it was Dink saying it. I guess it returns sp_brain_parm() of the missile or something.

EDIT2: sounds stupid, that it doesn't work for a bomb because I tested it with a fireball, but those are technically both missiles, so I figure they'd respond the same.
August 23rd 2005, 06:55 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
What? Screw this, I'm goanna take that cypry's advice and get a tutorial.

EDIT 1: I'm not crying, that's meant to be sweat.
August 23rd 2005, 07:04 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
That stuff was merely meant for Sabre. I can quite understand you don't get that code, as the things you must do to get it to work involve working with a lot of underdocumented features.

The script I posted should work. In my experience it's really rare someone punches just the right rock while a bomb explodes. And let's be honest, if you can punch a rock after you've placed a bomb, you'd also be able to put that same bomb next to the rock. The "bug" doesn't really ruin the game, it just looks silly.
August 23rd 2005, 08:10 PM
goblinm.gif
I use run_script_by_number for putting out fires and it SUCKS. I often have to hit something four or five times before it will respond. This method is infinitely better.

Also, enemy_sprite() doesn't exist AFAIK. &enemy_sprite is the only way to go.
August 24th 2005, 05:02 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Yeah the script worked... EXCEPT WHEN I PUNCHED IT AND MY GAME CRASHED! I'm not angry at you, it's just how could one C-file crash Dink Smallwood and force me to have to restart my computer?!? I try Alt-F4, Ctrl-Alt-Delete but nothing works!
August 24th 2005, 05:25 AM
spike.gif
You don't have to restart, screwing around with ctrl-esc and control-alt-delete does the trick for me. If there's music playing you might wanna control-alt-delete dink.exe on the progresses bar too btw.
August 24th 2005, 05:26 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
See if sound 43 exists. Not existing sounds are a known source of computer freeze problems.

And I doubt unfreeze(&cpu) would work.
August 24th 2005, 05:29 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I've never had problems with it. I use it for lighting torches

Also, enemy_sprite() doesn't exist AFAIK. &enemy_sprite is the only way to go.

I was mistaken. It would've made more sense if it was a function, but I forgot about the mysterious Seth-way of doing it.
August 24th 2005, 06:07 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I'm sorry, but what do you mean "Sound 43"? I have NO IDEA about sounds. When I see play_sound (43,23,4556,11) or whatever it is i usally delete it. What the heck does it mean by (48,44,556,432434)?
August 24th 2005, 09:25 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The DinkC Reference says (about playsound):

# Category: Sound
# Prototype:
# int playsound( int sound#, int min_speed, int rand_speed_to_add, int sprite_or_0, bool repeat? );

Plays a sound. If rand_speed_to_add isn't 0, a random # will be made from this # and added to the sound. If sprite isn't 0, the sound will be 3D based on this sprite's location. If the sprite is killed for some reason ([e.g.], a fire goes out), the sound will die too. If repeat is not 0, the sound will repeat.

Returns the soundbank used. Use this for special control of the sound. See: sound_set_vol() [to reduce the volume of the played sound] sound_set_survive() [to make the sound survive a screen change] sound_set_kill() [to kill a sound set to "survive"]

See also:
load_sound() [<sound#> argument is as set by load_sound()]

Hmm... doesn't give us any information on that sound# thing. It's up to you to download it and look up what it does and how it works. It's the best way to learn things: try something, make it crash, try to figure out yourself what might be the cause, look up the correct use and syntax of the used functions, fix it, rerun it, etc.
August 24th 2005, 10:16 AM
spike.gif
If you used a custom script, you might want to post it here.

If you removed any load_sound(); lines from start.c, copy them back from the start.c of original Dink.
August 24th 2005, 02:46 PM
custom_carrie2004.gif
carrie2004
Peasant She/Her Canada
*chomp* 
Sometimes if you're game freezes because of a
scripting problem, if you hit 'ctrl-alt-del' once and then 'Q', it will shut down fine.Not that I
have to do that often or anything...*ahem* ...look at me sweat now...lol!
August 25th 2005, 06:36 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Scratcher, the script I am using is listed above! Here's the void hit part of it:

void hit( void )
{
int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
if (&rcrap == 1)
{
//rock just got hit by a sprite with a script named dam-bomn, I'm gonna
//guess it was the bomb.
//remove rocks hardness and sprite
sp_hard(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
sp_active(&current_sprite, 0);
playsound(43, 22050, 0,0,0);
//kill this item so it doesn't show up again for this player
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}
//minused a bracket there, don't think it was necessary

And about start.c, learnt that the hard way. <Crying that time>
August 25th 2005, 04:03 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
about that missile source bug...wouldn't you be able to avoid this bug by reseting the missile source variable in the dam-bomn script? just a thought... btw, what is the "sp_gold() trick"?
August 26th 2005, 11:22 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The bracket was necessary.

void hit( void )
{
//Hit open bracket
int &rcrap ...
if (&rcrap == 1)
{
// if &rcrap == 1 open bracket
//rock just got hit by a ...
}
// if &rcrap == 1 close bracket
...

This would leave void hit( void ) open. A bracket would close the hit proc.
August 27th 2005, 06:33 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Yeah umm thanks, but how does that help with crashing? I mean, I only got rid of the bracket on the message board, not on the actual C file.
August 27th 2005, 08:58 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Ah, a slight misunderstanding on my part. Known crash-reasons are:

You try tro play a sound that isn't loaded.
There's a say() somewhere in which the text to say exceeds a specific number of characters.

Figure out what line it crashes on, by using the say() trick:
Place say("1",1); after the first line
say("2",1); after the second line, etc. Of course, they should appear on a line of their own.
Then, when the game crashes, Dink should say a number, it's the number that fits with the latest executed say() line you added, and probably the line after that causes the crash.
September 3rd 2005, 12:36 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I did this:

void hit( void )
{
say("Line 1.", 1);
int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
say("Line 2.", 1);
if (&rcrap == 1)
say("Line 3.", 1);
{
//rock just got hit by a sprite with a script named dam-bomn, I'm gonna
//guess it was the bomb.
//remove rocks hardness and sprite
say("Line 4.", 1);
sp_hard(&current_sprite, 1);
say("Line 5.", 1);
draw_hard_sprite(&current_sprite);
say("Line 6.", 1);
sp_active(&current_sprite, 0);
say("Line 7.", 1);
playsound(43, 22050, 0,0,0);
say("Line 8.", 1);
//kill this item so it doesn't show up again for this player
int &hold = sp_editor_num(&current_sprite);
say("Line 9.", 1);
if (&hold != 0)
say("Line 0.", 1);
editor_type(&hold, 1);
}

Broke when I bombed it or hit it with my fist, both resulting in the last thing Dink says is "Line 9." Any suggestions?

September 3rd 2005, 01:56 AM
goblinm.gif
That's pretty freaking weird. sp_editor_num shouldn't return 0 unless the sprite was created with create_sprite. Did you place the rock in the editor? Or is it a created sprite?

At any rate, the debugging code adds another bug. You want:

if (&hold != 0)
{
say("Line 0.", 1);
editor_type(&hold, 1);
}

Instead of:
if (&hold != 0)
say("Line 0.", 1);
editor_type(&hold, 1);

Only the first line after an if statement is run when there are no braces (and the condition evaluates true.) Weird, eh?
September 3rd 2005, 04:56 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Used your script and the exact same thing happened except I actually got to Line 0. That means (bigger problem in italics):
Rock broke with bomb and fist.
Rock regenerated when I changed screens.
September 3rd 2005, 08:06 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Remove Line 3, it screws up the if-statement. The if doesn't make sense anymore, so Dink skips it. This means that the rock destruction code is run no matter what it was hit by. See what line it now crashes at. For the fists as well as the bomb.
September 3rd 2005, 08:47 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Here's the full script (in case I made nay mistakes in the "void main ( void )" thing):

void main( void )

void talk( void )
{
say("Hmmmm, maybe I can destroy this rock...", 1);
}

void hit( void )
{
say("Line 1.", 1);
int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
//Got rid of int crap here
say("Line 2.", 1);
{
//rock just got hit by a sprite with a script named dam-bomn, I'm gonna
//guess it was the bomb.
//remove rocks hardness and sprite
say("Line 3.", 1);
sp_hard(&current_sprite, 1);
say("Line 4.", 1);
draw_hard_sprite(&current_sprite);
say("Line 5.", 1);
sp_active(&current_sprite, 0);
say("Line 6.", 1);
playsound(43, 22050, 0,0,0);
say("Line 7.", 1);
//kill this item so it doesn't show up again for this player
if (&hold != 0)
say("Line 8.", 1);
{
say("Line 9.", 1);
editor_type(&hold, 1);
}

September 3rd 2005, 09:19 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Uhm... I meant the say-line where Dink should say "Line 3"...

anyway, you might want to use this:

void hit( void )
{
say("Line 1.", 1);
int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
say("Line 2.", 1);
if (&rcrap == 1)
{
//rock just got hit by a sprite with a script named dam-bomn, I'm gonna
//guess it was the bomb.
//remove rocks hardness and sprite
say("Line 4.", 1);
sp_hard(&current_sprite, 1);
say("Line 5.", 1);
draw_hard_sprite(&current_sprite);
say("Line 6.", 1);
sp_active(&current_sprite, 0);
say("Line 7.", 1);
playsound(43, 22050, 0,0,0);
say("Line 8.", 1);
//kill this item so it doesn't show up again for this player
int &hold = sp_editor_num(&current_sprite);
say("Line 9.", 1);
if (&hold != 0)
say("Line 0.", 1);
editor_type(&hold, 1);
}

My mistake entirely
September 3rd 2005, 08:43 PM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I used that and now I have the orginal problem plus my previous italics one:
My computer crashed when I hit it with my fists
It regenerates when I left the screen and return.

And "Line X" was not displayed when I hit it with my fists.
September 3rd 2005, 09:18 PM
spike.gif
I'm guessing your void main crashes it. Remove it.

This is a script I've used and I can't imagine what could make it not work when using the original Dink scripts. If you've done something to item-bom.c, dam-bom.c or dam-bomn.c that might cause it to work improperly too.

void hit()
{
int &bomba = compare_sprite_script(&missle_source, "dam-bomn");
if (&bomba == 1)
{
sp_hard(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 1);
sp_active(&current_sprite, 0);
}
}