Dead Dink - spike tiles
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
(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
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(¤t_sprite,1); sp_nohit(¤t_sprite,1); sp_touch_damage(¤t_sprite,-1); } void touch () { sp_touch_damage(¤t_sprite,0); //damage him for everything he's got &damage = &life; &damage += &defense; hurt(1,&damage); //just incase he survives &life = 0; }
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
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
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.
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.