Pages: 1
Topic closed
Français :
Je suis français, donc ce sera plus clair comme ça
J’essaie de faire un jeu de plateforme, avec Dark Vador mais je n'arrive pas ale faire sauter de façon réaliste. Je peux le faire sauter, mais c'est comme si il se téléportait un peu plus haut, puis revenait. Pouvez vous m'aider?
Encore une chose, imaginez qu'un monstre l'attaque. Il utilise Barre d'espace pour attaquer mais si le monstre le touche quand il ne fait pas barre d'espace, alors Dark Vador perd une vie. Comment faire en sorte qu'il perde quand il est sous un certain costume et qu'il gagne quand il est sous un autre costume? Merci!
English :
I try to make a platformer game, with Dark Vador but I do not manage ale to blow up in a realistic way. I can blow up him, but it is as if he teleports a little higher, then returned. Can you help me? Another thing, imagine that a monster attacks him. He uses Space Bar to attack but if the monster touches him when it does not make Space Bar, then Dark Vador loses a life. How to make so that he loses when he is under a certain costume and when he wins when he is under another costume? Thank you !
Offline
For jumping, make a variable called "y velocity" or "yvel" or something and make a script like this:
When you do this, instead of him teleporting up a bit he'll smoothly move up then down.
Change the "If touching Ground" block to however he touches the ground, like "if color touching ground color" or however you're doing it.
Also, you can play around with the numbers (except the 0, leave that), changing the -1 to a larger number like -2 makes him fall faster, making it -0.5 or something makes him fall slower. The 10 can be changed to any number to affect how high he jumps, a larger number makes him jump higher, a lower number makes him jump lower.
For the attacking thing, you can use something like this:
I don't know how your attack script runs, but put your current attacking script into the empty spot.
Last edited by Kileymeister (2011-03-08 16:24:57)
Offline
Je m'incline devant toi
Merci énormément tu m'a beaucoup aidé!
Merci encore!
Offline
Another thing, how is that the enemy attacks in an automatic way?
Offline
Hm... there are several ways to do that, this might be the easiest and most effective:
Basically if you are close, the enemy attacks.
Or if you want to make the enemy hesitate for a split-second and attack slightly randomly, just put in a random block like this:
(As always, the numbers can be changed)
Hope that helps!
Last edited by Kileymeister (2011-03-08 18:53:43)
Offline
Thank you very much^^
A little more complicated, (I know I always have are questions), I explain, the droïde has a costume " to fire a laser beam " and a costume " uppercut". The command < 30 pleases me for the laser but can we make the same thing with the uppercut when the enemy is close? Thank you!
Offline
julesttropfort wrote:
Thank you very much^^
A little more complicated, (I know I always have are questions), I explain, the droïde has a costume " to fire a laser beam " and a costume " uppercut". The command < 30 pleases me for the laser but can we make the same thing with the uppercut when the enemy is close? Thank you!
Just to the same thing.
Offline
Yes, but how may I make so that when the droïde strikes the pose "laser1", if it looks in the direction of dark at Vador, he loses a life? And then distance < 30 do not work even if I approach close, he don't attacks me!:'(
Can you say me if it's possible?
Offline
I am going to show you the prototype, you fast go to understand:
http://scratch.mit.edu/projects/julesttropfort/1645176
the droïd don't attaks..
Offline
Topic closed
Pages: 1