The Dink Network

A little problem...

September 18th 2005, 03:47 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I had made my own tiles replacing some snow rock tiles and I altered their hardness to the way I wanted. But when I returned to a screen with water tiles, their hardness had changed to the hardness I hade given my own tiles. How do I change it back?

EDIT 1: I rephrased my problem.
September 23rd 2005, 07:40 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
Here's the deal. I have a script that when Dink tounches some invisible sprites, it forces Dink to move down and freeze until a certain sprite leaves. The thing is, I want the sprite to go something like "You can't go there Dink," when the script is activated but I can't. Here's the script:

void main( void )
{
sp_nodraw(¤t_sprite, 1);
sp_touch_damage(¤t_sprite, -1);
sp_nohit(¤t_sprite, 1);
}

void hit( void )
{
return;
}

void touch( void )
{
freeze(1);
int &dy = sp_y(1, -1);
&dy += 30;
move_stop(1, 2, &dy, 1);
say("`%You can't go there Dink!", &bs1-fbp);
//bs1-fbp is the script name atached to the other sprite
unfreeze(1);
}

Thanks for any help.
September 23rd 2005, 09:30 AM
goblins.gif
igloo15
Peasant He/Him
 
you may have the same problem i did put sp_touch_damage(&current_sprite, 0); as the first thing in the touch method then put it back to sp_touch_damage(&current_sprite, -1); at the end of the method.

P.S you can't use the script name attached to another sprite to as the name of the sprite. You will have to find the sprite number and then use that.
September 23rd 2005, 03:22 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
The line:
say("`%You can't go there Dink!", &bs1-fbp);
won't work, the easy way to fix this is adding a new global variable (&var1 by example).
Then you add in the script bs1-fbp:
void main(void)
{
&var1 = &current_sprite;
}

So you can replace
say("`%You can't go there Dink!", &bs1-fbp);
with:
say("`%You can't go there Dink!", &var1);
September 23rd 2005, 04:45 PM
spike.gif
The easiest way is to go to the editor, press "I" to check the sprite number of bs1-fbp and then use it to make the guy talk.

eg.
int &bs1-fbp = sp(13);
say("`%You can't go there Dink!", &bs1-fbp);

(13 is the sprite nuber of &bs1-fbp)

freeze(); and unfreeze(); are useless in your sript btw. (move(); automatically unfreezes Dink, and since you move Dink in the very beginning the freeze(); at the start won't do anything)
September 23rd 2005, 05:47 PM
goblins.gif
igloo15
Peasant He/Him
 
I have had many problems doing it that way the temp variable works good but sp has always given me trouble
September 24th 2005, 01:10 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Yeah I had problems using that too, so I prefer to use a global. You can re-use this global many times, so you only need two or three of this sort in a DMOD (three is probably only neccesary if you want to do something special).
September 25th 2005, 08:42 AM
duckdie.gif
BeheadedDuck
Peasant He/Him Australia
So lazy... So incredibly lazy... 
I know I am going to soung stupid, but I think everybody has established that. Is the sprite number the number outside the black box or the one inside the black box?

EDIT 1: Repharsed my problem. Sometimes I think the problem is my typing...
EDIT 2: I think I'll do the var1 thingy.