Giving my actor the right rules

jbrown2177jbrown2177 Member Posts: 66
edited November -1 in Working with GS (Mac)
I'm creating a game in which one of my actors acts as a platform, but the platform also acts like a see-saw, but it will use the accelerometer on the iphone. I'm kind of stuck on which rules to give it. When the other actor slides on the platform I want the platform to have gravity actions towards that actor. But for the web version I guess I will have to have actual keystrokes maybe or mouse clicks to guide the actor along the platform? I just need a little guidance to get this project off the ground.

Comments

  • jbrown2177jbrown2177 Member Posts: 66
    Still haven't received any help from this post. I'm trying to create a see-saw like example in which will help me make my game using the accelerometer. I haven't seen any examples of this yet. Can anyone help?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Not sure exactly what you're trying to do with the seesaw. when you say you want to use the acceleromter, what are you trying to do? Whats the main function of the platform.

    For movement, you can create duplicate rules, one for using the accelerometer and one for keystrokes.
  • jbrown2177jbrown2177 Member Posts: 66
    Trying to have the main actor start out on the platform and you would essentially use the accelerometer (iPhone) and the keyboard or mouse (web) to move the actor back and forth balancing them on the platform actor collecting items raising your score via timer etc. I want the actor to be able to fall off the actor platform, but just re-spawn back on it and repeat.
  • jbrown2177jbrown2177 Member Posts: 66
    Also, would be nice if you got an email if someone responded to your post, because my post disappears in the masses of post without my knowledge. So I apologize if it takes me a while to find my post to see if someone responded.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think the "weight" of the player can be used to make the see-saw tip.

    Create an actor for the player and use the acceleromter section of the wiki to setup the controls (you will only be using accelerometer.Y not X) to go back and forth.

    Then in the see-saw (Teeter-totter) uncheck fixed rotation. Keep movable checked.
    Constrain the X and Y position of this actor so it cannot move, but this will not stop rotation.

    Then create an actor called teetertotter stop or something like that. Put a collide with tettertotter behavior and make in UNmovable. Put an instance of this actor under each end of the tettertotter to control how far it tips.

    You will want to play around with the friction settings of the tetter-totter and the main actor. The more space between the tetter-totter and the invisiible actors that stop it the more tipsy it will be.

    Good luck!
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Oh, the density setting in the main actor and the scene gravity will play a big part in this also. play around with those settings. The higher those numbers the faster it should tip.
Sign In or Register to comment.