Home   Help Search Login Register  

Author Topic: ComRef 1.75- Speed obj.  (Read 3427 times)

0 Members and 1 Guest are viewing this topic.

Offline RT-SuperTron

  • Members
  • *
  • Prey...you will be
ComRef 1.75- Speed obj.
« on: 25 Aug 2002, 02:29:15 »
 ???

Quote
speed obj
Operand types:
    obj: Object
Type of returned value:
    Number
Description:
    Object speed (in km/h)

Example:
    speed player


How does that thing work?? I have been foolin around with it, but still no luck other than error messages.

[RT]SuperTron
+- PAIN IS YOUR FRIEND, IT WILL REMIND YOU THAT YOU ARE ALIVE -+

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:ComRef 1.75- Speed obj.
« Reply #1 on: 25 Aug 2002, 02:39:16 »
basically it wil return the speed of the selected vehicle...

condition:

_speed1 = speed unitname

activation:

hint "_speed1"

that will hint to you how fast a certain vehicle is going.... hopefully...

:thumbsup:
Proud Member of the Volunteer Commando Battalion

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:ComRef 1.75- Speed obj.
« Reply #2 on: 25 Aug 2002, 05:09:40 »
Messiah shouldn't that be

_speed1 = speed car
hint format [" %1",_speed1]

 ;)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:ComRef 1.75- Speed obj.
« Reply #3 on: 25 Aug 2002, 06:12:18 »
or even:

hint format ["%1", (speed car)]

* Sui waits for Sefe to step in and prove to us all there's a better way yet

The speed function returns the speed of the unit, you can't use it to set it I'm afraid SuperTron ;) (I have a strange feeling that's what you're wanting to do... If I'm wrong please disregard)

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:ComRef 1.75- Speed obj.
« Reply #4 on: 25 Aug 2002, 14:56:33 »
But you can use it to limit speed.  Forcing an AI driver to apply the brakes if he goes too fast.  He drives along as though he cant work a clutch, but it works.

mikeb

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #5 on: 25 Aug 2002, 15:02:17 »
Just looked at theis thread.

How does that %1 bit work? what exactly does it mean?  I guess that could be incredibly useful - (hours of work overcomplicating things about to seem pointless and a complete waste of time!)

M

Offline RT-SuperTron

  • Members
  • *
  • Prey...you will be
Re:ComRef 1.75- Speed obj.
« Reply #6 on: 25 Aug 2002, 15:55:46 »
But you can use it to limit speed.  Forcing an AI driver to apply the brakes if he goes too fast.  He drives along as though he cant work a clutch, but it works.

Yeah I had a feeling this would be possible, but how does that work.

[RT]SuperTron
+- PAIN IS YOUR FRIEND, IT WILL REMIND YOU THAT YOU ARE ALIVE -+

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:ComRef 1.75- Speed obj.
« Reply #7 on: 25 Aug 2002, 16:01:50 »
dis qoute is from da oficial comand referance  ;)

Quote
format format
Operand types:
    format: Array
Type of returned value:
    String
Description:
    First argument of array is format string. Format string may contain references to following arguments in form %1, %2, etc. Each %x is replaced by corresponding argument. %x may appear in the format string in any order.

Example:
    format ["%1 - %2 - %1", 1, "text"] , result is "1 - text - 1"



LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

ElemenS

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #8 on: 26 Aug 2002, 00:35:56 »
Yes, indeed tha would be great, being able to speed up vehicles wouldnt it?
Come on, you really dont wanna drive a shilka 350km/h up a 45*Deg mountain ?!

 ;D ;D ;D ;D ;D

I hope they enable such a line some day.....sigh*

Offline RT-SuperTron

  • Members
  • *
  • Prey...you will be
Re:ComRef 1.75- Speed obj.
« Reply #9 on: 26 Aug 2002, 00:43:30 »
 ???

Well, is it possible with that command to force a vehicle to stay below 45 km/ph.

[RT]SuperTron
+- PAIN IS YOUR FRIEND, IT WILL REMIND YOU THAT YOU ARE ALIVE -+

Demoniac

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #10 on: 27 Aug 2002, 21:44:53 »
???

Well, is it possible with that command to force a vehicle to stay below 45 km/ph.

[RT]SuperTron

You could set the speed mode lower when the speed is exceeded, like:
Code: [Select]
_Car = _this Select 0

#SpeedLoop

@(Speed _Car > 45)
_Car SetSpeedMode "NORMAL"
@(Speed _Car < 35)
_Car SetSpeedMode "FULL"

GoTo "SpeedLoop"

This will make the car go to normal speed when it goes faster than 45 and it wol go to full speed when it goes slower than 35... you could, of course, change the values so the speed change is smaller...
« Last Edit: 27 Aug 2002, 21:47:14 by Demoniac »

Offline RT-SuperTron

  • Members
  • *
  • Prey...you will be
Re:ComRef 1.75- Speed obj.
« Reply #11 on: 27 Aug 2002, 23:18:02 »
 ;)
Thanks Demoniac, that seems usefull. So if I get this command right, it is used to CHECK the speed of an object not setting it, but by checking for at certain value in SPEED, you can thereby alter it -SPEEDMODE- to something else.

[RT]SuperTron
+- PAIN IS YOUR FRIEND, IT WILL REMIND YOU THAT YOU ARE ALIVE -+

ofp..hahha

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #12 on: 28 Aug 2002, 00:21:03 »
I have already wrote a speed script that will be used for the catapult on the aircraft carrier we are making at

www.operationnorthstar.com

also I can make the script make a vehicle go from zero to any speed i would like so look forward to the carrier.

Offline RT-SuperTron

  • Members
  • *
  • Prey...you will be
Re:ComRef 1.75- Speed obj.
« Reply #13 on: 28 Aug 2002, 05:15:33 »
 8)
NAA Us Marine, this sounds allmost to good to be true, both a speed script and new vessels. :cheers:

[RT]SuperTron
+- PAIN IS YOUR FRIEND, IT WILL REMIND YOU THAT YOU ARE ALIVE -+

Anmac

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #14 on: 28 Aug 2002, 06:21:45 »

What about using it for a 'SPEED' type mission.

? speed bus1 < 40 : bus1 setdammage 1
? speed bus1 > 100 : bus1 setdammage 1

 ::)

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:ComRef 1.75- Speed obj.
« Reply #15 on: 29 Aug 2002, 00:04:29 »
I have already wrote a speed script that will be used for the catapult on the aircraft carrier we are making at

www.operationnorthstar.com

also I can make the script make a vehicle go from zero to any speed i would like so look forward to the carrier.

I don't believe that is possible with a script. Please show us.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

ofp..hahha

  • Guest
Re:ComRef 1.75- Speed obj.
« Reply #16 on: 29 Aug 2002, 00:39:11 »
Dont worry Its true Im not lying and I will give It to you pretty soon.


Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:ComRef 1.75- Speed obj.
« Reply #17 on: 29 Aug 2002, 01:12:37 »
Ok I'll believe it when I see the script itself. I hope your script doesn't use "setpos" to accomplish acceleration, because if it does you are fooling yourself.

The reason I am so sketical is that this problem has been around for over year and many a great OFP minds have never been able to do what you say your script does.
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.