brassweasel's Profile
You don't have to do that. I've done this sort of thing in my dmods before including with echoes. Look at some of the scripts such as ghost1.c below.
It is even simpler for a non-directional sprite.
void main(void)
{
preload_seq(876);
int &crap = random(3, 3);
sp_speed(¤t_sprite, &crap);
sp_brain(¤t_sprite, 9);
sp_base_walk(¤t_sprite, -1);
sp_touch_damage(¤t_sprite, 6);
sp_hitpoints(¤t_sprite, 12);
sp_defense(¤t_sprite, 3);
sp_exp(¤t_sprite, 8);
//sp_target(¤t_sprite, &enemy_sprite);
int &dir;
int &fr = 0;
int &x1 = 1;
int &ct1 = 0;
toploop:
&dir = sp_dir(¤t_sprite, -1);
&fr = 0;
if(&dir == 1)
{
&fr = 0;
}
if(&dir == 4)
{
&fr = 0;
}
if(&dir == 3)
{
&fr = 2;
}
if(&dir == 2)
{
&fr = 2;
}
if(&dir == 7)
{
&fr = 4;
}
if(&dir == 8)
{
&fr = 4;
}
if(&dir == 9)
{
&fr = 6;
}
if(&dir == 6)
{
&fr = 6;
}
&fr += &x1;
sp_pframe(¤t_sprite, &fr);
&ct1 += 1;
if(&ct1 > 2)
{
&ct1 = 0;
&x1 += 1;
}
if(&x1 > 2)
{
&x1 = 1;
}
wait(33);
wait(99);
goto toploop;
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &junk = create_sprite(&save_x, &save_y, 0, 876, 9);
sp_que(&junk, 1);
external("emake","small");
}
It is even simpler for a non-directional sprite.
void main(void)
{
preload_seq(876);
int &crap = random(3, 3);
sp_speed(¤t_sprite, &crap);
sp_brain(¤t_sprite, 9);
sp_base_walk(¤t_sprite, -1);
sp_touch_damage(¤t_sprite, 6);
sp_hitpoints(¤t_sprite, 12);
sp_defense(¤t_sprite, 3);
sp_exp(¤t_sprite, 8);
//sp_target(¤t_sprite, &enemy_sprite);
int &dir;
int &fr = 0;
int &x1 = 1;
int &ct1 = 0;
toploop:
&dir = sp_dir(¤t_sprite, -1);
&fr = 0;
if(&dir == 1)
{
&fr = 0;
}
if(&dir == 4)
{
&fr = 0;
}
if(&dir == 3)
{
&fr = 2;
}
if(&dir == 2)
{
&fr = 2;
}
if(&dir == 7)
{
&fr = 4;
}
if(&dir == 8)
{
&fr = 4;
}
if(&dir == 9)
{
&fr = 6;
}
if(&dir == 6)
{
&fr = 6;
}
&fr += &x1;
sp_pframe(¤t_sprite, &fr);
&ct1 += 1;
if(&ct1 > 2)
{
&ct1 = 0;
&x1 += 1;
}
if(&x1 > 2)
{
&x1 = 1;
}
wait(33);
wait(99);
goto toploop;
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
&save_x = sp_x(¤t_sprite, -1);
&save_y = sp_y(¤t_sprite, -1);
int &junk = create_sprite(&save_x, &save_y, 0, 876, 9);
sp_que(&junk, 1);
external("emake","small");
}
brassweasel has released 6 files
Title | Category | Avg | Updated |
---|---|---|---|
Search (The) | D-Mod, Romp | ![]() | September 28th, 2018 |
Trees, bushes, rocks, plants | Development, Graphics | N/A | June 6th, 2016 |
Orb of Darkness, the | D-Mod, Quest | ![]() | May 28th, 2016 |
Echoes of the Ancients | D-Mod, Quest | ![]() | January 17th, 2016 |
Solstice | D-Mod, Romp | ![]() | June 24th, 2015 |
Atonement | D-Mod, Romp | ![]() | May 13th, 2015 |
brassweasel has written 4 reviews
Title | File | Type | Score | Date |
---|---|---|---|---|
exactly what the author intended | Blacksmith's Trail (The) | Featured | ![]() | December 20th, 2015 |
I found this dmod annoying. | Picnic Perils | Featured | ![]() | December 20th, 2015 |
decent first effort | Silence | Normal | ![]() | August 5th, 2015 |
not good at all | Sour Gummy Worms | Normal | ![]() | August 4th, 2015 |
brassweasel has taken 6 screenshots
Screenshot | File | Date |
---|---|---|
![]() |
Trees, bushes, rocks, plants | June 6th, 2016 |
![]() |
Echoes of the Ancients | January 17th, 2016 |
![]() |
Echoes of the Ancients | January 17th, 2016 |
![]() |
Solstice | June 24th, 2015 |
![]() |
Orb of Darkness, the | June 5th, 2015 |
![]() |
Orb of Darkness, the | April 15th, 2015 |