Jump to content
Marcog93

VBS3 Scripting editor help needed

Recommended Posts

Hello everybody!

 

I am a research student working on his final thesis on a Helicopter Simulator implemented in VBS3.

 

I would need to do some script in order to create a training field in VBS3, something like targets appearing that responde when you pass throught.

 

I was used working with unity and there it´s easy to access the editor and code there. Here in VBS3 I think it´s different, I have seen that there is the possibility of writing and external function and name it with .sqf extension and then call it, but where do I call it in VBS3? Isn´t is possible to write some code directly inside VBS3?

 

Are there any other ways of creating interaction between things without scripting?

 

I wish a good day to all of you,

 

Marco Gotelli

Share this post


Link to post
Share on other sites

Hello. 

 

Basic principle is same, as in Arma: save your scenario (may be in skeletal state) in editor, then go, where saved scenario folder is located, into this folder, and directly there create new text file, then rename it to: init.sqf.

 

To keep it simple, Init.sqf is the script file, that is automatically run at mission start. Other custom sqf files should be called, spawned or execVM-ed from there or just write your script directly inside init.sqf, however this is not recommended, if script is extensive (readibility/clarity/work comfort reasons). There are alternative ways involving addons' configs, other automatically run sqf files and such, but init.sqf is most basic and common way, suitable for most situations. Then edit your sqf files using external editor, like Notepad++ or whatever you prefer. 

 

Technically there's also a way to write scripts (or execVM external sqf files) directly in the editor, namely init fields of editor-placed objects, condition/activation fields of the triggers, completion fields of waypoints and also there's a developer console, but all this serve mostly for some makeshift on-the-fly short scripts during tests/debugging or for some really simple one-liner stuff, mostly refering to the object, whose init field is used. 

 

Quote

Are there any other ways of creating interaction between things without scripting?

 

Some and very limited, also depends, which VBS version you're using. In the newest there may be more possibilities. Triggers, waypoints, maybe some modules and such, but also those involve some most basic scripting for their condition/activation fields. 

 

Common way for extensive, complex projects is init.sqf + other sqf files way. 

 

Apart from sqf there may be used FSM files, also there's so called Fusion for external plugins (in C++ AFAIK, don't know much about these, I'm not a programmer). But each involves code editing out of editor. 

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

×