Just some questions...

Game Editor comments and discussion.

Just some questions...

Postby Djermegandre » Sat Jul 25, 2009 10:39 pm

Hey, I'm new here; how are you doing? Anyway, I'm in the process of learning how to make a platformer game and I'm actually starting to draw sprites for it. However, before I truly get started, there are some things I wanted to know...

1) When my character lands from a jump or from a ledge (either way hitting the ground), I was wondering if it was possible to have the "screen" shake, to simulate a tremor effect. Is it possible? If so, how would I do it?

2) I was also wondering how you would make it so that enemies have multiple hits on them, or even gauges?

Hmm...that's all I can think of for now. Any answers are appreciated.

Is it okay if I come back to this topic for further questions?
So, what goes here?
User avatar
Djermegandre
 
Posts: 4
Joined: Sat Jul 25, 2009 3:07 pm
Score: 1 Give a positive score

Re: Just some questions...

Postby jimmynewguy » Sat Jul 25, 2009 11:36 pm

1) yes, and there are many ways of doing this, the easiest would be making a path, then when the player collides with the top of ground if(jump == 0){//changepath} i can explain better if you don't know variables or paths

2)variables, or just a health bar sprite parented to the enemy, in other words it follows it. then when ever that enemy gets hurt change the animpos up or down (depending on how you drew the sprite) make sure for the health bar sprite you change it's animation direction to stopped so it won't play the animation and you can change it by animposes

and yes you can ask other questions on this post, i gave you some pretty blunt answers, so i'm assuming there is something in there you don't understand, i can either answer more later or someone else will probably clear things up.....i have a very complicated way of thinking about things, i will probably end up confusing you more then you were when you started....welcome to the forums and again just ask :)
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: Just some questions...

Postby Djermegandre » Sun Jul 26, 2009 2:58 am

Thanks a lot for answering. You were right; there were some things in there that made my head spin :P But I'll take it one by one; I think that would be more beneficiary. Would you mind explaining the first one a little more in depth?
So, what goes here?
User avatar
Djermegandre
 
Posts: 4
Joined: Sat Jul 25, 2009 3:07 pm
Score: 1 Give a positive score

Re: Just some questions...

Postby jimmynewguy » Sun Jul 26, 2009 4:57 am

Ah of course lol but if you allready know variables and how to do the "single jump" where the player can't jump infinately then skip to the 2)

1) All right so it's a paltformer so there will be jumping. On the keydown of whatever key you would like to be jump choose script editor. In script editor there will be a click box in the bottom right hand corner. Click it, then click add. Name the variable jump, then click add then enter this code
Code: Select all
if(jump == 1)
{
jump = 0;
yvelocity -= 10;
}

change ten if you need to more to make the player jump higher and less for lower

Then choose collision, then choose topside of ground then enter this code
Code: Select all
jump = 1;

These two codes combined will make the player be able to jump one time at a time, just like in real life. and this variable "jump" will help you set up your shaking screen

2)On the top of the screen where you have File Add Actor ect. there will be a tab for path
click it and add a path name the path shake then choose 100 or so for the frames, then make three points and make sure they are straight going like this
* &
0----------0
where the * is points 1 and 3 will be the & is where point 2 will be
then on the collision on top side of ground(the same script editor from earlier)add a changepath action so the whole code will look like this
Code: Select all
jump = 1;
ChangePath("View", "shake", BOTH_AXIS);

then for the view have a path finish event that changes the path to none

I hope that makes sense and helps, if your confuse then just ask, that's alot to take in
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: Just some questions...

Postby Djermegandre » Sun Jul 26, 2009 5:18 am

Thanks, I'll try it out. :D

EDIT: I tried it out, and I actually had a problem. I input the code exactly as you showed me, but it gave me a message telling me that there were errors in the code. I bypassed it and ran the code anyway and when I did, the result was that the camera started moving to the right. The last part is most likely a result from me drawing the path wrong. In the Script editor, I was supposed to click the Variables/Functions button and input the information for jumping, right?

EDIT AGAIN: I'm having no problems with the code now, but I''m a little confused with your wording on the path. Do you mean that the points are set close together like (1-2-3) or in another way?
So, what goes here?
User avatar
Djermegandre
 
Posts: 4
Joined: Sat Jul 25, 2009 3:07 pm
Score: 1 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron