• 0

    posted a message on help with physics

    i have only been able to figure out how to debug 1 value at a time, any help?

    Posted in: Miscellaneous Development
  • 0

    posted a message on help with physics

    1movehandler
    Events
    Timer - Every 0.1 seconds of Game Time
    Local Variables
    Conditions
    Actions
    Point - Move point1 To (Position of P1Unit)
    Point - Move point2 To ((Position of P1Unit) offset by (P1UnitSpeed * 0.1) towards MovementAngle degrees)
    Variable - Set 1currzheight = (Ground height at (Position of P1Unit))
    Variable - Set magnitude = (1currzheight - 1prevzheight)
    Variable - Set 1prevzheight = 1currzheight
    Variable - Set 1heightofjump = (1currzheight + magnitude)
    Unit - Change P1Unit height to (1heightofjump - (Ground height at point1)) over 0.1 seconds
    Debug - Display (Text(1heightofjump) with 6 decimal places) as debug output using Type 1, and Do display it in the game window

    Okay, this is just a simple physics script that should determine the magnitude based on the previous height calculated and the current height. it doesn't have gravity in yet so a unit should just start floating up indefinitely when the magnitude becomes positive...

    however in game the unit jumps up a small ammount and then goes back to the ground like there is gravity... this is pissing me off.

    can you guys spot anything thats off?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Finding z height

    @irushu: Go

    for anyone intersted you can find the z height relative to the world by using height at point set to ground.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Finding z height

    I need to find the world relative z height of a 3d point.

    the bigger goal is using the z position to do some trig and figure out the slope of the unit.'

    need to know the xz slope of the unit to calculate physics.

    anyone?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Are you amazing at scripting?

    Okay. I have a racing game made. You drive a hellion around a track. I have the movement pretty much sorted out. You continue rolling after you release forward. The brake works. There are checkpoints so you cant take shortcuts. Driving off the track slows you down. Two last things I have to do before calling it a beta are leaderboard/simple physics.

    I really need some help with the simple physics.

    I want your speed to determine how high you jump off ramps.

    I was thinking you could have a trigger that periodically checks on z position of a unit and the speed of the unit. When the zposition and speed are high enough to escape the pull of gravity temporarily. Determines how long it should be in the air and how High it should go. Then makes the unit go into the air using set unit height and makes a generally realistic looking jump... doesnt have to be advanced physics. just sort of simple but gives the illusion of true physics.

    Posted in: Miscellaneous Development
  • 0

    posted a message on dymic unit speed?

    @irushu: Go

    figured it out

    you use set unit property action

    Posted in: Miscellaneous Development
  • 0

    posted a message on dymic unit speed?

    okay im looking to find how i can change the movement speed in the data table dynamicly through triggers. I'm sure there is a way because there is an action to reset movement speed. Just cant find how to set the movement speed of the unit.

    the idea behind this is when you release forward to move the hellion it keeps clicking 5 units in front of it untill the movement speed is reduced to zero. this way you kind of roll when you release forward.

    thanks in advance.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Get the height of a unit

    @zifoon: Go

    yea i found it. if you define a real variable. then define the function get height unit or something.. you get the current height of the unit. thanks man.

    i got jumps but they are really clunky :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Get the height of a unit

    Is there a way to find the z(height) position of a unit.

    im trying to be able to read the height of a unit and determine the rate at which it is changing.

    going to improv some basic physics.

    just need to set a variable to the current height of a unit in the trigger editor.

    anyone have any leads?

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.