Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 16/03/2004 01:38:06

Title: Jumping??? Can it be done???
Post by: on Tue 16/03/2004 01:38:06
How would you make it so that your character could jump on key press or by mouse click? I can't find anywhere in the forums that this question has been answered.  If it can be done, I belive it will help us all.  So, let's try to find out how.

I have thought about using a mouse cursor of a man jumping.  Say there is a gap between walkable areas.  Between them is a hotspot that interacts by killing you when walked on.  A third walkable area arcs over the hotspot and connects the other walkable areas.  It DOES NOT TOUCH THEM!!! Now, there is another hotspot on one side of the gap.  When clicked on with the jump cursor.  Use script to move the player character to walkable area 3 (the arc).  Then MoveCharacter across the walkable area while using a jumping animation.  When the character is done moving MoveCharacter to walkable area 1 (the part on the other side of the gap).

Do you think this would work for jumping???
Title: Re:Jumping??? Can it be done???
Post by: 00jon00 on Tue 16/03/2004 02:39:31
I made it so a character could jump in my game by just animating the character-Here was my script:

if (IsKeyPressed (32) == 1) {
            SetCharacterView(ENM, 6);
            AnimateCharacter(ENM, 0, 0, 0);
            while(character[ENM].animating) Wait();
            ReleaseCharacterView(ENM);
      }
I did that for each dierection, and it worked for me....I had to draw the animations for jumping, and make them a view...But hey, it works...for me
Title: Re:Jumping??? Can it be done???
Post by: on Tue 16/03/2004 03:07:19
But would your code allow the player character to die if he/she didn't jump all the way across a gap, or, since your sprite is still touching the "ground" would you die even if you jumped over the gap because your sprite was touching it???
Title: Re:Jumping??? Can it be done???
Post by: 00jon00 on Tue 16/03/2004 03:22:05
Well, It probably could if you altered it with stuff (hotspots, regions, etc) I'm not much of a programmer.  I know java but thats about it lol, but I think you would have to use hotspots, etc.  You probably need to talk to a-v-o...
Title: Re:Jumping??? Can it be done???
Post by: Isegrim on Tue 16/03/2004 09:16:36
Maybe you should check out the "Platformerius"-Game. It's a Jump'n'Run game, done with AGS and it is open source. Can be found in the Games section of the main page.
Title: Re:Jumping??? Can it be done???
Post by: Darth Mandarb on Tue 16/03/2004 09:25:45
I'm planning on a 'jump' verb for my next project.

It will only be activated (non-greyed out) when you can use it.

You click 'jump' and then click on the gap/hole/puddle/cliff/etc. and it'll play a different character view animation of the character leaping (and I plan on having different types of animations for diving/jumping/etc.)

I think I can make this work, and I think it's more 'adventure gamey' this way rather than a keypress jump, which would feel more platformy to me.

But I'd like to see what you come up with ;)

~ d
Title: Re:Jumping??? Can it be done???
Post by: rtf on Tue 16/03/2004 19:58:13
I just thought I could put it here, since I can't PM him  ;):

Akumayo, it seems like you never can log in.
I think that you have to have Cookies enabled in your browser if you want to log back in.  If you do have cookies enabled and are itching to log in, try talking to CJ
Title: Re:Jumping??? Can it be done???
Post by: 00jon00 on Tue 16/03/2004 23:18:58
Darth Mandarb, That sounds like a pretty good idea...wish I would have thought of that 8) lol I'll stick with my key press jumping...You should show me the results of your idea though one-day....
Title: Re:Jumping??? Can it be done???
Post by: LordHart on Tue 16/03/2004 23:26:41
Or try a good browser/computer combo... I suggest Mozilla Firefox, or just plain Mozilla... and then a comletely new computer.

Anyway, I agree with Isegrim about Platformerus... it is probably you're best bet when it comes to jumping, since it is pretty much a platform game thingy for AGS.

http://www.agsforums.com/games.php?category=3

Thats the page that you can find it on, at the AGS website.
Title: Re:Jumping??? Can it be done???
Post by: on Wed 17/03/2004 17:52:51
I can log in, but when I do, I am taken back to the main forums page, and when I go to a section, the system logs me out.  I log back in, and I am taken to the main forums page, and when I go to a section, the system logs me out.  I do this for about an hour and give up.  Anyway, I downloaded that ninja game thingy and will try to work it out.  Thanks for all you input.
Title: Re:Jumping??? Can it be done???
Post by: Isegrim on Thu 18/03/2004 16:16:47
I think I know that problem. Logging in requires that you allow cookies from that site. Check your cookie settings and if they are very strict, override them by allowing any cookies from www.agsforums.com.

hope it helps...
Title: Re:Jumping??? Can it be done???
Post by: Inkoddi on Thu 18/03/2004 16:41:02
Check your system clock... If it's set too far in the future the cookies will automatically delete