Home   Help Search Login Register  

Author Topic: basic commands to frightening, horror commands  (Read 957 times)

0 Members and 2 Guests are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
basic commands to frightening, horror commands
« on: 25 Jun 2005, 06:41:55 »
I've been noticing some things e.g.

setpos [getpos this select 0, getpos this select 1,10] for example is simple.

but

setpos [getpos this select 0, getpos this select 1, (getpos this select 2) +?] is complicated.

It's not any harder to write but.. its all so different with... any difference?
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:basic commands to frightening, horror commands
« Reply #1 on: 25 Jun 2005, 08:12:39 »
the difference is in the logic of the command. in the first example, the height parameter is simply 10 meters. in the second example, you are both getting the height parameter of the given object, and also adding to it. if you were to type

Code: [Select]
setpos [getpos this select 0, getpos this select 1, getpos this select 2 +n]

without the brackets, flashpoint would most likely interpret this as trying to add 'n' to the command 'select 2' rather than the value that 'select 2' returns, which would cause an error. the brackets are used to separate the parts of the command, so you add 'n' to (the value in here).


Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:basic commands to frightening, horror commands
« Reply #2 on: 25 Jun 2005, 08:29:06 »
well thanks.. I will call it "scarier than world war 3" for now since I don't know what the heck you mean. I'll learn that in high school ;D!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

qqqqqq

  • Guest
Re:basic commands to frightening, horror commands
« Reply #3 on: 25 Jun 2005, 10:52:03 »
Create a test missionette and experiment.    Always the best way to get to understand a command or line of code.