Jump to content

eddyaod

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Everything posted by eddyaod

  1. Hi all, I recently discovered vehicleVarName's (only began playing around with Arma scripting 3 weeks ago) and I feel that they may help me with a few problems I've been facing, specifically regarding keeping track of objects whilst using the inbuilt respawn functionality. I'm thinking of reworking some of my code to use the vehiclevarnames. However, I'm not entirely thrilled about adding what is basically another layer of indirection unless there are no better (non-hacky) ways to handle situations where you've passed an object reference to an SQF and need to monitor the object beyond it dying and respawning. Has anyone got any good paradigms they stick to when handling this kind of thing? As a further note, I'm also considering replacing the inbuilt respawn system with one that provides more flexibility but I'd like to make sure I'm getting the most out of the respawn system before needing to reinvent the wheel. Are vehicleVarNames still good in light of this? (I could handle passing of varnames to the respawned objects myself, but would that make an alternative system pretty much transparent to dependent code?) tldr; Do you like vehicleVarNames (and why) or do you have a better system involving public object references?
  2. From what I understand, if you use "call" to execute code within a script the code called by "call" has access to any variable in scope in the parent script at the "call" command. It's a pain to declare all variables in any sqf as private at the start to prevent interfering with the outside scope, has anyone got any better solutions?
  3. Are you saying setVehicleInit only appends it's arguments to any already existing init code? :eek:
  4. It would run but you wouldnt be able to get the return value. As for the regex method, it's perhaps more trouble than it's worth as you'd still have to go back and use the regex every time you add / remove / rename variables. Might as well just take care of your private array as you go along editing...
  5. BISL, cos then we'd writing lines of "bizzle"
  6. Wow, what a thread. I have to sympathise a little with cackle, new to arma scripting, first saw sqf and though WTF is this butchered C++ / matlab like language with if.. then's (who needs a freaking "then"?!), semicolons at the end of blocks etc... throw in locality issue in MP which i'm pretty sure BIS could've shielded scripters from better whilst preserving nearly all functionality. However, there's a brilliant saying I try to live by, "a good craftsman never blames his tools". If the API has at least 1 get and 1 set and the language is turing complete, we're good to go!
  7. See this post, the solutions from shk or UNN should suffice, linkie
  8. Well, you can edit the AI's state machines, if you had enough determination you could probably develop much more heavily detailed AI. As for a genetic approach... eugh, who'd bother for a computer game?
  9. In XP: Documents and Settings\username\Local Settings\Application Data\ArmA 2 or the equivalent in vista whatever that may be....
  10. Nothing wrong at first glance (except perhaps a semicolon after private [...], tried that? ). Tell us how you're calling it. Edit: In there late with the ";"
  11. galzohar, I'm currently working on something a little similar. It's my first attempt at scripting for arma. I've put in at least around 150 hours in the last three weeks (recently finished university, no life commitments FTW :D ), hasn't even got any objectives yet (just started working on an "objectivesManager.sqf"). Locality issues are the most tricky thing and every day I think I've finally got it sussed only to spend a few hours tracing a bug to discover another "feature" of locality. Anyway, I'm pleased with the progress I'm making just in terms of knowledge, despite not having much of a mission to show. As I get better at the coding I can actually put more effort into the gameplay design, but as you said, a lot of the ideas I have end up being unbalanced or boring. But hopefully I'll get some basic framework out into the community in the next couple of weeks and then get some user feedback and suggestions.
  12. Thanks for the input guys. From what I've tried, the best system I found is to use vehicle var names AND public object references, and I've changed my scripts to still take object references as parameters but check objects for varNames, and in the case that they have one, to operate on whatever object has the varName at any moment as opposed to sticking to just one object. Haven't genericised the system in a way i'm happy with yet, as I prefer to avoid passing around large pieces of code as strings. Makes the bugs/errors even harder to find.
  13. I feel that no amount of dynamic or clever SP content will top playing games with + against other humans. The MP scripting situation is very tough though, but the coding's half the fun right?! :)
×