The Dink Network

Dead Dink - spike tiles

December 4th 2009, 08:15 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
Can someone tell me how to set the properties in something lying on the ground thats invisible but when Dink walks over it he will die?

(I did it with a visable sprite and that works fine - but want him to croak if he walks over tiles with spikes? I have put something on the ground - made it invisible and tried the same damage etc in properties but it doesn't work - what am I missing? (Does it need scripted instead
December 4th 2009, 09:27 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I don't think invisible sprites can do much else besides blocking (via hardness) and warping. Could be why touch damage (I assume that's what your using) doesn't work. Try this script.

void main ()
{
int &damage;
sp_nodraw(&current_sprite,1);
sp_nohit(&current_sprite,1);
sp_touch_damage(&current_sprite,-1);
}

void touch ()
{
sp_touch_damage(&current_sprite,0);
//damage him for everything he's got
&damage = &life;
&damage += &defense;
hurt(1,&damage);
//just incase he survives
&life = 0;
}
December 4th 2009, 09:51 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
Thanks rabidwolf9 that is a deliciously murderous script and works really well, appreciate your help.

Just wondering, as the murder/death/kill bit does only work in the middle of the sprite I placed (would this be cause I made it over 100% to cover the entire area) and also only works if the sprite is not set to invisible to start with (tho it makes whatever sprite I use invisible so that's awesome)

EDIT: I love the "just incase he survives" its so evil heheheee

December 4th 2009, 10:34 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
It has to be set as person/creature/normal (name depending on which editor your using) for it to work. This is the only type that will be able to have a script attached.

Secondly, the touch will activate when Dink enters the sprite's hard box. Sizing above 100 usually results in a distortion of the box. This is probably your problem. Just press space to check the hard box and make your adjustments accordingly. Note that if you're using DinkEdit you have to make it hard to see the hard box.
December 4th 2009, 11:25 PM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
You are awesome Rabidwolf9 - thats perfect
Thanks heaps