Jump to content

Magirot

Member
  • Content Count

    363
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Magirot

  1. Corrections to my ill-advised counsel: 1) this addEventHandler ["HandleDamage", {false}]; works fine. 2) You should use it instead of allowDamage FALSE. See your old thread for more.
  2. Catalyst317 made another thread here before this thread was moved to the correct forum. Harzach's info was completely new to me, and sounded so weird I had to check it... Yeah, it is the case, and even the event handler seemed to fail half the time, with same behaviour as explained above. I wish the wiki had something on this.
  3. If you want to use quotation marks inside a string, use either ' or "". call compile format ["publicVariable 'cache%1'", _x]; //or: call compile format ["publicVariable ""cache%1""", _x];
  4. Did you save the mission before previewing? Also make sure you're not previewing the "old" playthrough (use restart). I'm not very familiar with the 3d editor but it seems to require these.
  5. That's weird, I tested with either and both of them, all with the same result. Are you sure you don't have anything you tested in init.sqf interfering with it or something?
  6. It would be this addEventHandler ["HandleDamage", {0}]; since boolean is differentiated from numbers in C#. this [url="https://community.bistudio.com/wiki/allowDamage"]allowDamage[/url] FALSE; works better, though.
  7. Was this without the BIS_fnc_MP line, or did it happen even with it?
  8. You can add && cursorTarget _target to Cigar0's condition and they'll have to be looking at it directly.
  9. I guess in that case you could use a quite humongous call compile format: But I'm not sure you actually need to declare a separate identifier for each of them? Couldn't you just use local variables and then keep track with the event handlers you add?
  10. Huh, now that I tested it, same for me. Pretty weird, given that it definitely did damage in one of our MP games, and I've seen the AI react to attached objects. Even though these occured some while ago and it might've changed, I assumed the issue in this post of Evilhardt is related, and it's fairly recent: "One of the bots has all weaposn removed and a camping lantern attached to his hand. He needs to be the leader of the squad, because if he isn't his pathfining will go nuts and he will teleport all over the place because of the lantern." I'll confirm it in MP next Sunday, if it's still there I guess Das Attorney's suggestion to disable simulation would work nicely. I thought you can't attach objects that've had their simulation disabled. I never actually tested this because I just assumed the wiki is correct... Yeah, it actually works nicely for disabling PhysX. I could use it for the rescue boat pushing. Too bad there's no way to easily follow when to enable the collisions again. Wow, I've completely missed these, thanks. I wonder what Epe stands for? But when I tried them, I couldn't get any of them to fire with the boats. At least the hints didn't execute when I tried this: What am I doing wrong? Anyway, thanks for the answers, everyone. :)
  11. Sure, but as said, at the moment I have no idea what could even be causing it. Changing a side hasn't previously affected wearing uniforms that the unit has on already, or that are applied by script, only uniforms that the player interacts with in-game.
  12. The BIS_fnc_MP line I put in post 24 should do that. onPlayerRespawn.sqf is only executed for the player respawning. You could use it to define the loadout though, if you use the BIS_fnc_MP line for addUniform.
  13. Magirot

    Animals on Dedicated Server

    Huh, that's good to know. A feedback ticket Does the normal function cause problems (besides increased load) if you just switch createAgent to createUnit?
  14. I'm stumped then. I guess you could still try putting the above uniform thing in the trigger, but I've no idea of what'd cause the uniform to disappear in the first place.
  15. Magirot

    Animals on Dedicated Server

    Are you sure it's because of the dedicated server? Because I've occasionally gotten only shadows in SP as well, and I just assumed it's because they've somehow spawned underground.
  16. Nope, again, you can't combine identifiers like that, but you can use compile in the same fashion as above: call compile format ["_vehicle = vehicle%1", random (0+(paramsArray select 1))];
  17. I guess the simplest way would be to create a trigger with this in the condition box: count units POWS == 0 and this in On Activation: { _x switchMove "" } forEach [hostage1, hostage2, hostage3]; Since triggers are global it would execute for everyone. Edit: Don't fill "" with anything, it's empty to reset it to default. Edit 2: Oh, POWS hasn't been setup as a group, then you need something else to check if they've been rescued. If all the players are in the same group, you could use (as the condition, instead of "count units POWS == 0") POWS in units group player though that might result in weird stuff if some of the hostages are dead.
  18. For question 1, you have to use call compile format ["vehicle%1 = createVehicle [etc etc];", _x]; otherwise it'll mix different datatypes and stuff. Question 2, what you want is hint format ["BLUFOR have destroyed a cache! %1/%2", INS_west_score, (paramsArray select 1)]; Check the documentation of format: formatString: String - a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc.
  19. How are you testing it? If it's for MP, there are locality issues that should be taken into consideration here. 1) playMove needs to be executed for the client where the unit is local. addAction script is local to the person using the action, so you'd at least have to run the animation switch back to normal only after the unit is in their group (hoping that "AI units are always local to the client of their leader" saves the day). 2) switchMove needs to be executed on every computer, there was a thread some time ago where people couldn't get it to work even with BIS_fnc_MP. I haven't tried it so I can't say. But in SP there shouldn't be such problems.
  20. Wait, so the uniform disappeared even though you didn't modify the loadout? Now I again have no idea what's going on. The side change alone shouldn't affect it since the default uniform is from the unit config itself. Edit: Or do you mean that you use the respawn menu inventory thing? Kind of weird if Bohemia hasn't taken the locality of addUniform into account there... You can just add something like this in the side switch trigger (linebreaks here for clarity's sake) copieditems = uniformItems player; removeUniform player; [[player, "U_B_CombatUniform_mcam"], { (_this select 0) addUniform (_this select 1) } ], "BIS_fnc_spawn", TRUE] call BIS_fnc_MP; { player addItemToUniform _x } [url="https://community.bistudio.com/wiki/forEach"]forEach[/url] copieditems; Also copies the items from the old uniform so that part doesn't get wiped out.
  21. I guess it might've been the amount of gear, my memory is not the best.
  22. You can put it wherever you setup the respawn loadout in, just replace your original addUniform with it.
  23. This is wholly related to addUniform not being global, unlike all of the other commands for adding / removing container items, and even removeUniform: Added uniform disappears in multiplayer addUniform is NOT Global (feedback tracker) Since onPlayerRespawn (Edit: and the trigger as well, when the condition is player in thisList) is only executed for the player who is respawning, you have to replace the addUniform line with BIS_fnc_MP. It normally requires you to declare a new function for this, but using BIS_fnc_spawn (to pass code directly, instead of needing a new function) should work: [[player, "U_B_CombatUniform_mcam"], { (_this select 0) addUniform (_this select 1) } ], "BIS_fnc_spawn", TRUE] call BIS_fnc_MP; (replace the uniform name with something else if needed)
  24. We had constant problems with briefing gear selection in ArmA 2 MP, with or without JIP. I mean stuff like selections sometimes not reacting when you try to pick them, gear not being updated to others after it'd been picked, not getting a gear which you set up in the briefing into the actual game etc. Seemed to have a ~50% chance of happening regardless of the mission. (The worst part was that it took so darn long for everyone to fuss their gear together, though.)
  25. Just to confirm, BIS_fnc_relPos differs from modelToWorld in that it also gets a relative direction?
×