The Dink Network

sp_clip_top/bottom/left/right

February 10th 2007, 08:07 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
So how exactly do you use these? I read what it had to say in the DinkC reference, but it doesn't work for me.
If I try using sp_clip_bottom() using any value, it doesn't do anything.
If I use sp_clip_right() sp_clip_left() sp_clip_top() at any value, the sprite disappears. If I use a negative value for this, it blinks once.
I'm pretty sure I'm trying to use it right (even according to cypry's DinkC Editor.)
February 12th 2007, 12:08 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Hmm. It seems to only work if the sprite already has some clipping set by the editor. I'm not sure why.
February 12th 2007, 04:54 AM
fairy.gif
Arik
Peasant He/Him
 
Yup, although it is possible to set the sprite's clipping value through scripts and then change it. In the case of I, Kara Gu's village lasers -

//bottom clip starts at 400
//But first need to initialise clip settings
//To the height and width of the sprite
sp_clip_bottom(&current_sprite, 400);
sp_clip_right(&current_sprite, 105);
//THEN you can change sp_clip_bottom and sp_clip_right