Page 1 of 2

Asterix and Obelix

PostPosted: Fri Apr 03, 2009 9:03 pm
by Camper1995
Hi ppl. First time, I maked antimoonwalking. BUT! Somethink is wrong with JUMPING!
When you press key UP, your character jump, but not only one time. When are you pressing key UP, he
is jumping.
I know,
Code: Select all
if(canjump==1)
{
   yvelocity=-12;
   canjump=0;
}


But somethink is wrong. Can anyone fix me this? I dont know what to do.
I am tryed to fix this 2 hour, but no results.

Can anyone help me please?
I know, I am boring with my stupid questions, but I am not expert. :D

!! At first time, I not used jump easy scripts.!!
It was not easy to create this.


Thnx

Asterix and Obelix JPEG.JPG


Asterix and Obelix - Plz, help me.zip
(205.94 KiB) Downloaded 120 times


Thanks :D

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Fri Apr 03, 2009 9:52 pm
by jimmynewguy
here i fixed obelix but asterix you can do :)

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 11:32 am
by Camper1995
Um, sorry but, its not fixed. I press key UP 3x and Obelix jump 3x.
:(

Do you have ICQ or Skype or somethink like that? :wink:

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 12:04 pm
by Camper1995
I think, somethink is wrong with my GameEditor. Every game, where is only one jumping, character jump infinity times.
How to fix this? Can I reinstall GameEditor? Whats the problem? :cry:

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 12:28 pm
by Camper1995
Oh my god. This is crazy. I reinstall GE but nothink else happened. Asterix dont jump only one time.
So, I try to make very very easy and basic game with Asterix.
but...

DONT WORK!! :cry: :cry: :cry:

I dont know what to do more.

Look and this and say please, what is wrong.

OMG.zip
(200.66 KiB) Downloaded 116 times


:cry:

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 12:32 pm
by asmodeus
canjump is global! While the other is on ground and sets canjump to one, the other can jump as often as he wants.

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 12:38 pm
by Camper1995
Oh, I see that error. There is only one =

so I must write:
Code: Select all
if(canjump==1)
{
....
}


But in that game, where are Asterix and Obelix that doesnt work... Why?

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 1:01 pm
by Camper1995
WAHOOOOO... Finaly, it works... :) :) :) :) :)

I am so happy :D

Problem was in GE. When i write that script in Asterix and in Obelix, it works.
But when I copy that scripts from Obelix to Asterix, it doesnt work..
Huh. I Make this stupid scripts 2 hours. :D

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 5:45 pm
by jimmynewguy
Camper1995 wrote:Um, sorry but, its not fixed. I press key UP 3x and Obelix jump 3x.
:(

Do you have ICQ or Skype or somethink like that? :wink:


oops.... i helped with moonwalking not jumping i read your post wrong.

and i dont have ICQ or Skype, why? :)

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sat Apr 04, 2009 9:53 pm
by Camper1995
ok no problem :D I do it and it works very good.
Here is game. You can select between Asterix and Obelix and with Obelix you can smash blocks and so by
pressing SPACE. Only when you are in air, you can press SPACE More comming soon... :D

Use key DOWN to crouch.

Asterix and Obelix - Lost in time.zip
(858.02 KiB) Downloaded 113 times


p.s.: How can I make better smoke?

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sun Apr 05, 2009 1:19 am
by skydereign
You might want to make the smoke less rigid, but I think it looks alright if you put in this code.
Smoke->DrawActor->Script Editor
Code: Select all
transp+=.05;
if (transp>=.80)
{
    DestroyActor("Event Actor");
}


Another thing, do you know there is still moonwalking? Or a version of it. If you jump move left, then right, then left again, or similar, you will moonwalk. To fix this it is the same code implemented in draw, or even easier upon hitting the ground. If you are using a direction variable then you set it appropriately, if key right is pressed and key left is pressed.

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sun Apr 05, 2009 7:50 am
by Camper1995
yea yea, so i must to write this: Draw actor...
Code: Select all
char *key=GetKeyState();
if(key[KEY_LEFT]==1&&key[KEY_RIGHT]==1)
{
  What to do?
}


Thanks for the somke effect :)

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sun Apr 05, 2009 8:06 am
by skydereign
Hmm... You did the antimoonwalking through keydown events. So you don't have a central draw script. Essentially, you would need to be able to determine that you are in the air, and that you are moving. And add a collision event that would set you to walk, if it is appropriate. I could rework your game so that it is fixed if you want. It is really more variable work, you have the ability to determine if Asterix is in the air with canjump, and if moving is appropriate, key[KEY_(Direction)]. So when you are in air, and depending on direction, you would set animation to jump. But you need also to tell is after the jumping animation.

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sun Apr 05, 2009 11:55 am
by Camper1995
Yeah, but I was trying to put all codes in draw actor, but then my character jump infinity times. So when I press key up 3x, he jump 3x.
:?

Re: Asterix and Obelix - Somethink wrong with moonwalking?

PostPosted: Sun Apr 05, 2009 12:06 pm
by Camper1995
Yeah man! At first time in my life I do "antimoonwalking" :) :)

So, here are results: Press SPACE BAR to do somethink special.
I know, I must do on that "super" Asterix on keydown event. 8)

A and O - Antimoonwalking.zip
(1.62 MiB) Downloaded 112 times


Enjoy :D