The Dink Network

WinDinkEdit Plus: How to make a thing die?

July 15th 2007, 06:51 PM
slayer.gif
A non-living thing, like a tree, a bush, et cetera.
July 15th 2007, 07:43 PM
boncag.gif
Znex
Peasant He/Him Australia
Oh hey. 
Trees and bushes live! What are you talking about?!
July 15th 2007, 07:51 PM
dinkdead.gif
Aren't all sprites essentially the same, just some don't have a brain or speed?
I would think they die in the same way as any enemy sprite, or use sp_active(&current_sprite, 0); somehow, but then I might be wrong...
July 16th 2007, 06:07 AM
slayer.gif
Then how to kill a "living" sprite.
July 17th 2007, 02:00 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
What do you mean by kill? Do you mean just make it inactive, or kill it and remove it and its script from the game? Unless you attached the script to something else.
July 17th 2007, 05:10 AM
slayer.gif
Kill it and remove it's script from the game.
July 17th 2007, 05:13 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Uh, I think sp_kill(&current...); should work.
July 17th 2007, 05:16 AM
slayer.gif
Nah, nothing happens.
July 17th 2007, 06:47 AM
spike.gif
sp_active(&current_sprite,0);
int &rememberimdead = sp_editor_num(&current_sprite);
editor_type(&rememberimdead,1);
July 17th 2007, 10:07 AM
slayer.gif
It worked. Now, how to make it spill a modified "blood explosion" thing when it dies?
July 17th 2007, 10:53 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Try this.

int &BloodExplosion = create_sprite(000, 000, 0, 164, 1);
sp_seq(&BloodExplosion, 164);
Wait(500);
//Don't know really how long that is necessary to wait...
sp_active(&BloodExplosion, 0);
July 17th 2007, 11:01 AM
slayer.gif
Oh cool, it works. Except that it appears in the very upper left corner of my screen.
July 17th 2007, 11:11 AM
pq_cthunik.gif
GOKUSSJ6
Peasant He/Him Poland
Everyone should get a pizza for free in each week. 
why don't you try this:
int &somespritex = sp_x(&current_sprite, -1);
int &somespritey = sp_y(&current_sprite, -1);
int &bloodexp = create_sprite(&somespritex, &somespritey, 7, 164, 1);
sp_seq(&bloodexp, 164);
wait(500);
sp_active(&bloodexp, 0);
July 17th 2007, 11:22 AM
anon.gif
Marpro
Ghost They/Them
 
Vukodlak... You must put in cordinates where you want your explosion to appear (create_sprite(000<-- HERE, 000<--- AND HERE, 0, 164, 1) I strongly recommend Rudiment of Scripting, it'll teach you stuffs like that and muuch more.
July 17th 2007, 06:43 PM
slayer.gif
I already did, but it doesn't teach me stuff like that.

Anyway... The script I use applies to multiple sprites, so I can't really use the script Marpro suggested. How do I make it so the blood explosion appears on the location of the sprite?
July 18th 2007, 02:32 AM
pq_cthunik.gif
GOKUSSJ6
Peasant He/Him Poland
Everyone should get a pizza for free in each week. 
Vukodlak!Did you used my script?
July 18th 2007, 04:11 AM
burntree.gif
Unreal
Peasant He/Him Australia
 
I belive the correct term is
"Vukodlak!Did you use my script?"

People these days, don't they know english honestly >
July 18th 2007, 05:11 AM
boncag.gif
Znex
Peasant He/Him Australia
Oh hey. 
And I believe that the correct terms are
"I believe the correct term is 'Vukodlak! Did you use my script?'"
and
"People these days, don't they know English?! Honestly... "

By the looks of it, I know English better than you. MUHAHAHAHHAHAHAHAHHHAHAHAHHAHAHAHAHAHHAHAHAHAHAHA!!

...

Ack! I need to stop taking those insanity pills.
July 18th 2007, 07:17 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
You need to stop posting.
July 18th 2007, 07:27 AM
dinkdead.gif
If it's for all sprites in your D-Mod you could just replace the original graphics.
July 18th 2007, 10:05 AM
slayer.gif
What if it's not?
July 18th 2007, 02:06 PM
dinkdead.gif
Then I don't know.
Try what GOKUSSJ6 suggested.