Search the Community
Showing results for tags 'basics'.
Found 4 results
-
I'm trying to learn some basic facts about scripting. I'm probably a bit older than most folks who play with the scripting end of the editor as I've never taken a class that even touched on computer coding...so please be kind. I'd like to understand the difference in local vs global variables. What determines whether a local or global variable is to be used? Can they be used interchangeably within editor (like inside a units' init field or the on act field of a trigger)? Or can I use global variables only inside things like triggers or local variables in called scripts? Is the underscore (_) the local or global version? Any info would be helpful. As I said; I'm pretty lame when it comes to things like this (but at least I'm trying to do something about it). Thanks in advance.
-
I'll preface this with the statement that, I do understand a bit about scripting, but I am in not in any way, skilled or even very familiar with code type thingies. Therefore, most of the missions I had put together were done entirely using things I could do directly from within the editor. I placed my units, gave them waypoints, set triggers and used the modules, etc...that were available. Most of my earlier missions were never too complex, so it was usually pretty easy to get something up n running that way. Just point and click stuff without a need to call any scripts. But...a while back, I did eventually start using some basic scripts I'd found in other folks work to make it a bit easier to do or to spice my stuff up a little using animations, etc... The "FILL HOUSE SCRIPT v1.5 - by SPUn / lostvar" that I found in the "Operation Dagger" mission (from oneshot) was my go to script for quick town shoot'em ups. Hell...half of my problems would disappear if I could just get THAT to work again. But since the EDEN editor was released, none of my missions work any more, and I couldn't get the old scripts to do the things they did before. So, in frustration, I gave up for quite a while (the loss of all of my missions really took the wind from my sails) and I resorted to only playing missions I found in the workshop. And...for sure, there are some really great missions there, but so many of them require mods to run. My group prefers to use the vanilla version of ARMA. Mods aren't a thing with us, so options are pretty limited as to which missions we can actually play together. And, I also really miss the ability to slap together some new quickie firefights for the Friday Night Fights. So...I've decided to give mission building another try...but I have a couple of questions; 1. Where do the folders go, that hold the short scripts I used before? The scripts I used before were kept in folders inside the main mission folder (right along side the init...briefing...etc). But those folders aren't there anymore. I can't find them ANYwhere. I tried to simply place some of the old folders inside the mission folder we get now (i.e. my folder inside the mission folder), but that didn't work either. When the script is called, I get an error or the mission simply freezes and/or dumps me. I don't understand where the scripts are kept now, so that I can call them when needed. 2. How do I determine if a variable is supposed to local or global? And which is which? Underscore is local or global? I'm trying to use the spawnGroup function from inside a trigger (on activation). The group spawns, but I can't use the addWaypoint to get them to do anything other than stand around in formation. An error comes up that I'm trying to use a local as a global (or the other way...I don't remember which right now). I tried entering the variables with and without the underscore, but it didn't make any difference. Please be kind. I've searched the tutorial vids, but most of them are for before the change. So they don't help much. And I tried digging through the forums, but unfortunately, like the video tuts, most of the posts here aren't updated so that we know what works in the latest "patch" and what does not. So I apologize if the answers are here already, but after three days of searching and trying things from posts and/or videos from years ago, with no luck...I'm at my wits end and felt that I had no choice but to ask again. Thanks for any help you can share.
-
Although I've been playing around in the editor for awhile now, I still end up going back to the forums for help...a lot. There's one thing I've done that helps me out when I get an idea for a new mission; I've made up "SEED" map missions. One for each of the maps. These maps contain things like an in game arsenal, weapons that are attached to vehicles, units of different factions with altered loadouts...even some props. I also made a few that contained help with doing things I didn't (and probably still don't) understand. Things like how to use animations and such. I just open the seed map, use the things I want in my new mission and delete anything I don't. To be sure, these are not completed missions...just some things I use often. Anyway. My reason for this post is in hopes that someone among you elite, awesome, super groovy folks with insane scripting knowledge, could support the idea of making some simple missions that would help folks produce there own. The missions wouldn't be full blown missions. That would actually defeat the idea. And I'm not asking for your signature script. Just something to illustrate/demonstrate how something can be done; Do you know how to respawn with your favorite loadout in a multiplayer game? Make a mission that shows how it's done. How about turning off the Fatigue or sway? PLEASE...write one up and show us how you did it. Off board artillery...waypoints...settting tasks...saluting soldiers or triggers... Anything at all. I'm sure there's nothing too basic for a lot of us. My reason behind this idea, is that the constant swapping between the forum or video tutorial and the editor...copying, pasting, hoping that you get the syntax correct, hoping that the poster even knew what he was talking about...can get insane and frustrating. I figure that when these seed missions are put out for us to learn from, they will work (at least they should work. Just sayin'). The only real requirement, is that the missions must be available for others to open in their editor. So something that's published to the workshop wouldn't work (I don't know exactly how they should be shared...ideas?). This way, they have a working bit of editing/scripting that they can either study to learn something or just use it in their own missions as is. Thanks for taking the time to read this, and thanks to any who contribute to the cause.
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, usualy I write a function put it in an example.sqf and then I do this: fnc_example = compileFinal preprocessFile "example.sqf"; now I have a file with a bunch of functions in the file example_fncs.sqf like this: fnc_example_a = { }; fnc_example_b = { }; fnc_example_c = { }; how can I preprocess the file and precompile that functions for the later use with call and spawn?- 21 replies
-
- compile
- compileFinal
- (and 6 more)