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???
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
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???
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...
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.
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
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
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....
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.
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.
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...
Check your system clock... If it's set too far in the future the cookies will automatically delete