Jump to content
Sign in to follow this  
avibird 1

We need a STICKY THREAD of working examples of the scripting commands!

Recommended Posts

Somebody said playing ARMA is like playing legos and the scripting commands are the basic building block. I don't understand scripting language but I have learned a little by looking at other peoples work/codelines. I Feel that if we had a STICKY THREAD of this http://community.bistudio.com/wiki/Category:Scripting_Commands

With working examples of the functionally of the commands it would help unbelievably the majority of people like me who ask basic to moderate questions about scripting for this game. Sometimes the information is there but because we do not have a working knowledge of scripting principles the simple things can get very frustrating for us and the master scripters that help the majority of people on this thread. I still get lost most of the time reading the scripting commands on the site knowing how to insert into a codeline of a script to get it to work in a mission. What do you guys thing!

Share this post


Link to post
Share on other sites

What's wrong with having that information on the Wiki ? In a thread on the forum, it would be much more difficult to find information, while on the Wiki, you can search for the actual script command directly, or browse through the available commands...

Edit: Maybe it would be a good idea to add a script repository to the Wiki ? Something like "Scripts you just copy and paste into your mission"

Share this post


Link to post
Share on other sites

Hey Varanon this is what I mean I am looking at four commands

1. setMarkerDir

2. setMarkerDirLocal

3.direction

4. getDir

To try to solve an issue getting script to work for a mission but I have no real clue how to correctly insert this into a codeline or the true functionally of the command based on the wiki information. If there was a working sample mission I could open it up and take a real look to try to get it to work in a my script. This is my point.

Share this post


Link to post
Share on other sites
Hey Varanon this is what I mean I am looking at four commands

1. setMarkerDir

2. setMarkerDirLocal

3.direction

4. getDir

To try to solve an issue getting script to work for a mission but I have no real clue how to correctly insert this into a codeline or the true functionally of the command based on the wiki information. If there was a working sample mission I could open it up and take a real look to try to get it to work in a my script. This is my point.

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

Example 1:

"Marker1" setMarkerDir 90

The syntax is also very helpful

Syntax:
[b]markerName [/b]setMarkerDir [b]angle[/b]
Parameters:
markerName: String
angle: Number

The "local" at the end of the marker commands means that it will ONLY happen on the computer who executed it.

Actually all of the commands you posted have an example.

Share this post


Link to post
Share on other sites

I'd certainly back a sticky for Dialog and resources.

Share this post


Link to post
Share on other sites

Not a bad idea really. If I'm getting it right the important bit is the working examples. As long as these are kept simple and precise I can see a benefit. The command reference sure is a very handy tool as it also shows you how to use a particular command. However it's written for people with at least "some" scripting knowledge and not for complete beginners. Man pages of sorts really.

Edited by Demon Cleaner

Share this post


Link to post
Share on other sites
Hey Varanon this is what I mean I am looking at four commands

1. setMarkerDir

2. setMarkerDirLocal

3.direction

4. getDir

To try to solve an issue getting script to work for a mission but I have no real clue how to correctly insert this into a codeline or the true functionally of the command based on the wiki information. If there was a working sample mission I could open it up and take a real look to try to get it to work in a my script. This is my point.

If you type the name in the wiki's search box, it will immediately bring you to a page with all the information you need. That's why I think that the wiki is a much better place to store such things, it's basically a database,,, search for "direction" on the forum, and you get threads about everything with the word "direction".

If the information on the wiki isn't helping you, replicating it here won't change that either. If at all, the Wiki should then be expanded.

I don't see any reason to create yet another, less accessible form of information source.

---------- Post added at 07:37 PM ---------- Previous post was at 07:36 PM ----------

Not a bad idea really. If I'm getting it right the important bit is the working examples. As long as these are kept simple and precise I can see a benefit. The command reference sure is a very handy tool as it also shows you how to use a particular command. However it's written for people with at least "some" scripting knowledge and not for complete beginners. Man pages of sorts really.

Which is exactly what the wiki is: man pages... modify those with examples.

Don't get me wrong, I agree that the Wiki pages are lacking in some respects, and it would be a good idea to expand the examples with some more infromation.

For example the marker functions (createMarker, setMarkerDir etc) could be expanded by an example that basically shows you how to create a complete marker, setting shape/color/icon etc...

Edited by Varanon

Share this post


Link to post
Share on other sites

There's the BI Wiki with working examples already. I really fail to see what a thread, sticky or not, could do better.

Yes, the Wiki has not every command you need ready for copy&past but the samples point you in the right direction so you can figure the rest on your own.

Everyone is free to add more examples if he feels like.

Besides that there's help with examples in the editor already. Type the command and upon autocompletion press F1 for help and sample.

Share this post


Link to post
Share on other sites

Besides that there's help with examples in the editor already. Type the command and upon autocompletion press F1 for help and sample.

WHYYYY :( That feature is dope and REALLY helpful. Thanks for mentioning it.

Share this post


Link to post
Share on other sites

Like said above: Everyone can participate at the Wiki, that's what it is there for. Be the first to provide some better samples. :)

Share this post


Link to post
Share on other sites

Everybody can document it.

EDIT : Didn't see Wolle's post..i'm getting old.

Edited by ProfTournesol

Share this post


Link to post
Share on other sites

I can't even see a register function? :confused:

Share this post


Link to post
Share on other sites
I can't even see a register function? :confused:

Same. I see a "Sign Up Today" link. But then it takes me to a page to login & no registration button / process. Regrading the OP, I think he's looked at the wiki & just finds it really vague at times. Add to that alot of contributors don't provide examples in a practical way. I guess that's my opinion... along with many many others. In example, using hexadecimals instead of a normal value/number to define dialog styles. A frame style; (0x40 == 64??). Unless I'm not understanding something, why use hexadecimals at all when you can use a normal number? Which I did convert all hexadeciamls I could into normal numbers and it worked fine. Anyhow, that's another topic/question for another thread, but merely showing an example of how the wiki can be unecessarily complex at times.

Edited by Iceman77

Share this post


Link to post
Share on other sites

I would be willing to help improve the pages that need more clarification. Maybe people could point out those pages that need improvement, and some of the more experienced scripters will fill in the gaps ?

Share this post


Link to post
Share on other sites

I can login just fine, but I have an existing account already. Maybe new registrations have been disabled for whatever reason then. Can't tell, not really my department.

Thing is, such a thread here would soon be filled with all kind of discussions and scripting questions, making it just a huge mess where you won't find anything at all. Trust me, it will be like that. :)

Share this post


Link to post
Share on other sites

Would be nice if registration opened up again :)

Share this post


Link to post
Share on other sites

Hello gentleman My major point is that you guys must get tired of answering the same old questions day in and day out from non scripters, beginners and people who can't really understand scripting language like me(: but I can open up a mission and look at the files and figure things out a little lol. The main issue I have is how to insert the scripting commands into a basic script to make the commands work and the mission. Yes the Wiki pages have all the information but if you can't read chinese you can't order dinner! I hope you understand my point! SIMPLE DEMO MISSION FOR SCRIPTING COMMANDS would be a great help and cut down on all the easy questions you guys see all the time. sincerely AVIBIRD

Share this post


Link to post
Share on other sites

This is a perfect example what I am saying about the Wiki pages. I have been looking for some answers for a few issues that I have been trying to workout on some codes/scripting for a mission nobody had any real input for me however today F2K SEL provided me with the moveToCompleted command. This is one of the things I needed to get some of my issues workout however no where on the wiki page would have told me to try this command for my issue. If there was a DEMO MISSION showning the use of this command I would have look at it and my issue would have been done. It took me over a week and half and multiple threads to get the right information I was looking for.

Syntax:

Boolean = moveToCompleted personParameters:person:

Object Return Value: Boolean

Share this post


Link to post
Share on other sites

The best you can do is compile your own commands / snippets into 1 text file. As you learn new commands, place a working example along with a comment or two within a text file.

Share this post


Link to post
Share on other sites

Exactly that's what I do when running over something new. :)

Share this post


Link to post
Share on other sites
The main issue I have is how to insert the scripting commands into a basic script to make the commands work and the mission. Yes the Wiki pages have all the information but if you can't read chinese you can't order dinner!

This sounds more like a basic issue. I take it you have at least skimmed over MrMurray's Editor Guide ? It's been written for ARMA but most of the info is still relevant, and will answer a lot of questions as to how to apply basic scripting, and where. Please don't get me wrong when I say this, I am not trying to mock anyone here. But for advanced topics you need to know the basics, and if you think it an issue where to put commands, then you need some more basics.

I hope you understand my point! SIMPLE DEMO MISSION FOR SCRIPTING COMMANDS would be a great help and cut down on all the easy questions you guys see all the time. sincerely AVIBIRD

I am not sure what you would like to achieve iwith a "simple demo mission". You'd want a complete demo mission just to e.g. set a marker?

The Wiki is the best place for this kind of information. It can be edited by everyone (even though it seems that the registrations are disabled), it is much easier to navigate than a forum thread, and it is accessible. You don't need to extract a pbo or achive file to get to the information. The only thing that's wrong with it is that some of the explanations are lacking, are too short, or non-existent. That is something that should be corrected. Other than that, it's a great resource for scripters, and a commendable effort by those that made and maintain it.

About your example of the moveToCompleted command, what is the issue with that? I think it says everything there is to know about it: It returns a boolean indicating whether or not the last moveTo commmand is finished or not. If you don't know how to apply this information, then a demo mission wouldn't help you either. In that case, you really should read MrMurray's Editor guide; that is something that any scripter shiould have done anyway, since it is the most comprehensive resource on the topic.

---------- Post added at 11:29 ---------- Previous post was at 11:28 ----------

The best you can do is compile your own commands / snippets into 1 text file. As you learn new commands, place a working example along with a comment or two within a text file.

And then, copy and paste those examples onto the Wiki for others to learn from it ;)

Share this post


Link to post
Share on other sites
Hello gentleman My major point is that you guys must get tired of answering the same old questions day in and day out from non scripters, beginners and people who can't really understand scripting language like me

Yes the well hidden search function to find questions people have already asked is indeed one of our best kept secrets.

Share this post


Link to post
Share on other sites
Hello gentleman My major point is that you guys must get tired of answering the same old questions day in and day out from non scripters, beginners and people who can't really understand scripting language like me(:

If these questions have been answered day in day out, why do you want them in a sticky? Search will find them. The trick is asking the right question in search. There are other resources too. Armaholic has some good stuff, OFPED is quiet and maybe a little out of date, but there's lots of good stuff there. Often a simple Google search will turn up hits on other sites.

The main issue I have is how to insert the scripting commands into a basic script to make the commands work and the mission.

It isn't easy for any of us. The documentation is poor. Often it's a case of trial and error.

if you can't read chinese you can't order dinner! I hope you understand my point!

I hope you understand the following 2 points without prejudice.

Your questions are often huge walls of text that are difficult to read.

If you want another analogy - if you're having so much trouble understanding the answers, perhaps you're trying to learn to run before you can walk?

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  

×