Home   Help Search Login Register  

Author Topic: Jumping units  (Read 646 times)

0 Members and 2 Guests are viewing this topic.

Peter haroski

  • Guest
Jumping units
« on: 09 Sep 2004, 06:56:28 »
Hi quys.
im just asking, that how I can make unit jump, about 5m forward and up.  I know this  "this setpos [getpos this select 0, getpos this select 1, (getpos this select 2) +500]"  put it is too ugly, it just teleports there. And this must work, even if unit is on a fotress, what is flying 500m from ground. I saw this kind of scripting in Horror mod from General Barron, but have no idea how it should be done?

olseric

  • Guest
Re:Jumping units
« Reply #1 on: 09 Sep 2004, 08:34:54 »
Quote
vehicle setVelocity [x, z, y]

Operand types:
vehicle: Object
[x, z, y]: Array
Type of returned value:
Nothing
Description:
Set velocity (speed vector) of vehicle.

Try that...unless it's a person touching the ground.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Jumping units
« Reply #2 on: 09 Sep 2004, 09:22:53 »
If you've seen what you want unpbo the mission and see how it was done.    If you want to use the script in your mission, ask the author's permission - he will almost certainly say yes.
Plenty of reviewed ArmA missions for you to play

Peter haroski

  • Guest
Re:Jumping units
« Reply #3 on: 09 Sep 2004, 14:45:42 »
Sorry, but how I can unpbo maps? :P.
« Last Edit: 09 Sep 2004, 15:03:49 by Peter haroski »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Jumping units
« Reply #4 on: 09 Sep 2004, 15:41:37 »
Get Amalfi's unpbo 1.5 from the Editors Depot - Tools.    Even works on BIS missions and campaigns.    An essential tool for all mission editors.
Plenty of reviewed ArmA missions for you to play

DEAD RABBIT

  • Guest
Re:Jumping units
« Reply #5 on: 10 Sep 2004, 23:29:29 »
If you don't get it anyway, he is how to get it done.

Code: [Select]
_unit = _this select 0

_dir = getDir _unit
_xpos1 = getPos _unit select 0
_zpos1 = getPos _unit select 1
_telerange = 500

TitleCut ["","White Out",1]

~0.9

_xpos2 = _xpos2 + (_teleport * sin _dir)
_zpos2 = _xpos2 - (_teleport * cos _dir)

_unit setPos [_xpos2,_zpos2,0]

~0.1
TitleCut ["","White In",1]

~1

exit

Use addaction or a radio command to activate the script.

Edit: There was a bug in the script=>fixed.
« Last Edit: 13 Sep 2004, 21:48:29 by DEAD RABBIT »

DBR_ONIX

  • Guest
Re:Jumping units
« Reply #6 on: 12 Sep 2004, 19:12:54 »

Offline Chammy

  • Members
  • *
  • I'm a llama!
Re:Jumping units
« Reply #7 on: 13 Sep 2004, 23:54:35 »
You can make a unit "JUMP"?!

Loup-Garou

  • Guest
Re:Jumping units
« Reply #8 on: 14 Sep 2004, 19:44:24 »
You can make a unit "JUMP"?!

Of course. With Ben's little script  :D !