Prospero 1 Posted November 6, 2002 ; First, do the following in your init.sqs file (or wherever): l = "logic" camcreate [0, 0, 0] ; Then, whenever you want to jump, execute the following code (perhaps by using addAction to add a "Jump" action to the player's Action Menu which would call this code): ; ---------- _m = 4 _p = player ?(_p == vehicle _p) && (abs(getpos _p select 2) < 0.05) && (canstand _p): _v = velocity _p; l setpos [(getpos _p select 0), (getpos _p select 1), 0]; _p setpos [(getpos _p select 0), (getpos _p select 1), ((l distance _p) + 0.01)]; _p setvelocity [_v select 0, _v select 1, (_v select 2) + _m] exit ; ---------- ; NOTES: ; Is about as simple as it gets. ; Takes all three initial velocity components into account. ; Jump power is set by the value assigned to variable _m. ; Works for jumping off any surface that has been defined in an object's Roadway LOD. ; Prevents the player jumping whilst in water. ; Prevents the player jumping whilst moving obliquely across very steep slopes (>~45 degrees). ; Allows jack-knifing (jumping whilst prone). ; Prevents jumping if legs broken. ; Does not require a trigger. ; Does not feature any "aftertouch" - for this you will need the forthcoming ProSphere version. ; Remember that if you find you can't jump off a certain surface, it's because it has not been defined in the object's Roadway LOD. You'll have to walk off it instead. This is a consequence of how BIS designed OFP - i.e. not with jumping in mind. There is nothing to stop you adding the appropriate surfaces to your custom object's Roadway LOD in order to make it "fully jumpable". This goes for buildings, trees, cars, tanks, etc etc. ; Remember also, you must define ceilings as part of your object's Geometry LOD if you don't want to fly up through to the floor above (if the ceiling is very very low). Again, this is a consequence of how OFP was designed. Edit: I just edited it slightly... Prospero Share this post Link to post Share on other sites
Prospero 1 Posted November 7, 2002 What's quite nice is jumping off the top of a fairly steepish drop and going prone whilst in mid air, then landing prone. Quite satisfying really;) Also, if you make Jump come up first in your Action Menu list, you can just use a quick double-tap on your middle mouse button to make it happen. This is probably the easist way. Prospero Share this post Link to post Share on other sites
r71 0 Posted November 7, 2002 oh great! the one thing I hate about the CS stlye games... It might be useful with a halo script to base jump off of a cliff. Share this post Link to post Share on other sites
Prospero 1 Posted November 7, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (R71 @ Nov. 07 2002,08:58)</td></tr><tr><td id="QUOTE">oh great! the one thing I hate about the CS stlye games... Â Â It might be useful with a halo script to base jump off of a cliff.<span id='postcolor'> Yes and yes, But since with this simple version there is no "aftertouch" and hence no ability to spin around / adjust movement in mid-air, bunny-hopping can only be used as a defensive measure, and hence I think this is a good compromise. I hate bunny-hoppers as much as the next man. Prospero Share this post Link to post Share on other sites