Jump to content
Sign in to follow this  
Scatty85

Basic guide??

Recommended Posts

Hi,

Apologies for this noob question but I cant seem to find a "basic guide" to scripting. I've been looking on this forum and I'm getting pretty frustrated that all the info seems to be aimed at people who seem to already know what they are doing and not someone like me who doesn't know where to write the script let alone try anything out.

Surly you scripting geniuses weren't born knowing this information??

Cheers.

Share this post


Link to post
Share on other sites

Hello and welcome to the wonderful world of Arma scripting.

It helps if you have some basic coding knowledge, but its not needed.

Start here:

http://community.bistudio.com/wiki/Scripting

Then for reference use:

http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2

When I started with this scripting business it was for OFP and then we didn't have the Wiki :)

And there are some users here which you may call "wizards" their knowledge is beyond the Guru.

And if you stumble upon any troubles, please search these boards or the Arma editing and scripting forums.

Most topics has been covered if not more than ones.

Get used to get frustrated tho' its part of the coding, it all gets back to you when your hard work pays off into something which works.

Good luck!

Edited by Taurus
Sorry Zombie xD

Share this post


Link to post
Share on other sites

Try crawling through the "Biki" http://community.bistudio.com/wiki/Category:Scripting_Topics you can get script descriptions and samples. There is very much to be learned there. www.ofpec.com also has many tutes for many situations. Welcome to the always rewarding and mostly frustrating world of scripting!

Edited by {USI}_Zombie
Taurus beat me by that much with the same reply!

Share this post


Link to post
Share on other sites

Ok I've read that and got the basic idea but where do I write the script?

I'm trying to write a basic IED script. Ie man gets near a car and it blows up.

created a player

created a car and named it bombcar

created a trigger which is 10m x 10m circle around the car

In the On Act field I've tried to write

bomb = createVehicle "Bo_GBU12_LGB" getpos bombcar;

So my understanding is that when the man gets within 10m of the car the script will create a bomb at the bombcars position. But I keep getting "missing ;" from the editor??

This makes no sense?!

Share this post


Link to post
Share on other sites

You're missing some ():

bomb = createVehicle "Bo_GBU12_LGB" (getPos bombcar);

Share this post


Link to post
Share on other sites

With what kylania said... for fact's sake... you dont NEED the parentheses but it helps to make it look more organized. I often use

bomb = createVehicle "Bo_GBU12_LGB" position unit;

Always works for me. Not sure but I think if you remove the "bomb =", you might not get the error anymore. Don't think the game likes you defining variables in the editor. I will give this a try momentarily.

Share this post


Link to post
Share on other sites

Doh.. had it backwards:

bomb = "Bo_GBU12_LGB" createVehicle getpos bombcar;  

That works.

Share this post


Link to post
Share on other sites

Oops. lol I actually referred to a script of mine that does this and didn't even realize I typed it backwards here too >.>

Share this post


Link to post
Share on other sites

Really helpful thread! This should be sticked, much help sources here for scripting. I never even knew that wiki was out there. Thanks for posting those links!

Share this post


Link to post
Share on other sites
Really helpful thread! This should be sticked, much help sources here for scripting. I never even knew that wiki was out there. Thanks for posting those links!

:confused: There IS a sticky with all this. And the first link is to that wiki. :cry2:

Share this post


Link to post
Share on other sites

There is no well made simple tutorial for BIS scripting. The information is all fragmented and ambiguous. Try to read this, its the closest to what you want, I guess: http://tactical.nekromantix.com/tactical/wiki/doku.php?id=arma

There should be something very simple, full of basic tutorial samples and describing the general system of the game like classes, inheritage / overwriting, configs, file formats etc. In a pinned thread. There is no such thing.

Edited by afp

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×