Hey heinekenbottle, I think you done a typing error, shouldnt it be as follows? Note the '
+=' instead of just '='.
while(1)
{
my.x += 5 * (key_z - key_y) * time_step;
my.z += 5 * (key_i - key_u) * time_step;
wait(1);
}
Anyway, another way to look at it is like so (and a bit more flexible IMHO).
function move_up()
{
//Sorry I cant read this comment so I'll leave up & down unchanged
wizard.z += 5; // addiere jedes mal, wenn diese Funktion aufgerufen wird 5 Quants auf die Höhe von wizard
}
function move_down()
{
wizard.z -= 5;
}
function move_ahead()
{
wizard.x += 5*time_step*;
}
function move_back()
{
wizard.x += -5* time_step;
}
function main()
{
//video_mode = 7; // 800x600 pixels
video_switch (8,32,1);
level_load ("Drohne_Levelc.wmb");
//
while(1)
{
if(key_u == 1) move_up();
if(key_j == 1) move_down();
if(key_z == 1) move_ahead();
if(key_y == 1) move_back();
wait(1);
}
}