in this demo i want someone or my teacher the Great LCL to tell my about my
animation controller
if(xvelocity>5)
{
xvelocity = 5;
}
else if(xvelocity<-5)
{
xvelocity = -5;
}
if(y>view.y+480)
{
DestroyActor("Player");
}
nightFall16 wrote:haha thanks jonathang the graphics ready made by a friend
nightFall16 wrote:and thanks for the tips i'll make sure to apply these changes to my game like you said
the death idea when getting off the view is great
i'll try to finish my first complete level and let all of you give me some judges
wish me the best and help me with more comments and tricks to over come
any glitch or animations problem if you notice some
THANKS jonathang
nightFall16 wrote:hahaha yap the death idea is basic hhhahhah can't stop laughing cuz i said it the wrong way(i'am not english just in case you notice my stupid grammar hha and spelling )
now as you said i tried to apply the changes but a new problem appeared
i can't use xvelocity thing cuz :just take a look to my code
player -->draw actor -->: i did not use any key down event at all, and all of my controls are managed in the draw actor event
this the first part of the code
- Code: Select all
char*key =GetKeyState();
int speed = 6;
yvelocity++;
x+=speed*dir*walk; <-- here the problem the player starts shaking like jelly when you try to press any key(left or right)
if(key[KEY_RIGHT]==1&&key[KEY_LEFT]== 0&&walk == 0&&cjump == 1)
{
walk = 1;
dir = 1;
ChangeAnimation("Event Actor", "Right", NO_CHANGE);
}
if(key[KEY_RIGHT]==0&&key[KEY_LEFT]== 1&&walk == 0&&cjump == 1)
{
walk = 1;
dir = -1;
ChangeAnimation("Event Actor", "Left", NO_CHANGE);
}
beside all of that my diamond counter never show up when you run the game (z depth problem )when i parented it with the view it vanish otherwise not
jonathang wrote:The movement is a bit too stiff. For going left or right, I recommend using xvelocity instead of x+=5 or x-=5. This in turn can make the stiff jump controls much easier to deal with. Make the player jump straight up, but can move around on the air using left and right, which can be done if you applied the key down for left and right is using xvelocity. Of course, limit the speed when applying the xvelocity for your movement, like...
Player -> Actor Control -> Draw Actor
- Code: Select all
if(xvelocity>5)
{
xvelocity = 5;
}
else if(xvelocity<-5)
{
xvelocity = -5;
}
Users browsing this forum: No registered users and 1 guest