The Dink Network

Reply to Re: making creatures fly

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:
 
 
March 24th 2011, 02:35 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Well, depends on what height level you want the sprite to fly. At Dink's head level? Way above the playable screen?

To make the sprite ignore blue hardness (for hills, rocks, water tiles)
sp_flying(&current_sprite, 1);


If your sprite is too high to be hit by anything
sp_nohit(&current_sprite, 1);


High enough to not be affected by normal hardness?
sp_move_nohard(&current_sprite,1);


And to make it drawn on top of everything if it needs to.
sp_que(&current_sprite,10000);


You may also want to give it a shadow.
int &shadow = create_sprite(0,0,15,&seq,&frame);
sp_brain_parm(&shadow,&current_sprite);
sp_nohit(&shadow,1);
//if flying low set the sp_que to 1, if above everything, use 1000)
sp_que(&current_sprite,^);


Tricky thing with the shadow though is it will use the exact coordinates of the sprite it's bound to. You'll have to manage the offset by graphical means.