Jump to content

cds1984

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Everything posted by cds1984

  1. Wow! Wish I would have read this thread before I started working on learning how to script and map... Got me-self global banned by debugging scripts(it seems) with battleye enabled! woot! :( Oh well, lucky I only put 4hours into DayZ and have only play/worked for 1908hours on ARMA3 on my own server :) Woe is me. *shakes fist at steam and battleye* *UPDATE* Thats it, have to buy DayZ and ARMA3 again. Absolutely no response from Battleye and BIStudio guys said they have no control or sway over the system. Battleye is a good idea but it should be implemented by BI and not a third party with a Terminator complex, I reckon. In the meantime... Although I still have no 'actual' indication of whether my debugging and testing caused this, which is infuriating, it would be good to make it clear to new map developers that running battleye when testing is a BAD idea. *UPDATE* This was finally resolved as a false positive that was overlooked for nearly 2 months. Resolved now. It is a flawed system. 30 Day bans would make more sense and probably less work for the BE guys. (CLOSED)
  2. Hi, Recently I created a map which plays at night, the AI don't have NVG and neither do the players. They do all have torches, so it is pretty novel but the one thing that I would like to be able to create is damage to units from running head long into a building, rock face, vehicle or whatever else that would really knock the wind out of you if you did actually run into it (in real life i mean). If i ran into a rock face I'd probably end up in the hospital... I'm thinking. (in real life that is) In a pitch dark map you find that if you fire or flip on your torch it gives away your position and thus the old, flip it on look and flip it off and walk, crawl or run in that direction and what you end up with is, walking or running into an object and in the pitch black there is absolutely no feedback visually or aurally to the player, so you just walk or run against whatever you ended up against with no idea until you flip the ole torch back on. Have you ever been running along and popped on the map to check your location then turned the map off to see that you've been running against a tree? Having the map drop suddenly to the floor and you end up on your backside would make more sense. So... What I would like to do, like when you walk off a ledge or crash a vehicle into a solid object, is get some visual feedback on the screen, like the surrounding red pain fog or the audible yelp of the player... (OOOF sounds appropriate to me) So far I've run into an issue that I can't resolve properly/simply the walls of a building or any direct class of a solid object that I might run into, so if I run into the side of a building that is around 5m to its centre, this will work (setting the condition to detect a distance of less than 10 from the building... which is very arbritary but a way to make this script work at this point!). private ["_moving","_speed","_previous","_sample","_distance"]; _moving = false; _previous = 0; _sample = 0.1; while {isPlayer player} do { _speed = speed player; if (_speed != _previous) then { if (_moving) then { if ((_previous < 0 && _speed > 0) || (_previous > 0 && _speed < 0)) then { _distance = position player distance position (nearestBuilding position player); _moving = false; _previous = 0; if (_distance < 10) then { addcamshake [10,0.5,5]; playsound3D ["A3\Sounds_F\characters\human-sfx\Person0\P0_hit_03.wss", player,false,getPosASL player,0.8,1,0]; }; } else { _previous = _speed; }; } else { _moving = true; _previous = _speed; }; } else { if (_speed != 0) then { _previous = _speed; _moving = true; }; }; sleep _sample; }; I wanted to just use classes as a condition egs. nearestObjects [player, ["House","Car","Fence","Tank"],0.5] but I think the same issue arises that the bits on the house aren't in the class "House", just the bit in the middle so I end up with needing to find the size of the House and see where the player is in comparison or have a function that gives me an array of objects attached to or makeup the house that I can cycle through to see if im splattered against one of them. Maybe it's built in somewhere already? and I can't find the function? Vibration feedback on my desk would work a charm too of course but... maybe later. Thanks for reading my ramblings, and for any suggestions about a function that is already implemented or how to detect the object that I've run into correctly would be GREAT!
  3. After realising that what I was looking for "an array of objects attached to the building" was something I was completely on the wrong track about and looking into the boundingBoxReal function (after the suggestion, Thanks!) I've ended up with this. Testing distance to the building against the larger of the 2 dimensions (width or length) it kinda gets a closer approximation of 'yes you are against a wall of a building when you came to a sudden stop'. Now... to tweak the 'you've come to a sudden stop' to take vector into consideration... since turning on the spot is starting and stopping also. private ["_moving","_speed","_previous","_sample","_building","_dimensions","_width","_length","_distance"]; _moving = false; _previous = 0; _sample = 0.1; while {isPlayer player} do { _speed = speed player; if (_speed != _previous) then { if (_moving) then { if ((_previous < 0 && _speed > 0) || (_previous > 0 && _speed < 0)) then { _building = nearestBuilding position player; _dimensions = boundingBoxReal _building; _width = ((_dimensions select 1) select 0) - ((_dimensions select 0) select 0); _length = ((_dimensions select 1) select 1) - ((_dimensions select 0) select 1); _distance = position player distance position _building; _moving = false; _previous = 0; /*hint format ["%1 %2d %3w %4l",_building,_distance,_width,_length];*/ if (_distance < (_width max _length)) then { addcamshake [10,0.5,5]; playsound3D ["A3\Sounds_F\characters\human-sfx\Person0\P0_hit_03.wss", player,false,getPosASL player,0.8,1,0]; }; } else { _previous = _speed; }; } else { _moving = true; _previous = _speed; }; } else { if (_speed != 0) then { _previous = _speed; _moving = true; }; }; sleep _sample; }; ---------- Post added at 05:14 ---------- Previous post was at 04:34 ---------- Optimised the script and added a delay after a true condition plus added the collision speed to the test condition. Hinky... but getting closer (when running into a building, not so much the rocks, vehicles and anything else hard but... onward!) private ["_moving","_speed","_previous","_sample","_building","_dimensions","_width","_length","_distance","_delay","_damageSpeed"]; _moving = false; _previous = 0; _sample = 0.1; _delay = 1; _damageSpeed = 5; while {isPlayer player} do { _speed = speed player; if (_speed != _previous) then { if (_moving) then { if ((_previous < 0 && _speed > 0) || (_previous > 0 && _speed < 0)) then { _building = nearestBuilding position player; _dimensions = boundingBoxReal _building; _width = abs (((_dimensions select 1) select 0) - ((_dimensions select 0) select 0)); _length = abs (((_dimensions select 1) select 1) - ((_dimensions select 0) select 1)); _distance = position player distance position _building; _moving = false; /*hint format ["%1prev %2curr",_previous, _speed];*/ /*hint format ["%1 %2d %3w %4l",_building,_distance,_width,_length];*/ if (_distance < (_width max _length) && _previous >= _damageSpeed) then { addcamshake [10,0.5,5]; playsound3D ["A3\Sounds_F\characters\human-sfx\Person0\P0_hit_03.wss", player,false,getPosASL player,0.8,1,0]; sleep _delay; }; }; } else { _moving = true; }; } else { if (_speed != 0) then { _moving = true; }; }; sleep _sample; _previous = _speed; };
  4. ahh for a simple answer! Thanks for the help. I will grind on, now that I've started I feel like it's necessary for the ARMA3 experience to be more complete. if I come up with THE answer or AN answer I'll post it on the thread, of course.
  5. Aww man! and here I was getting all excited about someone with all the answers getting back to me! *sigh*
  6. Hi, Just wondering whether I'm going nuts or not but... EDIT: crossposted this from ARMA 3 - MISSION EDITING & SCRIPTING. Since about 2 weeks ago, right around the guarantee messages problem, I noticed that using the standard ammo box/crate dialogue without any init strings stopped working normally on my dedicated server. I've tried all of my older stratis missions with the same outcome also. Assigning items to item slots, weapons to weapon slots and backpacks to backpack slots works fine as by dragging or right clicking, if the default spot is empty. Dragging and dropping any items or ammo into cargo areas (uniform, vest or backpack) takes it from the box/crate but then it just disappears... not on the ground or in any other spot. If you collect an item or mag from the ground it will go into the uniform, vest or backpack though. The dialogue works normally from a single player mode but not from the client of a dedicated server mode of the same mission. Very confusing! Any help would be appreciated. Thanks!
  7. Yes it is fixed :) Yay devs! Definitely made us play differently for awhile... what no explosives!
  8. Nobody else run into this problem with a dedicated server? Still seeing this where ammo crates/boxes are not useable unless for items but not inventory.
  9. Hi, Just wondering whether I'm going nuts or not but... EDIT: This issue is related to the dev version and not the stable version. Since about 2 weeks ago, right around the guarantee messages problem, I noticed that using the standard ammo box/crate dialogue without any init strings stopped working normally on my dedicated server. I've tried all of my older stratis missions with the same outcome also. Assigning items to item slots, weapons to weapon slots and backpacks to backpack slots works fine as by dragging or right clicking, if the default spot is empty. Dragging and dropping any items or ammo into cargo areas (uniform, vest or backpack) takes it from the box/crate but then it just disappears... not on the ground or in any other spot. If you collect an item or mag from the ground it will go into the uniform, vest or backpack though. The dialogue works normally from a single player mode but not from the client of a dedicated server mode of the same mission. Very confusing! Any help would be appreciated. Thanks!
  10. cds1984

    Dedicated server - status

    This looks great! I have it up and running but I cant seem to get the dev version (1.25.x) installed and it seems to only download stable (1.22). I'm using the command app_update 233780 -beta development Does the linux server do the dev version aswell or am I pushing my luck? Thanks!
  11. Hi, I have gleened a lot from here for ages and I recently wrote this function which I have had some great results with, since I keep playing the same maps over and over. Hopefully it will help some one out. In saying all of that there might be a function exactly the same as this somewhere but since I find it difficult to not reinvent the wheel every time I start something, here is my effort. // [start,radius,waypoints,behaviour,mode,speed,type,formation,grp,prefix,land] call randomWP randomWP = { private ["_centre","_radius","_waypoints","_prefix","_pos","_i","_randomX","_randomY","_random","_veh","_type","_formation","_speed","_mode","_behaviour","_grp","_wp","_prefix","_land","_start","_v","_classes"]; _centre = _this select 0; _radius = _this select 1; _waypoints = _this select 2; _behaviour = _this select 3; _mode = _this select 4; _speed = _this select 5; _type = _this select 6; _formation = _this select 7; _grp = _this select 8; _prefix = _this select 9; _land = _this select 10; for "_i" from 0 to _waypoints do { _randomX = floor(random _radius); _randomY = floor(random _radius); _random = floor(random 2); if (_random == 0) then { _randomX = _randomX * -1; }; _random = floor(random 2); if (_random == 0) then { _randomY = _randomY * -1; }; _pos = [(_centre select 0) + _randomX,(_centre select 1) + _randomY,1]; _classes = ["Land_DustMask_F","Land_HumanSkull_F","Land_Matches_F","Land_PainKillers_F"]; _veh = createVehicle [format ["%1",_classes select floor random count _classes],_pos,[],0,"NONE"]; //waitUntil {(speed _veh) <= 0}; sleep 0.2; if ((!(getPosASL _veh select 2 < 0) && _land) || (!_land)) then { //_veh = nil; deleteVehicle _veh; if (_i == 0) then { _start = _pos; }; //_respawn = format ["MARKER%1",_i]; //deleteMarkerLocal _respawn; //_marker = createMarkerLocal [_respawn, _pos]; //_marker setMarkerShapeLocal "ICON"; //_marker setMarkerColorLocal "ColorYellow"; //_marker setMarkerTypeLocal "mil_objective"; //Create waypoint. _wp = _grp addwaypoint [_pos,_i]; _wtype = format ["%1",_type select floor random count _type]; _wspeed = format ["%1",_speed select floor random count _speed]; _wbehaviour = format ["%1",_behaviour select floor random count _behaviour]; _wmode = format ["%1",_mode select floor random count _mode]; _wformation = format ["%1",_formation select floor random count _formation]; if (_i == _waypoints - 1) then { _wp setWaypointType "CYCLE"; } else { if (_wtype != "") then { _wp setWaypointType _wtype; } else { _wp setWaypointType "MOVE"; }; }; if (_wspeed != "") then { _wp setWaypointSpeed _wspeed; }; if (_wbehaviour != "") then { _wp setWaypointBehaviour _wbehaviour; }; if (_wmode != "") then { _wp setWaypointCombatMode _wmode; }; if (_wformation != "") then { _wp setWaypointFormation _wformation; }; } else { _i = _i - 1; //_veh = nil; deleteVehicle _veh; }; }; _start }; invoked with, [[start],radius,waypoints,[behaviour],[mode],[speed],[type],[formation],grp,prefix,land] call randomWP So, If i put a marker in the middle of a town 'TOWN' and i want 8 waypoints to possibly span the 200metre diameter and I wanted a random set of 15 OPFor soldiers to spawn in a 100metre random placement around the 'TOWN' marker, I could do this, _classes = ["O_Soldier_GL_F","O_soldier_AT_F","O_Soldier_SL_F","O_Soldier_AR_F"]; _security = 15; _pos = getMarkerPos "TOWN"; _grp = createGroup east; [_pos,100,8,["AWARE","CARELESS","COMBAT"],[""],["LIMITED"],[""],["STAG COLUMN"],_grp,"",TRUE] call randomWP; for "_s" from 0 to _security do { _soldier = _grp createUnit [format ["%1",_classes select floor (random (count _classes) + 1)],_pos,[],100,"NONE"]; }; I have left the commented out createMarkerLocal bits in the function but it isn't necessary as it was only for troubleshooting. The last parameter 'land' is a boolean and removes the test for above sea level, so waypoints will be created in the water also, so probably good for amphibious vehicles or air vehicles or divers or... but not so much for infantry etc.
  12. cds1984

    AI Discussion (dev branch)

    submitted a ticket. Here is the mission to see what I mean. http://steamcommunity.com/sharedfiles/filedetails/?id=209599080
  13. cds1984

    AI Discussion (dev branch)

    I have mortar emplacements intermittently pumping flares over random positions in the area, once OPFor detects BLUFor. I also thought the area ought to be BRIGHT WHITE with illumination but I know what you mean it is extremely low light even with 5 flares floating down at a time. I was hoping that the AI and the player would have the ability to see much clearer with the flares but I haven't, yet, investigated whether there is some sort of value that can be changed with the luminance level with those either. More investigation... or hoping someone else has done it already, of course!
  14. cds1984

    AI Discussion (dev branch)

    I should have mentioned that this is more of a CQB issue actually, around 50-100m where your own torch illuminates 10-20 metres ahead with declining clarity but the AI seem to be able to detect further than ought to be possible. Maybe I need better batteries.
  15. cds1984

    AI Discussion (dev branch)

    You should whack some torches on their primary weapon and see how easy they spot you once they go into combat mode. It's like a death ray or the uniforms react to light like a reflective hazard sign.
  16. cds1984

    AI Discussion (dev branch)

    Hi, I have created a small map where the enemy have no NVG or FLIR based gear but they all have torches attached to the primaryWeapon. It is set in the middle of the night with full overcast and all of the lamps in the town off. The AI behaviour is NORMAL and the AI skill levels are all randomised at the beginning of the mission. the player has NVG and silenced gear. When the player is detected the AI group that detects them will all pop on their torches and search about. Which is exactly what I'm after but... the light from the torch seems to translate into something much greater than what the player can see, in comparison to the player using a torch on a primaryWeapon. If the player gets a hint of the AI's torch pointed in their direction they will be detected at extreme distances. It is almost like the torch is translating the vision of the AI into NVG or FLIR. Do you think I've missed some sort of ifUsingTorchReduceVision function somewhere? Any help or opinions would be appreciated. Thanks.
  17. Hi Squeeze, Perfect! An object produced from a random choice within an array of object classes is dynamically generated in random positions (nearestObject [_randomposition, "house"])within a radius from a marker. (server init script) then, this randomly chooses an object from the array of object classes and pushes an addaction out via bs_fnc_mp to all the clients (ie Gather Intel). To make it happen I add a marker to the map and the amount of intel to be gathered and thats that and run the script at the beginning of that task. Different each time. Very cool. (from my perspective of course.) Thanks again for your help.
  18. Hi, I had a search through the forums and found quite a few strangely formatted posts from a previous game(OFP) about this and couldn't quite understand so... here is the question. I have a dynamically generated array of strings which are dynamically generated objects. _o = 0; OBJECTS = []; while {_o <= 2} do { _position = randomlygenerated position; _object = nearestObject [_position, "somethingorother"]; missionNamespace setVariable [format ["OBJECT%1",_o],_object]; publicVariable format ["OBJECT%1",_o]; _objects1 = OBJECTS; _objects2 = [format ["OBJECT%1",_o]]; OBJECTS = _objects1 + _objects2; _o = _o + 1; }; now i want to test them and make sure they are present before carrying on, waitUntil {count OBJECTS == 3}; { waitUntil {!isNull _x}; hint format ["%1 is present",_x]; } forEach OBJECTS; at the 'isNull' test i need to have an object and not a string and this is why I want to covert or just remove the quotation marks before I put the value into the array originally... I need to have the object name(variable) instead of a string for a bunch of other functions too. [PURPOSE]; I am trying to remove the manual creation of the arrays so I can alter the mission parameters with ease. I think I'm just missing some fundamental concept... heres hoping! Thanks in advance for any help!
  19. purpose is for a client to move a helicopter to a point using an addaction. basically addaction is on a satellite phone which has the options of sending a helicopter to a range of markers and if you are not at the marker with the helicopter already at it, it will come to you, land and then go to the marker you chose and land again. The problem is move is a localised function. So if it is called by a remote host it is not executed on the local host where the local object is, unless they are the same physical machine and not a dedicated server. If i create a trigger on the server to run the same script it will succeed but an addaction pushing from a remote host will not, on a dedicated server.
  20. I have been attempting to get this to work for a couple of days and while I can get it to work on the editor preview and testing from multiplayer on the same machine, on a dedicated server it refuses to work... That being said here is what I have. an addaction on an object that calls a script which moves a vehicle to another position. //Marker named "THERE" placed. //init on object. this addaction ["TRANSPORT","chopper.sqf",[this,"THERE"],1,false,true,"","true"]; //chopper.sqf _from = getMarkerPos format["%1",(_this select 3) select 0]; _to = getMarkerPos format ["%1",(_this select 3) select 1]; //Named vehicle _veh = CHOPPER1; if (alive _veh) then { _veh move _to; }; The result being I can hear the chopper pilot saying "move to coordinates ..." but the chopper doesn't start it's engines. I did try setting the engines to always be on and the result is the chopper figits about like it is being held in place by an invisible tether. I can see that the problem is the move command is not 'local' to the object because the source of the command is the MP client and I'm having a hard time making the ownership get moved from remote to local, from the addaction. Any help would be great! no ... fantastic!
  21. Worked out a way around it... a bit funky but here it is. Have a listener which runs on the server waiting for the publicvariable to change from a default state and when it does push the value of the variable to the script which then does the work. Very convoluted but it works on MP dedicated. Here is the example. init.sqf nul = execVM "listener.sqf"; listener.sqf TRANSPORT = "READY"; while {isServer && alive CHOPPER1} do { if (TRANSPORT != "READY") then { [TRANSPORT] execVM "go.sqf"; }; TRANSPORT = "READY"; sleep 2; }; go.sqf _destination = getMarkerPos format ["%1",_this select 0]; _veh = CHOPPER1; _veh move _destination; while {!unitReady _veh} do { sleep 1; }; _veh land "LAND"; TRANSPORT = "READY"; publicVariable "TRANSPORT"; call.sqf _args = (_this select 3) select 0; TRANSPORT = _args; publicVariable "TRANSPORT"; object initialisation. this addaction ["TRANSPORT","call.sqf",["HERE"]]; destination marker name = "HERE"
  22. I should have mentioned that the end product also includes _veh land "LAND"; using addwaypoint moves it but for some reason it introduces the problem of it not landing and stopping without using the 'getout' waypoint aswell. So if i use "getout" and land it on top of a building my crew gets out and walks off the side to it's death! Which is a lot of fun but not really what I was after.
  23. Looks like it's more than just the mine not translating the height variable. I don't think the building's heights are translating to the units. I notice that AI will leave a position of height, in a building, to get into formation around the leader(non AI) at the ground level even though the leader is not at the ground level and on an upper floor. If i run a trigger at the top of the steps to show the triggering unit's position it shows that it is at ground level. If i run hint format ["%1",position player]; in the escape debug console I get the same result while at the top of the steps. Looks like I'll just have to blow people up on the ground and stop being needy for the moment.
×