OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mondi on 06 Aug 2006, 22:27:29

Title: Scripting Question
Post by: Mondi on 06 Aug 2006, 22:27:29
I've never done this before. So how and where do you type the scripting to get you soldiers to do certain things.

Please help a noob  :)
Title: Re: Scripting Question
Post by: 456820 on 06 Aug 2006, 23:11:49
Well the question is a bit vague but ill do my best to help.

Scripting can range from big long .sqs files to a single line in a soldiers Init field or a triggers On activation field.
These scripts can be put in a soldiers init field - the code will be initialized before the mission starts playing perfect for intros where you dont want to see the player for a split second before the intro starts.
Or scripting could be placed in scripts and ran using this code;

[] exec "script.sqs"

Or you can type the scripts/codes into an On activation field of a trigger which would take afffect when ever the trigger has been activated whcih can be chosen using the Condition line in the trigger.

Well hope that helps a little.
Title: Re: Scripting Question
Post by: Mondi on 06 Aug 2006, 23:17:17
So i go onto trigger and where it says activation i type the code for the certain soldier. Say if i want him to do press ups i find the code put it there and he does the action or is it something else.

Sorry i really dont understand it  :-[
Title: Re: Scripting Question
Post by: marcus3 on 07 Aug 2006, 10:36:42
Dude

Dont feel bad about being a noob, everyone has to start somewhere!
Try to find some tuts on this, ;)
Title: Re: Scripting Question
Post by: Wolfrug on 07 Aug 2006, 15:20:06
Hey there.

Much better than asking in the forums is to head over to the temporary Ed.Depot, and look for tutorials. -> http://www.ofpec.com/ed_depot/tutes.htm

I personally suggest Johan Gustafsson's Scripting Tutorial as an excellent place to start. That's the first tute I did (oh, back in the day  :D), after doing the official come-with-the-game editing tute. But just go through stuff there and you'll find yourself learning some kickass stuff.

Welcome to the forums and OFP!

/Wolfrug out.
Title: Re: Scripting Question
Post by: macguba on 07 Aug 2006, 15:40:10
Yes, you're absolutely on the right lines.   You can also put scripting code into waypoints.

Welcome to the forum!
Title: Re: Scripting Question
Post by: Mondi on 07 Aug 2006, 17:22:34
Thanks for the advice and welcomes  ;) also it says version 2.0 i know my version isn't 2.0 as i don't know how to upgrade it.....Or is it a different version of the tut ??
Title: Re: Scripting Question
Post by: Wolfrug on 07 Aug 2006, 17:28:30
*chuckles* That's just the version of the tutorial. Your game should be 1.96 or thereaboutish, although there hasn't been any new scripting commands since Resistance (as far as I know) 1.75. Or is that 1.85. Ah well. Not a biggy.

As long as you have both CWC and Resistance, you can script anything.

You can go to the official website at www.flashpoint1985.com to upgrade your OFP. It has instructions on how to do everything, and besides helping with such matters is outside the scope of this website.

Good luck!

/Wolfrug out.
Title: Re: Scripting Question
Post by: Mondi on 07 Aug 2006, 17:30:08
I don't have resistance  :(
Title: Re: Scripting Question
Post by: macguba on 08 Aug 2006, 02:50:38
Get it, or more likely the Game of the Year edition, if you possibly can.   GOTY was re-released last year for about GBP10.   It's not just worth it, its a no-brainer.

In the meantime update your game to version 1.46.
Title: Re: Scripting Question
Post by: Mondi on 08 Aug 2006, 14:52:01
My other disk didn't work so i bought a new one and that was 1.46....So can i still not script ?
Title: Re: Scripting Question
Post by: bedges on 08 Aug 2006, 16:31:22
yes, you can script. however, you won't have access to the full range of scripting commands until you get your hands on the resistance game, version 1.96. as mentioned above, getting the GOTY edition is your best bet, as it has all three campaigns included, and all the latest scripting commands, and doesn't cost anywhere near an arm or even a leg :)

Title: Re: Scripting Question
Post by: Mondi on 08 Aug 2006, 17:14:23
Ahhhhh......Thanks Everyone  ;)