Home   Help Search Login Register  

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

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #30 on: 12 Dec 2004, 01:36:36 »
ok hmm..

is it 28.6 meters  :)

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #31 on: 12 Dec 2004, 01:54:00 »
ofp freak.

i understand that you have many problems with ofp because we all do( not that its a bad game, but more that its just a confusing game[for editing at least])  ;D

anyways if you go to the list of members there are somthing like 12,000. Now do u really think your problem is more important than any of the other 12,000 peoples problems. :)
if you dont understand what you did wrong as would be perfectly acceptable.  Basicly to put it simply(but it really is not as bad as it sounds but still somewhat of a problem) :) you have acted in the last few topics u  posted on like everybody and all the admins,moderators and even the website creator, made www.ofpec.com and all 12,000 members put everthing together to help you with YOUR problems in ofpec and nobody elses. You are acting just a tad bit ungratefull for peoples atempts to help you. :)


but that adds yet another problem to this whole ofp thing. because we need somthing like a tutor section in the forums, where great people like triggerhappy and macguba(not that there arent others but  I cant mention all of them) can help explain stuff(like the pathenon theorm) to people who dont get somthing(like me).

it wouldnt be for specific problems like the scripting boards, but more for just improving your knowlege in a general area of scripting(like the pathenon theorm).

EDIT: neat when i type www.ofpec.com it makes it a link

« Last Edit: 12 Dec 2004, 02:02:28 by penguinman »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #32 on: 12 Dec 2004, 01:55:13 »
exactly, its really easy

now to sin,cos, and tan
all of these are used on right triangles
so lets say you have a right triangle with sides a,b, and c (hypotenuse)
and angles x,y,and z(right angle)

*attempt at illustrating*
      x
      /|
c    / | a
    /_|
 y  b  z

side = other side *sin(opposite angle of what you're trying to find)
so
a = b*sin(y)
b = a*sin(x)

cos is the same except it uses the angle adjacent to the side

a = b*cos(x)
b = a*cos(y)

gotta go for now, be back later

EDIT: its pythagorian theorem
« Last Edit: 12 Dec 2004, 01:56:38 by Triggerhappy »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #33 on: 12 Dec 2004, 02:21:25 »
hmm, ok get a little of that

but how would i put any of that to use in scripting

Quote
15 - 10 = 5 (one side or leg as it is called in geometry and stuff)
30 - 20 = 10 (other leg)
then 5 squared, or 52,or 5^2, is 25 (5*5)
and 10 squared is 100
add then together 100 + 25 = 125    ___
and do the square root (calculator) \/125 = 11.18m

so heres a problem for you to do if you want:
guy1's pos = [50,25,0]
guy2's pos = [73,42,0]
find the distance between them

could you do somthing like that again , thanks trigg  ;D

hey im killing two birds w/ one stone, this is the same stuff im doing in 10th grade math. maby it will help me in school 2 as i havent got any of this stuff untill u explain it.(or maby its because i dont space off when its somthing interesting, like ofp) nice of you to explain it to me :)

thanks your the best trigg.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #34 on: 12 Dec 2004, 04:18:02 »
actually, you don't really use that, but you can change it to find angles, like so:
sin-1
cos-1
tan-1
the commands in ofp are:
asin
acos
atan

with those you can find angles:
x = asin (b/c)
y = asin (a/c)
x = acos (a/c)
y = acos (b/c)
x = atan (b/a)
y = atan (a/b)

now to the PYTHAGORIAN THEOREM you really can't learn that name can you?

a few for you to do:
1) guy1: [30,50,0]
guy2: [15,60,0]

2)1: [0,12,0]
2: [37.3,52,0]

3)1: [2,79,0]
2: [53,28,0]

*remember that you always use the absolute value (positive of whatever you get) of their differences to find the distance

answers at bottom nice and tiny








1) 11.18
2) 54.69
3) 72.12

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:scripting.. how long to learn?
« Reply #35 on: 12 Dec 2004, 05:04:56 »
triggerhappy please shut up with those mathematics.. if you want to do them make your own post somewhere.. If you really want to bug me you'll see what i'll do next..  >:(
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:scripting.. how long to learn?
« Reply #36 on: 12 Dec 2004, 14:07:36 »
That's great stuff with the distance and root and all, I figured that out. But cos, sin and tan is still messed up for me. Ah well, that's what .sqf files are for right? ;D

@ OFPFreak, Trigg was explaining OFP maths to us. Fine if you don't want us to take this here (even though it's extremley usefull stuff) but since you've multiple times ignored me when I was trying to help you, I don't really see another purpose of this thread. Fine if you solve the thread, that's your decision because it's not about the orginal purpose of the thread (aka OT) we are discussing here, but why would you as people as me are actually learning some pretty neat stuff here.

:beat: *Gets Shot* :beat:

Offline Noon416

  • Old Bugger
  • Former Staff
  • ****
Re:scripting.. how long to learn?
« Reply #37 on: 12 Dec 2004, 18:15:04 »
triggerhappy please shut up with those mathematics.. if you want to do them make your own post somewhere.. If you really want to bug me you'll see what i'll do next..  >:(
Behave, OFPfreak, or you'll see what I will do next.

Start appreciating the help people are giving to your answers, instead of getting angry at them. If you keep threatening people, you'll soon find that noone will be bothered helping you at all, and then where will you be?
"If a man talks in the woods and no woman hears him, is he still wrong?"

Offline Morglor9

  • Members
  • *
Re:scripting.. how long to learn?
« Reply #38 on: 12 Dec 2004, 19:32:35 »
Scripting length to learn really depends on how good you want the script (I still can't get CamCreate to work). But if you make something simple, all you really need are the kind of commands you'd put into a units init field or a trigger/waypoint's OnActivation field. For example, I made this Shell Shock script using simple commands like fadesound and setfog. I didn't release it because I couldn't make the sound work, but it looks about right and it isn't fancy, which is the point i'm trying to make in the boring paragraph you just read.
Cymbaline

Mr.Pibb

  • Guest
Re:scripting.. how long to learn?
« Reply #39 on: 12 Dec 2004, 19:44:51 »
 Hello OfpFreak

 Ok, decided to just thorw a lil down here, from me that is not indeed 11 years old, but nonetheless quite relevant.

 I have been getting into (really getting into) scripting now for about 3 weeks. Although before this over the years I threw stuff in that was copied, never knew nothin, till just recently. Now already I can make some general scripts, with even some complexity for things I want done (with help sometimes of course, what makes this forum so great ;) )
 If yer anything like me (god forbid  ;D) I usually hate reading 'general tutorials', they are great and all, but personally I like to make stuff happen, kinda impatient.

 So I took the mission that I enjoy the most, un-pbo'd it, and decided what I wanted to see differently in it to my own likings, then started looking into the script and figuring out what did what, and pretty soon stuff started clicking. Next thing ya know a week later after reading some 'specific area tutorials' and poking thro the mission files I had a new working script that made use of the original mission scripts, cool! Was great to see it work out when I tested it. And ya, it took alot of screw ups, getting stuck here and there, but in the end it payed off and I walked away with more experience in ofp editing.
 So my point is I guess, theres more than one 'way' to learn the stuff, rather than diving into trying to learn all the basics at once from a lengthy general scripting tutorial, U might be like me and rather just learn the hard way, which to me is the funner way lol

 Anyhow, take what I said here with a grain of salt, Im just taking a break from working on my mission and thought Id type my thoughts on the subject.

Pibb

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #40 on: 12 Dec 2004, 20:17:40 »
If you'll notice, ofpfreak, your question has been answered more times than nessecary, and IMO, this is the best way of learning. Interactive, talking to people, asking questions, thats why school works the same way, and i prefer that to reading a tut, as do many other people.  Also, this is quite related to your question, because I'm helping people to LEARN SCRIPTING.  These maths can be very important in ofp, and lots of people don't know what they are or how to use them. Personally, i don't appreciate your attitude towards al the help people give you, and if you can't control yourself, then come back when you're older. You want to close down this topic then fine, i can show penguinman these maths on another thread, and hopefully i won't have to deal with your ungratefulness.

sorry admins, if i'm breaking rules here, not intending to  ::)

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:scripting.. how long to learn?
« Reply #41 on: 12 Dec 2004, 22:18:31 »

ok ofpfreak your really starting to get annoying and rude to people who are trying to help you, now im not going to drop down to leech's level(see post"my masterpiece not working")  but as you are already on a warning from earlier. I think you should know that if admins keep having to warn you, I think you could soon find yourself not able to log in to ofpec anymore. Now I am not an admin so I cant do anything like that but im trying to help keep you from having that happen.

as triggerhappy said same goes for me(im not trying to break the rules im just trying to help him) so sorry if thats not allowed

oh and triggerhappy:

pythagorian therom :P :P :P :P :P :P :P :P :P :P :P :P
pythagorian therom :P :P :P :P :P :P :P :P :P :P :P :P
pythagorian therom :P :P :P :P :P :P :P :P :P :P :P :P

but what would you use finding the distance between two objects for in scripting?
maby a very SIMPLE example of a part of a script using this
pythagorian therom :P

thanks man, your very helpfull


Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #42 on: 12 Dec 2004, 22:42:28 »
its easier in scripting (no math involved!)
_xdiff = abs((getpos guy1 select 0) - (getpos guy2 select 0))
_ydiff = abs((getpos guy1 select 1) - (getpos guy2 select 1))
_distance = sqrt(_xdiff^2 + _ydiff^2)
or you could skip the variable thing and just replace it with what they are assigned:
_distance = sqrt((abs((getpos guy1 select 0) - (getpos guy2 select 0))^2) + ...

or something like that, i find it easier the first way (less parentheses)

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:scripting.. how long to learn?
« Reply #43 on: 13 Dec 2004, 03:48:46 »
in reply to everyone.. OK part of this is true.. but im abusing people who are trying to help me?? ok do you call annoying me with mathematics helping me?? dont blame everything on me! and by the way im getting part of the scripting right now.. ::)
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:scripting.. how long to learn?
« Reply #44 on: 13 Dec 2004, 04:03:03 »
the math may not help you, but it helps penguinman, and apparently dmak a little too. if you don't want to bother with it just ignore the posts, i'm doing nothing to you, and don't even try to put any blame on anyone else. numerous times you've been warned by admins for breaking rules, and there was no math involved, or me, for that matter. in fact one of your threads had to be locked because of the way you were acting, all these people wouldn't blame just you unless you were the only one to blame.