A little problem...
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.
EDIT 1: I rephrased my problem.
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.
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.
you may have the same problem i did put sp_touch_damage(¤t_sprite, 0); as the first thing in the touch method then put it back to sp_touch_damage(¤t_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.
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.
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 = ¤t_sprite;
}
So you can replace
say("`%You can't go there Dink!", &bs1-fbp);
with:
say("`%You can't go there Dink!", &var1);
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 = ¤t_sprite;
}
So you can replace
say("`%You can't go there Dink!", &bs1-fbp);
with:
say("`%You can't go there Dink!", &var1);
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)
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)
I have had many problems doing it that way the temp variable works good but sp has always given me trouble

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).

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.
EDIT 1: Repharsed my problem. Sometimes I think the problem is my typing...
EDIT 2: I think I'll do the var1 thingy.