Home   Help Search Login Register  

Author Topic: Trouble with the "SPEED" command  (Read 549 times)

0 Members and 1 Guest are viewing this topic.

BaKaRa

  • Guest
Trouble with the "SPEED" command
« on: 30 Mar 2003, 23:42:27 »
Hi !!!
I need to show the speed of my tank (name T80) with " Hint " command
Hint command work fine but my problem is speed is always 0
Here what i used:

_Speed = Speed T80
Hint Format ["%1 Km/h", _Speed]

Any suggests ?

Cap

  • Guest
Re:Trouble with the "SPEED" command
« Reply #1 on: 30 Mar 2003, 23:48:33 »
It sounds like you are activatig this from a script, try activating it form a trigger.

Activation: Radio Alpha
OnActivation: t80speed = speed t80; hint format ["%1 Km/h", t80speed]

BaKaRa

  • Guest
Re:Trouble with the "SPEED" command
« Reply #2 on: 30 Mar 2003, 23:51:06 »
Thanks Cap
But do you think there is a way to use it with a script ?
That's better for what i'm doing  ::)

BaKaRa

  • Guest
Re:Trouble with the "SPEED" command
« Reply #3 on: 31 Mar 2003, 00:02:22 »
Ok i found how to use it with a script  ;D
Thanks you again :toocool:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trouble with the "SPEED" command
« Reply #4 on: 31 Mar 2003, 00:03:57 »
It shouldn't make any difference whether it is a trigger or a script.

Suggest you try it with some other command (eg getdammage or name) rather than speed, to see if it really is a speed command problem.

Also, you don't really need the variable stage (although you may need it for elsewhere in the script of course.)    Try

Hint Format ["%1 Km/h", speed T80]

Also try renaming the vehicle ... I don't know why T80 shouldn't work, but since it is the name of a type of unit ... its the sort of name worth avoiding.   Call it T80_1 or something.    Or try T80_1C for the commander.

Sorry, just rambling suggestions. ......
Plenty of reviewed ArmA missions for you to play

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trouble with the "SPEED" command
« Reply #5 on: 31 Mar 2003, 00:05:34 »
lol you beat me to it ..... so what's the answer?      

If you find out the answer to your own question, its always good to post it ... then the answer at least has a chance of finding its way into the FAQ.  ;)
Plenty of reviewed ArmA missions for you to play

BaKaRa

  • Guest
Re:Trouble with the "SPEED" command
« Reply #6 on: 31 Mar 2003, 00:20:12 »
Ok MacGuba
This is the lines necessary for show the speed unit  :P :


_Véhicule = T80

#Un
?(Speed _Véhicule > 0):Goto "Vitesse1"
GoTo "Un"

#Vitesse1
T80Speed = Speed T80
Hint Format ["%1 Km/h", T80Speed]
Goto "Un"



You could easily see that if the T80 is not moving, speed is not shown
Tell me if you want to pur it in the FAQ

BaKaRa

  • Guest
Re:Trouble with the "SPEED" command
« Reply #7 on: 31 Mar 2003, 00:24:07 »
OUPS i forgot something important   ::)
Use this one:


_Véhicule = T80

#Un
~1
?(Speed _Véhicule > 0):Goto "Vitesse1"
GoTo "Un"

#Vitesse1
T80Speed = Speed T80
Hint Format ["%1 Km/h", T80Speed]
Goto "Un"