The Dink Network

Reply to Re: Scripting a graphic

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 6th 2007, 04:14 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
And you forgot something else, that is to draw the hardness. The sprite you made is 'hard', but Dink can still walk through it. So add: draw_hard_sprite(&sprite); after the sp_hard(&sprite,0); command. So the total thing should look like:

void main(void)
{
//let's make the sprite
int &sprite = create_sprite(&spritex, &spritey, &spritebrain, 335, 1)

//make it hard:
sp_hard(&sprite, 0);
draw_hard_sprite(&sprite);

//let's make it twice as large:
sp_size(&sprite, 200);

//A bit of touch damage:
sp_touch_damage(&sprite, value_goes_here);
}

About your problem with the hardness mode, when you press 'E' the yellow blocks that are apearing should just work like normal tiles. Exept that they are invisible and are simply for making areas hard.