Need help with my latest spell
:(
I have made a totally new spell, "Golem1/2/3/4" that will make a soldier who kills your enemies and you still get the experience! Well, but i have a problem with the script. When you cast the spell, the golem will appear in the middle of the screen, X: 320 Y: 210, But when theres a wall or holl at that location he gets stuck! I tried and tried to use your own, dinks, X and Y to let the golem start near you. Heres my script, Item-Gl1.c :
//The Grey Man spell
//This is, i think, the most difficult spell ever!
void use(void)
{
//You may only use 1 golem offcourse!
hurt(&man, 1000);
&man = create_sprite(320,210,9,273,1);
sp_script(&man, "golem1");
&magic_level = 0;
}
void arm(void)
{
int &man;
&magic_cost = 500;
}
void disarm(void)
{
&magic_cost = 0;
&magic_level = 0;
}
Heres the second, golem1.c :
void main(void)
{
//Well this is the most difficult part!
sp_base_walk(¤t_sprite, 270);
sp_base_attack(¤t_sprite, 710);
sp_distance(¤t_sprite, 60);
sp_strength(¤t_sprite, 20);
sp_defense(¤t_sprite, 10);
sp_hitpoints(¤t_sprite, 50);
sp_speed(¤t_sprite, 2);
sp_timing(¤t_sprite, 66);
sp_brain(¤t_sprite, 9);
}
void hit(void)
{
say("Arghh!", ¤t_sprite);
sp_target(¤t_sprite, &enemy_sprite);
}
void die(void)
{
}
CAN YOU HELP ME???
2nd problem, when i arm the spell, the spell will charge up but when i use it, it charges up again but the green line stays! How can i fix that?!
Thanx for reading,
Martijn
//PLEASE DONT STEAL MY SPELL, I'LL GIVE IT TO THE D NETWORK SO YOU CAN DOWNLOAD IT!
I have made a totally new spell, "Golem1/2/3/4" that will make a soldier who kills your enemies and you still get the experience! Well, but i have a problem with the script. When you cast the spell, the golem will appear in the middle of the screen, X: 320 Y: 210, But when theres a wall or holl at that location he gets stuck! I tried and tried to use your own, dinks, X and Y to let the golem start near you. Heres my script, Item-Gl1.c :
//The Grey Man spell
//This is, i think, the most difficult spell ever!
void use(void)
{
//You may only use 1 golem offcourse!
hurt(&man, 1000);
&man = create_sprite(320,210,9,273,1);
sp_script(&man, "golem1");
&magic_level = 0;
}
void arm(void)
{
int &man;
&magic_cost = 500;
}
void disarm(void)
{
&magic_cost = 0;
&magic_level = 0;
}
Heres the second, golem1.c :
void main(void)
{
//Well this is the most difficult part!
sp_base_walk(¤t_sprite, 270);
sp_base_attack(¤t_sprite, 710);
sp_distance(¤t_sprite, 60);
sp_strength(¤t_sprite, 20);
sp_defense(¤t_sprite, 10);
sp_hitpoints(¤t_sprite, 50);
sp_speed(¤t_sprite, 2);
sp_timing(¤t_sprite, 66);
sp_brain(¤t_sprite, 9);
}
void hit(void)
{
say("Arghh!", ¤t_sprite);
sp_target(¤t_sprite, &enemy_sprite);
}
void die(void)
{
}
CAN YOU HELP ME???
2nd problem, when i arm the spell, the spell will charge up but when i use it, it charges up again but the green line stays! How can i fix that?!
Thanx for reading,
Martijn
//PLEASE DONT STEAL MY SPELL, I'LL GIVE IT TO THE D NETWORK SO YOU CAN DOWNLOAD IT!