ForumsProgramming ForumSome Platformer Help!

1 3227
Klemzo
offline
Klemzo
14 posts
Nomad

Hey,

I'm rather new to flash and I want to make a simple platformer where it wouldn't be much of an gameplay but rather adventuring and art.

So I got a basic script from this tutorial:

http://www.newgrounds.com/portal/view/426598

Now I would want to add some stuff:

- script to kill (like spikes or lava)
That would just make you die and put you in dead stance and like throw you to a frame or add something to screen telling you that you died and then you would have a restard button that throws you back to the beginning of level.

- lifes
to make that even more complicated, stuff that hurt you lifes, I don't know like fire or stuff like that

I had life then a script that when you touch something it decreases your lifes, but that meant if it was set to decrease 1 life it decreased 100 in just a second (there was no "cooldown" between you being hurt&quot

- ducking
Like something basic I could add that makes you duck when you press down.

- Kind an off topic question. How can I scretch the screen to infinity? I mean, I keep drawing something and the screen keeps streching, but then comes the limit and I can't strech on no more. So that means the levels for platformer are very short. How do platformers make levels so long without adding "rooms" and they just keep going and going? Do they make everything really small (like they draw on 1000% zoom all the time), or what?

Thanks a lot in advance!

  • 1 Reply
rjbman
offline
rjbman
215 posts
Nomad

Alright well for lives, if you want a cool down do something like this:

var lifeCooldown:Number
if (hitTestObject){
if (lifeCooldown==0){
Player.lives-=;
lifeCooldown=100;
}
}

then in an enter_frame, subtract 1 from life cooldown if it doesn't equal 0.

Showing 1-1 of 1