Spartan_04 0 Posted April 14, 2004 Hey I’m in the process of making a mission for the SST mod and I was wondering if anyone has made a script that would send a unit about 75-80 meters in the air and about 100 meters forward? I’ve seen something like that in the BOH mechs but I’m wondering if such a script even possible for infantry? Spartan_04 Share this post Link to post Share on other sites
void_false 1 Posted April 14, 2004 try using setvelocity command Share this post Link to post Share on other sites
kennypooh 0 Posted April 16, 2004 Spartan, try this: jump.sqs jup = 1 jdn = 1 _ux = 0 _xdir = getdir player _xsin = sin (_xdir) *100 _xcos = cos (_xdir) *100 _xposX = (getpos player select 0) _xposY = (getpos player select 1) _xposz = (getpos player select 2) _xXpos = (_xposX)+(_xsin) _xYpos = (_xposY)+(_xcos) #loop1 player setpos [_xXpos,_xYpos,_xposz + 75] jup = jup + 1 _dx = _dx + 1 ~0.01 ? (_dx < 75): goto "loop1" _xdir = getdir player _xsin = sin (_xdir) _xcos = cos (_xdir) _xposX = (getpos player select 0) _xposY = (getpos player select 1) _xposz = (getpos player select 2) _xXpos = (_xposX)+(_xsin) _xYpos = (_xposY)+(_xcos) #loop2 player setpos [_xXpos,_xYpos,_xposz - jdn] jdn = jdn + 1 _ux = _ux + 1 ~0.01 ? (_ux < 74): goto "loop2" addjump.sqs pj = player addaction ["Jump","jump.sqs"] In player's init: [] exec "addjump.sqs" Tested and works. Hope it helps, ken Share this post Link to post Share on other sites
kennypooh 0 Posted April 16, 2004 Spartan, After the 3rd or 4th jump, you get pretty beat up, so here is a script I use (by Gummi) for damage control. ;script by Gummi (Miller) ; ofpgummi@yahoo.com ; to use: [A, B] exec "autofix.sqs" ; A = Vehicle name ; B = Time until repair in seconds ; Example: [car1, 5] exec "autofix.sqs" _vehic = _this select 0 _wait = _this select 1 #check ? (GetDammage _vehic >0.01) : goto "fix" goto "check" #fix ~_wait _vehic setdammage 0 goto "check" In my init: [me,0.01] exec "autofix.sqs"; Thanks Gummi Share this post Link to post Share on other sites
Spartan_04 0 Posted April 16, 2004 Excellent, Thanks guys!!! Share this post Link to post Share on other sites
kennypooh 0 Posted April 18, 2004 Spartan, you're welcome. I've been messing with my jump script and now you fall a wee little bit slower and damage is a LOT less. Give it a try , Ken ;jump.sqs jup = 1 jdn = 5 _ux = 0 _xdir = getdir player _xsin = sin (_xdir) * 100 _xcos = cos (_xdir) * 100 _xposX = (getpos player select 0) _xposY = (getpos player select 1) _xposz = (getpos player select 2) _xXpos = (_xposX)+(_xsin) _xYpos = (_xposY)+(_xcos) #loop1 player setpos [_xXpos,_xYpos,_xposz + 75] jup = jup + 1 _dx = _dx + 1 ~0.01 ? (_dx < 75): goto "loop1" _xdir = getdir player _xsin = sin (_xdir) _xcos = cos (_xdir) _xposX = (getpos player select 0) _xposY = (getpos player select 1) _xposz = (getpos player select 2) _xXpos = (_xposX)+(_xsin) _xYpos = (_xposY)+(_xcos) #loop2 player setpos [_xXpos,_xYpos,_xposz - jdn] jdn = jdn + 5 _ux = _ux + 5 ~0.05 ? (_ux < 70): goto "loop2" Share this post Link to post Share on other sites