1
Technical forum / Learning some tricks thanks to SpankTheHero_v0.30
« on: July 07, 2013, 10:18:06 PM »
Hello, I discovered SpankTheHero_v0.30 the technical demo here in this forum, and I have been testing and learning all kind of new things that I didn´t know until now. Well the fact is that I´m trying to understand something a little weird for me.
In the knight script for example, there is this event handler:
This are the coordinates between the knight and the monster, the monster losing a life, and the applied monster_hurt event from the monster.script.
And on the other hand there are the script called attack_key.inc that indicates the sprites used, and the game.script where the keys are set.
The question is, the latter two are connected with the knight script?
Because If I change the name of the event, the animation appears but the event doesn´t work and the knight don´t hurt the monster.
And I don´t find other "slash_right" in all the scripts of the demo!
Well thank you very much for the help, and sorry for my horrible english!!
In the knight script for example, there is this event handler:
Quote
on "slash_right_success"
{if(actor.X<monster.X && monster.X<actor.X+170 && monster.Y<actor.Y+20 && monster.Y>actor.Y-20 && monster_life>0)
{
monster_life = monster_life - 1;
monster.ApplyEvent("monster_hurt");
}
}
This are the coordinates between the knight and the monster, the monster losing a life, and the applied monster_hurt event from the monster.script.
And on the other hand there are the script called attack_key.inc that indicates the sprites used, and the game.script where the keys are set.
The question is, the latter two are connected with the knight script?
Because If I change the name of the event, the animation appears but the event doesn´t work and the knight don´t hurt the monster.
And I don´t find other "slash_right" in all the scripts of the demo!
Well thank you very much for the help, and sorry for my horrible english!!