Home   Help Search Login Register  

Author Topic: I'm sorry I'm sounding like a noob  (Read 816 times)

0 Members and 1 Guest are viewing this topic.

gerrardperrett

  • Guest
I'm sorry I'm sounding like a noob
« on: 30 May 2006, 23:47:38 »
Hey all

listen i have a simple question, im making alot of OPF missions and i want to make them better, i understand scripts, alot of them rock, but can someone, ANYONE explain what i need to do with the code, where i need to put it and how i allpy it to a mission

thanks for any help

gerrard
« Last Edit: 31 May 2006, 09:04:51 by bedges »

Mark

  • Guest
Re: IM SORRY IM SOUNDING LIKE A NOOB
« Reply #1 on: 31 May 2006, 01:29:10 »
I'll make it as easy and painless as possible mate.

Right! you made your .sqs files right? (or stolen them?).

You'll most likely need a file called init.sqs    .   This is a the script that starts on the initalize at the start of the mission.

So you got your initialization file, go to your :  OFP folder/Users/[username here]/missions/[mission name]/

and paste it in there!



Ok, not everything you want running from your init.sqs file? No worries, execute the script by


[] exec "supplies.sqs" , where supplies is the filename of your sqs file you wanna run!

You should be able to figure it out from there. If you need more help, i'm stalking the forums waiting for someone to reply to the rollcall of the dead thread ^^.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: I'm sorry I'm sounding like a noob
« Reply #2 on: 31 May 2006, 01:38:04 »
*wistfully looks at the non-functioning Editor's Depot*  :-\

In there, you'd find everything you'd need, from tutorials to scripts to annonated command reference. Since the question you're asking is a rather big one, I'm afraid. And I'm not entirely sure I get the question. Here's a reaaaally general kind of way of looking at it though:

In general, scripts come as .sqs files ; these go into the main mission folder (eg. /Users/YourUserName/Missions/YourMission.island). Once there, they can be accessed from the editor in-game.

The script in the .sqs file is executed with the command exec, as so : [] exec "script.sqs". The stuff between the brackets [] are parameters, sometimes optional, sometimes not needed, but often necessary. So for instance the original grouplink script needed two basic parameters : the name of the group being hunted, and an array of groups doing the hunting. So it'd look like this : [MyGroup, EnemyGroups] exec "grouplink.sqs". It really has a million different uses, and I'm not going to try to write a tutorial right here, but that's pretty much the way it works. The first entry is, inside the script, accessed with _this select 0. The second by _this select 1, and so on. Study some scripts, and you should pretty soon figure out how it works.

Hm. Not sure if that really helps, but...well. Try to be a bit more specific, maybe? And don't worry about being new, we were all new at one point. ;)

Cheers.

Wolfrug out.
« Last Edit: 31 May 2006, 09:05:04 by bedges »
"When 900 years YOU reach, look as good you will not!"