The Dink Network

making creatures fly

March 24th 2011, 01:29 PM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
I want a little creature in my dmod to fly, how can i do that?
March 24th 2011, 02:32 PM
anon.gif
ghost
Ghost They/Them
 
Hard way: Make 3d dmod
Easy way: make shadow effect
Solution: Don't know. I just had an urge to spam.
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.
March 24th 2011, 02:37 PM
dinkdead.gif
sp_flying(&sprite, 1);

To make it able to go over blue hardness. And add a shadow for the looks as the mysterious ghost mentioned. What exactly do you mean?

Edit: Beaten
March 24th 2011, 03:19 PM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
Thanks