The Dink Network

Probably insanely basic DinkC question...

December 21st 2002, 07:30 PM
fairy.gif
Ok, so I have a script where a portal is created. I create it thus:

say_stop("'9Here is the portal....", &current_sprite);

int &portal = create_sprite(199, 202, 6, 169,1); draw_hard_sprite(&portal);

say_stop("Ok!", 1);

But in practice, the portal turns out not-hard. What am I doing wrong?
December 21st 2002, 09:01 PM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
: Ok, so I have a script where a portal is created. I create it thus:

: say_stop("'9Here is the portal....", &current_sprite);

: int &portal = create_sprite(199, 202, 6, 169,1); draw_hard_sprite(&portal);

: say_stop("Ok!", 1);

: But in practice, the portal turns out not-hard. What am I doing wrong?

before drawing hardness, make the portal hard

int &portal = create_sprite(199, 202, 6, 169,1)

sp_hard(&portal,1);

draw_hard_sprite(&portal);

say_stop("Ok!", 1);
December 21st 2002, 10:23 PM
wizardg.gif
Paul
Peasant He/Him United States
 
What joshriot said. But also just a reminder, puting two commands (or even a command and a comment) on one line is advised against. It will work okay with some commands and not with others, so most people jujt avoid doing it.
December 21st 2002, 10:42 PM
fairy.gif
: What joshriot said. But also just a reminder, puting two commands (or even a command and a comment) on one line is advised against. It will work okay with some commands and not with others, so most people jujt avoid doing it.

Heh, I didn't in the acutal script... that's how it managed to paste in the little form thing.
December 22nd 2002, 03:54 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
before drawing hardness, make the portal hard

int &portal = create_sprite(199, 202, 6, 169,1)

sp_hard(&portal,1);

draw_hard_sprite(&portal);

say_stop("Ok!", 1);

Ehm, that should be this to make the portal hard :

sp_hard(&portal, 0);

0 = hardness

1 = no hardness