1. #1
    Hp_venomZ's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,008

    Movable Character?

    Could somebody give a detailed explanation on how to make a movable chatacter that can jump move left and right and that can activste objects.
    Share this post

  2. #2

    Re: Movable Character?

    Originally Posted by HpvenomZ
    Could somebody give a detailed explanation on how to make a movable chatacter that can jump move left and right and that can activste objects.
    You can get a good idea from the First Person Game Example, but I don't think the quality of it is enough for making proper fps games.

    I went, modified and uploaded my draft fps test track to the Track Central for you. You'll find it from the latest skill games with the name of "PROPER FPS TEST". I have a better controlling system in that and an example of the activable object. Its the lamp with the switch on front of it.

    So how do you do it? First an explanatory picture

    https://www.dropbox.com/s/gnj7kdnwqf...719_102939.jpg

    - put a small sphere as the game character
    - put an object like the small bag in the pic to on top of the sphere with an Object Position Event on every frame. Glue the camera and the stuff you want to be seen on the screen like a gun to that. Remember to use the Snap workplane from the editor settings when placing stuff precisely, and do put the pivot point of that group back to center of the bag with it.
    - put 3 area effectors with Object Position Events to the position of the sphere on every frame. Put the only affected object to be the sphere. Rotate them on the X-axis to the same as the sandbag.
    - Take the left stick horizontal and vertical axes separately. Multiply them with something and you get the values for 2 of the area effectors.
    - The rotation of the camera group is similiar. Just take the current rotation axes from the group and add to that the result of the calculation you get from the right sticks horizontal and vertical values.
    - Jumping is done by setting the force value of the last area effector from a button press like Y to a value and changing it back to 0 after a Delay trigger. Preventing air jumps is done by setting the Y-button object to disabled state after pressing it and setting it to on after it hits a static object. You do that with a Hit-Trigger.

    - I'll explain the shooting if you need it.

    - Activating objects is kind of wide subject, but I'll explain one common thing from FPS games. You can use this to for example open doors or activate lights etc...
    - Put a small object somewhere
    - Take the objects Screen Position Y and X values.
    - Put them through separate Abs One-Input Operators.
    - Get the World distance from that object to the camera.
    - Decide what is the switch activator button or is it activated by shooting something or hitting something
    - On activate(example RB press) send an impulse to a Generic Filter f the value of the Abs of the Screen Position X is less than 1)
    - Send the True Event to another Generic Filter checking the same stuff of the Abs of the Y value. If both are true. Then the objects center is visible on the screen.
    - Send the true value to a Generic Filter which check if the Camera meaning the whole character is close enough to the object. If its true then send the impulse to the thing you want to activate. Simple.

    This was enough writing for now. Ask if you need something else or if you didn't understand something.


    EDIT: hmmmm.. did you happen to mean 2D platformer controls That's way simpler. Just glue 2 directional forces or area effectors to your game object. Derive the value to the left/right movement from the left stick horizontal value and do the jumping as in the above example. To the object activation you don't need the screen positions, only the distance.
    Share this post

  3. #3
    Blastergamer's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Rocking Trials Country
    Posts
    2,539

    Re: Movable Character?

    Do you want a first person, top down or a 3rd person shooter? We need more information on what you actually want to give you better answers.

    As for the sphere ball that Agatio wrote, increase the linear & angular dampening up to 50-80% to prevent rolling around even you don't press anything and check [disable world gravity], then move the [gravity] slider to about -4000, so, that it will drop fast enough in the air, but be sure you have enough force to move & jump on the area affectors.
    Share this post

  4. #4
    Hp_venomZ's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,008

    Re: Movable Character?

    Originally Posted by Blastergamer
    Do you want a first person, top down or a 3rd person shooter? We need more information on what you actually want to give you better answers.

    As for the sphere ball that Agatio wrote, increase the linear & angular dampening up to 50-80% to prevent rolling around even you don't press anything and check [disable world gravity], then move the [gravity] slider to about -4000, so, that it will drop fast enough in the air, but be sure you have enough force to move & jump on the area affectors.
    What i wantvis a 2d skill game like Mr. evo
    Share this post

  5. #5

    Re: Movable Character?

    I don't want to post a lengthy article about how you do it from the beginning to the end. Just start doing it and come ask some questions about specific stuff if you get stuck.
    Share this post

  6. #6

    Re: Movable Character?

    Well, for my Walking & Jumping I used at least the following:

    A Variable Source, 2 Set Value Events, an Impulse Trigger, an OPE, a 2-variable math operator (or whatever), a Left-Stick Horizontal (Character) Source, 2 Rotation Joints, and an Impulse Delay. Maybe more?
    I held him upright using a 2-axis Slider, made him jump with a directional force, and detect walls with a hit-box around him. I also had to change the Linear Dampening once he left the ground, so that used a Hit Detection Trigger, 2 Set Value Events and of course a Variable Source. Then I used a Left and Right button to make him move and to turn him 180 degrees.

    The pipes used an Area Trigger, Down Button, OPE and portals. Blocks are simply boxes with Set Visibility and an Area Trigger, tied to an explosion that is placed where ever your head is, plus a foot up. The doors were the easiest - The same OPE that turns you 180 is set to only 90, a single OPE to open all doors in the map at the same time, play a single sound for the whole map, a Joint on your arm set to a 90 degree Rotation Limit, fade out, Reset to Checkpoint, fade in, OPE the door closed, play a sound again.

    Good Luck

    If you wanna do it like Keenan the pro, make a grid of milk crates and fiddle with their colors and visibility. Drag it around the map with a 2-axis Slider set to UP/Down and Left/Right. His method is much easier I think although fairly time-consuming.
    Share this post