I have an entity wich can move up and down with the tilt move by using 2 different keys. The problem is that I want to move the entity with one key. This is the code for the movement of the entity.
Code:
my.skill15 = max(my.skill15,-15);
my.skill15 = min(my.skill15,0);
if(key_e == 1)
{
my.skill15 -= 0.5*time_step;
}
if(key_d == 1)
{
my.skill15 += 0.5*time_step;
}
ent_animate(my,NULL,0,0);
ent_bonerotate(my,"arm_axis",vector(0,my.skill15,0));
You see that the keys e and d are used to move the entity. But I want to move the entity by only using the e button, so it is moving up and down.
Is there a way to do something like that?