The Neverhod 2 - moonwalking :(

Talk about making games.

Re: The Neverhod 2 - moonwalking :(

Postby skydereign » Fri Jul 17, 2009 12:58 am

See if this is what you wanted. Sorry if my previous post was confusing. I took out the space button, as I was starting from scratch, but adding it shouldn't cause any problems, but if it does, I'll try it myself, and post the fix.
Attachments
anti.zip
(14.89 MiB) Downloaded 84 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Fri Jul 17, 2009 9:21 am

:) :) Yes, this is that what I want. Just try to remove a few problems and add that KEY SPACE.
One problem that I saw: when you are holding key right and press key left, he will stop, and then when you just
relase key right, animation is like hes moveing and then hes stopping.

Just if is possible. When you just press key LEFT or RIGHT, no holding that keys, he make step left or right and move for x=x+15;

If you can this, if not, never mind. Thank you man.

:)

CAmPeR
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Fri Jul 17, 2009 9:24 am

Just Sky, I was thinking today, if is too complicated to make walking, I can make that Klayman run, not walk, it means, not start walk, walk and stop walk.

Just to do how hes running. If you cant do this with walking, I will do that with running. I dont know...
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby skydereign » Fri Jul 17, 2009 9:58 am

Like this? Wasn't quite sure, but it seems to work.
Attachments
anti.zip
(14.89 MiB) Downloaded 87 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Fri Jul 17, 2009 10:29 am

Yeeees man :) Awesome. Good job. Just question, is possible to make footstep sound?

So, everytime when he stay one one foot, play sound BUM.

So in script editor, play sound... wait for frame... ?

CAn you make it?

Because when I make this, it doesnt work, I put this in draw actor, but then I head that sound 2x or more. To make this with timer, that too complicated and
I dont have any ideas how to do this... can you just make this one thing and thats all... :)

Thank you man, you are really helper. Everytime when I need help, you help me. Thanks :)

I will give you + ;)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby skydereign » Fri Jul 17, 2009 10:41 am

Replace the script in draw actor with this. I can't do sound on gameEditor, as I use Linux and it doesn't agree with pulse audio, but this should work. The noise should sound when the animation's foot hits the ground, which is animpos 5. So, in the STATE 8 and 9, stepping, if the animpos is 5, then play the noise. If you don't know, replace the // Put play sound here with the PlaySound function with your step noise.
Code: Select all
char * key = GetKeyState();

yvelocity+=1.2;
switch(STATE)
{
    case 2:
    if(key[KEY_RIGHT]==0)
    {
        ChangeAnimation("Event Actor", "Player STEP right 01", FORWARD);
        x+=15;
        STATE=8;
    }
    break;
    case 3:
    if(key[KEY_LEFT]==0)
    {
        ChangeAnimation("Event Actor", "Player STEP left 01", FORWARD);
        x-=15;
        STATE=9;
    }
    break;
    case 4:
    x+=2.9;
    break;
 
    case 5:
    x-=2.9;
    break;

    case 8:
   if(animpos==5)
   {
       // Put play sound here
   }
   case 9:
   if(animpos==5)
   {
       // Put play sound here
   }
}
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Fri Jul 17, 2009 11:37 am

Thnak you Skydereing. That code doesnt work, but never mind. I will try to do that. Anyway, thx, but there is one big BUG.

When are you walking right and press key LEFT and you are holding key right, hes stopping right, but when the animation is finish, he will play animation like hes starting to walk right

Try it and you will see, hold right, press left key and dont relase right and you will see whats wrong, if you can fix this please?... :)

Thank you, CAmPeR
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby skydereign » Fri Jul 17, 2009 11:40 pm

Sorry about that... The sound fix doesn't work? What happens? In the draw actor, you should be able to just add this
Code: Select all
if(STATE== 8 || STATE==9)
{
    if(animpos==5)
    {
        PlaySound2("data/BUM.wav", 1, 1, 0);
    }
}
Attachments
anti.zip
(14.89 MiB) Downloaded 92 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Sat Jul 18, 2009 9:46 am

Well with that sound, it works only when I press key right and when player make step right. And when I hear tthat sound, I is heared 3x

I dont know, I have idea to make this with times. So When I press key RIGht, create time with 50ms, and when is that times
Play sound ... but wait for frames,... and When you relase KEY RIGHT destroy times... ?

Dont know if is this good idea.. :)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Sat Jul 18, 2009 9:58 am

Yahooo :) :) Man, this is that what I want. :)

Thank you very much Skydereign. :)

You are good friend :D
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby skydereign » Sat Jul 18, 2009 9:17 pm

Actually I think I know why that is a problem... It is because your framerate is not the same as your animations, so it plays multiple times... There is a way around that, but it seems you have it covered.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Sat Jul 18, 2009 10:24 pm

Well, I dont have make it today. Today I have made new house:
Image 4.jpg


and I have put it in to the game. If you can tell me how to do that animations are the same like frames or how do you wrote it...

Can you tell me more about that please? Thank you,

CAmPeR

:)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby jimmynewguy » Sun Jul 19, 2009 2:02 am

do you actually fire those? (like put them in the oven or w/e) cause that takes a while...... :)
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby DST » Sun Jul 19, 2009 10:01 am

To prevent sounds from playing more than once, use a variable:
make a global integer in the variables tab.

Any event>
Code: Select all
if(sound1==0){
sound1=PlaySound2("data/BUM.wav", 1, 1, 0);
}


You might need an event to reset the variable to 0 again, i'm on linux right now so i can't test it (xp died from the youtube bug, if you get strange errors on youtube beware!).
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: The Neverhod 2 - moonwalking :(

Postby Camper1995 » Sun Jul 19, 2009 12:47 pm

:D Thx DST, I will try to do this. :)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

PreviousNext

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest