• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Sidestep idea

I think it'll be possible to hack together sidestep controls.

However! I don't think collision detection would work with them.

The way is, you add say A,D to controls as sidestepleft, right; then in process controls you check to see if in location, and if so on sidestep left you:
//psuedocode
Get pchar
GetCharacterAngle(pchar)
GetCharacterPos(pchar, &x, &y, &z);
Calculate_xyz_offset_for_angle;
SetCharacterPos(pchar, offsetx + x, offsety + y, offsetz + z);

Now, z should stay constant, and offsetx and offsety will just be vector math (convert a mag/dir (side step size) magnitude vector perpendicular to pchar angle to a coordinate vector and add to x and y).

But again, SetCharacterPos bypasses collision detection, so you may end up in a wall. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
<!--`QuoteBegin-NathanKell`+--><div class='quotetop'>QUOTE(NathanKell)</div><div class='quotemain'><!--QuoteEBegin-->so you may end up in a wall. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />[/quote]Well, THAT would make things interesting in a shipboard battle! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Any way to ...ummm... sidestep (pun!!!) that problem? How is the proximity detector called?
 
thats very interesting, which makes me think, could you copy the code(if its not in the dlls) of the backstep move and make it so the character does not move backward but instead stays in place and does one of his random sword swings with the sword clashing sound, and it could act like parrying and then if possible make that effect the enemy character like they were hit with a critical attack(where they fall back a step or two waiving their arms around) then you can move in for a kill or shoot them but i'd really like to see sidestep even if you had to be cautious where you used it
 
Collision detection is, AFAIK, all in the engine, not the scripts.
SetCharacterPos() is a direct call to the engine to set the character's position in XYZspace, bypassing all the physics code.

I believe that all movement controls (including dodge) go straight to the engine.
I'd love to be wrong, of course. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
At one point when I was trying to get around houses not having a second reload locator, I played around with this. Couldn't get the angle to check out, maybe I was not converting from radians to degrees or vice versa.
But setcharpos I _have_ used, quite often, and it works fine.
(it's how I got out of walls, when I reloaded improperly to locations, doing the above testing).
 
Back
Top