Home   Help Search Login Register  

Author Topic: Set The Velocity Of An Object, and set Distances  (Read 2634 times)

0 Members and 1 Guest are viewing this topic.

RunAwayScientist

  • Guest
Set The Velocity Of An Object, and set Distances
« on: 09 Feb 2003, 21:40:53 »


     Heh heh, here I go again...

         We've all seen it, Police Pursuits. The Police effectivly attempt to ram the car off the road. What if this were in OFP? What if a car rammed into the other one, causing damage to both vehicles, and in OFP, they'd both stop and the drivers jump out. Then the office simply walks up to him, and the suspect is arrested...Yay!

        My question is, how do I set the velocity of an object, or detect the velocity of an object in, of course, Kilometers per Hour. And, my other queestion, is how do I set the distance between two objects (Preferably Cars).

       Basically, what I'd like to do, is to make a car speed just enough to close the gap between him and a nice Red Speeding car. Say the Speeding car is going 80, and the car that's trying to close to gap, whatever speed neccesary to ram the Red Car.

        Ehhh, any ideas on the matter, or do I ask too many hard questions? Err...Do I?

     -RunAwayScientist

Kaliyuga

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #1 on: 09 Feb 2003, 22:41:56 »
It's possible..   just need a couple of triggers.. or a script ....

the command you're gonna be looking for is :

this setvelocity  [x,y,z]


perhaps you could make a repeatable trigger.. with this as it's condition:

car1 distance car2 > 10

and something like this as the activation...

car2 setvelocity [x,y,z]  

you'd have to fool around with the numbers , but this would result in car2 getting a small boost of speed whenever the gap between car1 and car2 exceeded 10 meters....

if using scripting.. you could also incorporate a loop where the chase car was getting the position of the lead car every few seconds.. and then the driver was told to move to that exact position.....  instead of having to use waypoints at all....

Kaliyuga

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #2 on: 09 Feb 2003, 23:22:19 »
u can just use da speed command

speed carname - wil give u da speed of da car in KMH

or if u want da velocity use

velocity carname - give u array wid da velocity in X axis Y axis and Z axis

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

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #3 on: 10 Feb 2003, 04:02:13 »

       Ehhh, and distance?

    I don't think there is a setvelocity command, a Speed command, or a Velocity command. I've not tried your suggestions, but if there were such commands, this post wouldn't be here...heh heh, kinda of makes ya think eh?

    -RunAwayscientist

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #4 on: 10 Feb 2003, 04:16:13 »

     Wait, There is a Speed command. I just found it...The command I can't find is SetSpeed and SetVelocity...You sure about that?

       I'll try out the suggestions, not sure if it'll work or not....

   Thanks for your help, and suggestions...Err..I think...(Eats Cherry Pie)

   -RuNAwayScientist

Kaliyuga

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #5 on: 10 Feb 2003, 06:23:21 »
Works fine for me ::)   what version of OFP are you running ? ;)

make an empty jeep..... name it j  
make yourself a West Soldier...
make a trigger....  activated by West present
activation:  j  setvelocity [1,111,5]

then get in the jeep... and drive into the trigger.. watch what happens


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #6 on: 10 Feb 2003, 06:40:29 »
dere is no setspeed command but

hre is a qoute from da command referance

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.

and a link setVelocity command

or da velocity command

Quote
velocity vehicle

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

and a link Velocity command

or da speed command

Quote
speed obj

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

Example:
speed player



and a link Speed command

dats bout it i think :P

muhahahhahhahhaa

nd now u have 2 change us sig line and write somin like

"I kiss LCDs legs 4 teachin me da wrong from da right and 4 takin time and givin me links 2 da command referance - I wil never think da Cartel member is wrong"

and go 2 da Eveon Cartel website and D/L all da addons

and

if u stil have time go 2 da beta testing forums and test all da misions i made ;D

muhahahahahhahahahahahahaha

 ::) ::) ::) ::) ::) ::) ::)

LCD OUT

@ OFPEC mods - i woke up in strange mod 2day  ::)
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #7 on: 11 Feb 2003, 07:02:52 »

"I kiss LCDs legs 4 teachin me da wrong from da right and 4 takin time and givin me links 2 da command referance - I wil never think da Cartel member is wrong"

       Uhhh...A Couple of Grammar mistakes...It should be:

   ""I kiss OFPEC 4 teachin me da wrong from da right and 4 takin time and givin me links 2 da command referance - I wil never think da OFPEC Cartel Team Member is wrong, but that of right."

     There we go....

        Ehh, setVelocity escaped me a couple of times, no wonder I had no idea about that command...Same thing for the "Speed" command...To think I just heard about it, after my Experience? Compared to the time the U.N. takes, I think I'd win...Heh, heh....

    Well, thank you for your help. Maybe I should stick with SetSpeedMode...It sets the basic acceleration for the unit, which builds up to speed over time, rather than having a "setSpeed" Function Command (HInt Hint, run and do yo scriptin' thing now), CodeMasters put in SetSpeedMode...

       Yay for CodeMasters! (Boo...Don't tell them anything, they're watching me...They got me once, but never again man!)

     Once again, thanks for you help...As my Random Insanity Continues do excpect more questions, and I think that a "SetSpeed" Function would really prove...Well...Functional to a mission...

  -RunAwayScientist

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #8 on: 11 Feb 2003, 13:11:30 »
OFPEC didnt give u links 2 nothin  :P

only da EC have power were i post (and prooly Tomb  and BM  ::))

i gave u links 2 da CR

da EC wil chace u 4 ever

m stopin 2 answer ur Qs  :P  ;D

but bout da function thingy - just gotta make funtion dat find da direction of da vehicle and give him reight setvelocity :P - but im not gonna right it :Pcuz ill never help u ahgain  ;D

 ;D ;D ;D ;D

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

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #9 on: 12 Feb 2003, 04:39:22 »


     Uhhh, are you high on Cartel or something?

      Man, I love your MOD though. Mind if I ask a question? Is your MOD based on GTA3, and with all the gangs and Gang Type Activity going on there? It seems like it, and a very, very, interesting mod indeed.

          -RunAwayScientist

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #10 on: 12 Feb 2003, 10:46:11 »
high is my ever status  :o :wow: :toocool:

and da mod is not based on GTA3 :P we are da Everon Cartel not GTA3 based MOD  :P :P ;D

but well have looooots of gang activity around  ;)  ;D

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

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #11 on: 12 Feb 2003, 10:52:04 »
just saw wat u wrote 2 sui

Quote
                        I love you Sui man! Err...Not literally...Really, not Literally...Oh you think I'm gay now eh? C'mon, I'll be here all week...Again...Eating Cherry Pie on the Can...Wait, does the Can refer to a Soda Can, or a Can-Can (I think I can!)? There's too many cans...

  RunAwaySci list "Cans";
  RunAwaySci exec "BlowUp.sqs";
  RunAwaySci exec "Just Kiddin'.sqs";
  RunAwaySci globalchat "BOOM!";
  RunAwaySci globalchat "Just kiddin'...";
  RunAwaySci globalchat "Heh, I didn't even need to script it...wait, did that bomb have a timer? Uh oh...";
  RunAwaySci action ["(Open Cell Phone)"];
  RunAwaySci action ["(Call Mommy)"];
  RunAwaySci globalchat "MOMMMIIIII!!!!!";
  RunAwaySci AskChat "Do I really need ";" at the end of my commands in a scrip? I mean, it's like a huge activation field, right? Right?!!!!";
  RunAwaySci exec "End;.sqs";


        Ehhh, I just kind of got a little creative there, with all the numbers   and all...Ow, my eye hurts. I can't make it stop! I can't make it stop! AHHH!  

      Thanks for your help Sui, all hail and praise the might Sui...Heh heh, Sui Corn, Sui Potatoes, Candy is Sui. Sui is kind of like "Sweet", but more Mexican/Spainish/Canadian/American/Black/Japaneese/PyJingo type language...Ehh, don't ask me, he's the Mexican/Spainish/Canadian/American/Black/Japaneese/PyJingo  person.

        -RunAwayScientist

and he is OFPEC mod y u r not hailing OFPEC wid him ?  :P

just hail me and get over wid it ;) - or u can just solve dat thread ccuz u dont have probs wid dat nymore  ;D

LCD OUT

[edit] and u dont need ; @ da end of each line in script  ;)
« Last Edit: 12 Feb 2003, 10:52:34 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #12 on: 16 Feb 2003, 08:30:36 »

          Well, and distances?

     -RunAwaySci

RunAwayScientist

  • Guest
Re:Set The Velocity Of An Object, and set Distances
« Reply #13 on: 23 Feb 2003, 19:06:55 »

   Well, my question remains unanswered...Ehh, a little help plz? Anyone that can help me from the top?

     -RunAwayScientist

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Set The Velocity Of An Object, and set Distances
« Reply #14 on: 23 Feb 2003, 20:24:17 »
distance wat ?  ::)

u got da distance command ;D

wat u exactly need on distances ? ;D (use full words 2 describe it cuz i didnt lear all da english shortname 4 everything  ::)) (beter even describe wat u meen ;D)

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