Jump to content

das attorney

Member
  • Content Count

    3985
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by das attorney

  1. Try this (you can paste it in the debug console to check). Seems to work ok for me - let me know if you have any probs. Parameters are: initial position number of vehicles types of vehicles max dist from another vehicle min dist from another object player allowDamage false; // testing line fnc_spawnVehicles = { params ["_pos","_numbVeh","_vehTypes","_maxDist","_separation"]; _vehicles = []; for "_i" from 1 to _numbVeh do { _newPos = [_pos,0,_maxDist,_separation,0,1,0] call bis_fnc_findSafePos; if (_newPos distance _pos < _maxDist) then { _veh = createVehicle [selectRandom _vehTypes,_pos,[],0,"can_collide"]; _vehicles pushBack _veh; _pos = _newPos } }; _vehicles }; _vehTypes = [ "O_MRAP_02_F", "O_MRAP_02_gmg_F", "O_MRAP_02_hmg_F" ]; _pookiesNewVehicles = [getPos player,4,_vehTypes,30,12] call fnc_spawnVehicles; It returns the vehicles that were spawned
  2. das attorney

    AI Discussion (dev branch)

    Hi, Not trying to shout you down, but I think this kind of command would be extremely situational. It would work well if you are in open fields and came under fire, but if you consider building-to-building combat, then it would be really messy. Let's say you are crouched, then you would have some units in good cover suitable to their (and by extension, your stance), but then some other units crouching behind high (6' + tall objects). And the worst would be units crouching behind things they could go prone behind. But yes,agreed that sometimes you want them to do stuff and they act like dummies and stand there waiting to be mowed down. This game could really have done with some sort of cover-node system (defined in the models and used by the ai routines), but it looks like the left hand wasn't talking to the right hand, so all the objects got made, and then the guys that program the ai were told "that's what you've got, now make it work" xD edit: I meant to say that there was a mod for this back in Arma 2 (so you see how long people have wanted this)! It worked ok, but the criticism above applied. For your interest: http://www.armaholic.com/page.php?id=8484
  3. das attorney

    Is a function more usefull

    It depends. If they are functions that can be ran within the script, and you don't need them elsewhere, then don't bother. If you need access in another script, then yes, define them in cfgFunctions or by some other method.
  4. das attorney

    Count string in string

    I would do: _manipulate = "My first line<br/>My second line<br/>Third line<br/>you guessed it, fifth line<br/>I lied that was the fourth."; _manipulate = _manipulate splitString "<>"; _manipulate = _manipulate select {_x find "br/" == -1}; diag_log _manipulate Should return this: ["My first line","My second line","Third line","you guessed it, fifth line","I lied that was the fourth."] Then you can do all the endl stuff with forEach to use it in a tooltip or whatever.
  5. That's what the spoiler tags are for. I have no idea without seeing some code, or it is all guess work and supposition. I have a similar system in my missions and it works no problem so no idea what's going wrong for you. Personally i feel discussion is moot and seeing the code would be much more helpful. However, that is your prerogative. Perhaps someone else can help you.
  6. das attorney

    General Discussion (dev branch)

    I always phone it in on a Friday so no probs dudes - you might as well carry on and make a weekend out of it!
  7. das attorney

    On screen error

    Check the syntax for this: _wp1 setwaypointstatements ["this land 'land'"]; It should be like the one later on in your script _wp3 setWaypointStatements ["true", "{deleteVehicle _x;} forEach thisList + [vehicle this];"]; like _wp1 setwaypointstatements ["true", "this land 'land'"];
  8. // set _myCampingLight setVariable ["direction",getDir _myCampingLight]; // get _dir = _myCampingLight getVariable ["direction",0];
  9. das attorney

    Simple Object Checkbox Gone?

    That's a good explanation, but I think it could have been left in for objects initialised in 3den as they happen at mission start, so shouldn't really have any bearing on FPS in the game. But yes, agreed that during runtime it can be more of a burden than boon.
  10. das attorney

    General Discussion (dev branch)

    Already mentioned in this thread - plus some input from one of the devs if you scroll down.
  11. Make them playable by ticking the box in the unit int, then read this link: https://community.bistudio.com/wiki/Team_Switch And put this in init.sqf (or some other init script ran globally) addMissionEventHandler ["teamswitch",{ (_this select 0) enableAI "teamswitch" }];
  12. das attorney

    Any tips on how best to tweak difficulty?

    Yes, you can do that in your own missions, or if not your own missions, then you can make a mod to enforce the values.
  13. das attorney

    Any tips on how best to tweak difficulty?

    http://www.urbandictionary.com/define.php?term=dial it in So if you need to dial it in, then it a process of looking at works for you and what doesn't. In your case, you only get the chance to do that every two weeks, so it is a slow process. I would use rule of halves. So next time I play, I would drop all skills by 50% If still too hard/not fun, then halve it again. When you reach the level where it is semi-playable/semi-fun, then start thinking about whether they were too stupid but excellent shots or vice versa and increase/decrease accordingly. That's probably not the answer you want, but the reality is you only play every two weeks, so with the best will in the world, that is the timescale you are looking at. Maybe host a server for a while and make it public if you want faster feedback. I'm happy to tell you the values I like, but I feel that if you use them and don't like them, then it wastes another two weeks for you. Anyway, here you go (note that this is fiddling with even more subskills, so more to dial in if wrong for you) _unit setSkill 1; _unit setSkill ["aimingAccuracy",0.25]; _unit setSkill ["aimingShake",0.25]; _unit setSkill ["aimingSpeed",0.25]; _unit setSkill ["spotDistance",0.25]; _unit setSkill ["spotTime",0.25]; I can't really comment about AI mods as I don't bother with them so you might be better off checking the respective threads for those scripts/mods.
  14. das attorney

    Player character can't use chat.

    edit: ninja'd by gom
  15. You can use this KK script to transfer from server to server, but there is some quirks that need to be ironed out (like periodically bugging the map out for some users). http://killzonekid.com/farewell-my-arma-friends/ As onEachFrame persists after mission has exited (definitely in MP, maybe in SP - needs to be checked), you could potentially modify this to work from SP to server. You would just need to know the IDD's and IDC's of buttons that would be clicked by user if you were to navigate the menus by clicking them with your mouse. If you want to find out about intercept, it would be quicker for you if you join the Arma discord and check with Dedman - he's active on there and is carrying on the work with intercept. Maybe he'll read this thread, but definitely is over there.
  16. I use tab for open inventory button, but it's always bothered me that you can't use the same button to close it; instead you have to use Esc or the X button in the corner of the inventory. Here is some code so you can have a button that opens the inventory, and the same button closes it. Put it in initPlayerLocal.sqf or similar. Enjoy player addEventHandler ["InventoryOpened",{ _this spawn { waitUntil { not isNull (findDisplay 602) }; INVCLOSED = (findDisplay 602) displayAddEventHandler ["keydown", { if ((_this select 1) in (actionKeys "gear")) then { (findDisplay 602) displayRemoveEventHandler ["keydown",INVCLOSED]; closeDialog 0 } }] } }]
  17. das attorney

    Toggle inventory - for TAB users

    Ah ok - I put it in the first sentence of the preamble. Let me see if I can modify the topic description.. edit: That was pretty painless - done :)
  18. das attorney

    Toggle inventory - for TAB users

    Yes, I realised that so I wrote this script for me any any other people using tab
  19. If it's benches (or anything really) baked into the map, then they aren't considered to be entities anymore even if their class should indicate that they are; so you can only find them with nearestObjects (empty array search) and nearestTerrainObjects. A lot of stuff baked into the map doesn't even have a class anymore, so if this is the case, then searching for them by class will fail. Some important stuff like houses do, but a lot of smaller objects are just declassed. Stand near a bench and do: {diag_log _x; diag_log typeOf _x} count (nearestObjects [player,[],100]); Then check your rpt.
  20. das attorney

    Toggle inventory - for TAB users

    Indeed! I was playing a lot over the weekend because it doesn't completely suck anymore and enjoying the toggle inv. Then I went back to Arma today and was like "ugh".
  21. das attorney

    [SOLVED] Help with Simple Sandbag Script

    Ha ha whoops I didn't even look at the context! My bad, ^^This!
  22. das attorney

    [SOLVED] Help with Simple Sandbag Script

    It shouldn't broadcast anyway if it's done by addaction
  23. das attorney

    [SOLVED] Help with Simple Sandbag Script

    if (time == 5) then = is for assignation == is for comparison
×