Home   Help Search Login Register  

Author Topic: scripting.. how long to learn?  (Read 5123 times)

0 Members and 1 Guest are viewing this topic.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #45 on: 13 Dec 2004, 04:26:48 »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #46 on: 13 Dec 2004, 05:42:57 »
ok thats interesting how that works.
i understand it, but now i just have to remember how to use that stuff in scripting.  

so that would be used to get the distance between two objs ?which would then be harnesed for aditional purposes, like what

_unitdis =  _xdiff = abs((getpos guy1 select 0) - (getpos guy2 select 0))
_ydiff = abs((getpos guy1 select 1) - (getpos guy2 select 1))

so then it would be somthing like:

if unitdis = 10 exec"phase2.sqs"

thanks
« Last Edit: 13 Dec 2004, 05:48:24 by penguinman »

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:scripting.. how long to learn?
« Reply #47 on: 13 Dec 2004, 14:25:24 »
That's just silly. Use the command distance instead. ;)

_dis = (_loon1 distance _loon2)

:beat: *Gets Shot* :beat:

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #48 on: 13 Dec 2004, 21:43:40 »
but distance is in 3D so something could be in the air and fit the distance requirements
this limits it to being lateral distance, so you could use something like:
?_unitdis <= 20 && (getpos unit2 select 2) < 2
That assures you that it is on the ground (or really close)

penguin you're skipping a part
_unitdis = sqrt(_xdiff^2 + _ydiff^2)
« Last Edit: 13 Dec 2004, 21:44:18 by Triggerhappy »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #49 on: 19 Dec 2004, 04:11:32 »
oh ok i get it. :)

but u still havent awnsered my first question in my last post. what would that be used for ???
« Last Edit: 19 Dec 2004, 04:12:25 by penguinman »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #50 on: 19 Dec 2004, 04:18:37 »
...sorry but..i...dont..see a question.......
 ??? ??? ??? ??? ???

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #51 on: 19 Dec 2004, 04:41:26 »
no its my fault, i should have been more clear

my quote
Quote
so that would be used to get the distance between two objs ?which would then be harnesed for aditional purposes, like what
« Last Edit: 19 Dec 2004, 04:41:50 by penguinman »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #52 on: 19 Dec 2004, 04:49:52 »
like for conditions in triggers, which you already stated, you could come up with some higher uses for it, but its a simple thing, for simple uses.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:scripting.. how long to learn?
« Reply #53 on: 19 Dec 2004, 05:27:21 »
hey guys, thanks anyway for helping me made this post famous lolz
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #54 on: 19 Dec 2004, 05:38:44 »
yes but like could u give me ex: of how to make it... say, exec another script if the distance between 2 soldiers is less then, 100 just for the sake of arguing(learning) ;D

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #55 on: 19 Dec 2004, 06:03:03 »
ok,
in the trigger, once you have found their lateral distance, for its condition:
dist <= 100
activation
[unit1,unit2] exec "unitdies.sqs"
which would like, kill the unit (cinematic) or something else
basically, this isn't used for much, whereas sine, cosine, and tangent are. and those are more complicated, and it's late over here. getting sleepy

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #56 on: 20 Dec 2004, 02:04:48 »
hmm ok

ive got it cool  :)

although i hate to make u play teacher if you want to i would like to learn more of sin and cos,tang

but only if u want to ;D

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #57 on: 20 Dec 2004, 04:20:29 »
sure

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:scripting.. how long to learn?
« Reply #58 on: 20 Dec 2004, 08:00:41 »
um.... what is sin, cos and tan?? ???
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:scripting.. how long to learn?
« Reply #59 on: 20 Dec 2004, 12:59:12 »
Sin, cos and tan come from a branch of mathmatics called trigonometry.    If you know certain things about a right angled triangle, for example the lengths of two of the sides, trigonometry enables you to calculate the length of the third side and also the two unknown angles.     It is an extremely powerful mathematical tool and is useful in many aspects of both OFP and RL.  

There are some basic guides to trig in the Editors Depot.    It is taught in schools, typically to children of about 14 although of course that varies widely.    
Plenty of reviewed ArmA missions for you to play