Question on how to make an actor jump properly?

2»

Comments

  • kajutokajuto Member Posts: 314
    jajajajajjajajajajaj sorry bro!!! never mind!!!! okay....maybe this next question is little harder....emm.....

    Constraint Behavior
    Self.Position.Y to 95.4201*cos(self.time*25)+338.1467 , the same code but for Y-axis.
    1) I want when the hero actor is close to the platform (up and down) activate it and move down, so the hero can walk on top of it, then after certain distance it move back to his original position (the platform), how can i do it?????
    When it reach to 338.1467, how can i stop the platform their for let say 5 second ???
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    edited March 2012
    I dont get what the problem is, i also emailed you the answer before. You just posted the same code but for y axis. That is for y axis, your constraing the self position y

    Also why not just interpolate it down when the hero is in range, then interpolate it up after 5 seconds?
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    "maybe this next question is little harder"

    It's the one after that which I am worried about ! 8-X

    Good luck with your game. ;)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    edited March 2012
    Or avoid constrains, download the free toolbox demo here from P-O-M, it has a section in it from me on how to do a jump/double jump and has notes explaining what is going on in the rules. There are also lots of other little bits in there that you will find very useful as well;

    http://forums.gamesalad.com/discussion/38132/gs-tool-box-a-free-mega-template-ready-now/p1

    Scroll down to half way to get the 2nd link, not sure if the 1st link is up-to-date
  • kajutokajuto Member Posts: 314
    John , i have a actor that i can control to move left or right(hero), also i have a Platform actor that move up and down (Y axis), but how can i do the hero actor when he is close (distance) to the Platform actor, it move down so the hero can walk or jump on top of it???????

    Prob:
    1) how can i do that when the hero actor close to the platform it will move down? (i tried the tshirtbooth tutorial using Magnitude) it didn't work because the magnitude use X and Y, i just need the x
    2) if the prob #1 is accomplished, how can i set the platform to move up again to his original position after the hero actor move away certain distance ????

    for example: when the hero actor is close more than 200 pixel the platform actor move down so the hero actor can walk on top of it
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    You can just use the 'hero's' X position to decide when to bring the platform down . . . .

    http://www.mediafire.com/?mdb0rrq4zwqfwdb

    Use left and right arrow keys on your keyboard to move left and right, when Mr G passes the red line the platform will descend. If he sits on the platform for 2 seconds it will go up.
  • kajutokajuto Member Posts: 314
    i saw it how u did it. But explain to me ...

    1) The number 640 in the interpolate inside the hero is the distance between the hero actor and the platform??
    2) The number 250 inside the platform ??

    sorry again to bother you and be so dumb -_-
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    i saw it how u did it. But explain to me ...

    1) The number 640 in the interpolate inside the hero is the distance between the hero actor and the platform??
    2) The number 250 inside the platform ??
    There is no interpolate inside the hero.


    If you are struggling to understand what the 250 value is doing in the platform actor, then I think you need to sit down and learn some of the GameSalad basics!

    Check out tshirtbooth's videos, they cover all the basics and are really well made easy to follow.

    I won't be answering any more questions as I cant see there being an end to this !

    Best of luck with the game, like I say check out tshirtbooth's videos, they're really good, watch them all and you will be able to do all this very basic stuff after even just a day or two !
  • kajutokajuto Member Posts: 314
    ???????? what happen Tyran? i don't get it .
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    ???????? what happen Tyran? i don't get it .
    When you asked: "Tyran the code that you gave me , that it work with Y axis?" did you first try and use it on the Y axis ? Or did you think it's better get someone else to answer some more questions for you before you bothered to even try ?

    Like I say, can someone please tell me if I can type out a word in capital letters - as I can't be bothered to try for myself :))

    Also, if someone is going to take the time to help you out - then not bothering to thank them is one thing - but never even getting their name right is another ! LOL ! :)) :))

    Anyhow good luck, no hard feelings, I enjoyed answering your questions, but life is short, go learn some GameSalad, it's fun !
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I dropped you a like ;)

    Ace
  • kajutokajuto Member Posts: 314
    Tynan first of all. Sorry to wrote wrong u name . Second thanks you for all the help really mean it.!
  • kajutokajuto Member Posts: 314
    Tynan. I think is too much to ask u, do u mind to help me some more ?
  • CloudsClouds Member Posts: 1,599
    Tynan. I think is too much to ask u, do u mind to help me some more ?

    Lol ! Ok, go on what's your question, but this is only because I Love you ! :(( :(( :(( :(( :(( :((


  • kajutokajuto Member Posts: 314
    jjajajaja Tynan you are the best jajaja.

    1) I got a jump button, I want when double touch the character stick on the roof and keep walking or jump?

    2) also, another one with jump button, when double touch it , through a string that attach something? So the hero actor can make a swing to another side instead of jumping to another side
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    1) I got a jump button, I want when double touch the character stick on the roof and keep walking or jump?
    I don't know how you would do that unless I sat down for a while and worked it all out ! Sorry.
    2) also, another one with jump button, when double touch it , through a string that attach something? So the hero actor can make a swing to another side instead of jumping to another side
    Same answer, there is no easy solution, it might take you a few days to work that one out alone, start somewhere and when you have a specific question then ask. Also take a look at Tshirtbooth's videos, there is lots of useful ideas in them that might help you.

  • kajutokajuto Member Posts: 314
    all right, i will tried tshirtbooth video is there any that look close to what i want...thanks =-)
  • CloudsClouds Member Posts: 1,599
    all right, i will tried tshirtbooth video is there any that look close to what i want...thanks =-)
    I can't really remember them all to be honest, maybe someone has a better suggestion !?

  • kajutokajuto Member Posts: 314
    i said i will try and find something near what i want, but there's no guarantee =-(
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    i said i will try and find something near what i want, but there's no guarantee =-(
    I see, I misunderstood your post - I understand now !


    No there is no guarantee he will have exactly what you want . . .

    You don't need to find a video that tells you how to make something jump in the air and then run - you only need a video that shows you how to use accelerate - you don't need a video that tells you how to make an actor explode when he hits the ground - you only need a video that shows you how to change images and how collisions work . . . . etc etc

    What you are trying to do is not impossible or even very difficult, it just might take some time at first .
  • kajutokajuto Member Posts: 314
    Yep, the prob is I don't know how to start .. I don't know if I should use for example accelerate, interpolate and ect...

    Btw how do u know so much about programming? R u studying computer science or something...
  • CloudsClouds Member Posts: 1,599
    edited March 2012
    Yep, the prob is I don't know how to start ..
    Videos ! Watch them all ! Keep GameSalad open when you are watching them.
    Btw how do u know so much about programming?
    I know nothing about programming, everything I have told you is the kind of stuff you can learn from the videos in a few days + some practice + some common sense.


    If I put my 'expertise' up against tshirtbooth/mynameisace/JohnPapiomitis . . . etc etc . . . . I would look like an idiot ! (seriously!)
    R u studying computer science or something...

    Right here, right now, with you, on the forums !
    :D
  • kajutokajuto Member Posts: 314
    If u are a idiot.?! What am I?!?!?!! Jajajajajajaja come on.!! Don't make me feel worst that I'm now !! :-p

    I already watched all the video but still ... I'm nothing compare to u
  • CloudsClouds Member Posts: 1,599
    If u are a idiot.?! What am I?!?!?!! Jajajajajajaja come on.!! Don't make me feel worst that I'm now !! :-p
    Soon you will be as good an idiot as me.
  • kajutokajuto Member Posts: 314
    Hi Tynan, how r u doing?

    hi there! i have a timer, and the code i used is this:

    Display Text
    -floor((floor(game.mytimer%3600)/60%10))..":"..floor((game.mytimer%60)/10)..floor(game.mytimer%10)

    Change Att
    -game.startime to game.time

    Rule
    -att game.mytime >0
    -constrain att
    -game.mytimer to 120-(game.time-game.starttime)

    Rule
    -att game.mytime =0
    - Timer
    -after 2 seconds run to completion
    - pause game

    how can i set the timer to start , when i touch the start button to start to play?????
Sign In or Register to comment.