Thirdup 0 Posted September 30, 2009 When I'm running one dog with my squad, I keep him out on point F2 (blitzy) > 1 (move) > 1 (advance) In standard formation, he stays about 30m ahead. I'm sure somewhere there is a way to hard-code that behaviour. Had a great test run late last night. Was doing house-to-house sweep with the K9 on point. A helo passed overhead and a spec-ops group dropped right across the road. Blitzy chowed down on them before I could get lined up for a shot. :) Share this post Link to post Share on other sites
Big_Daddy 10 Posted September 30, 2009 Nope... no where can you script those commands. Share this post Link to post Share on other sites
Thirdup 0 Posted October 1, 2009 Not sure what's causing it but I've got a little problem that we can replicate. Calling the Blitzy script is working fine, until you die then the option disappears. Re-logging turns it back on until you die again. I've tinkered with the addAction call, but the problem still exists. nul = this addAction [""Call Blitzy"", ""scripts\blitzy.sqf"",[],0,false]; *I've got the script in a different folder than you orginally used (ala Domination) Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 1, 2009 (edited) yup.. the problem with addaction. it works better than the radio, but isn't uh, permanent. this addAction ["Call Blitzy","scripts\blitzy.sqf",[],0,false]; this addeventhandler ["killed", {_this execVM "scripts\blitzyaction.sqf"}]; blitzyaction.sqf waitUntil {alive player}; player addAction ["Call Blitzy","scripts\blitzy.sqf",[],0,false]; if (true) exitWith {}; Edited October 1, 2009 by Big_Daddy Share this post Link to post Share on other sites
CaptainBravo 0 Posted October 1, 2009 I'm not sure how to go about getting an AI squad to call up a dog. It would be easy to set up dogs to hunt in PvP (where each player summons one), but I'm not sure about getting the AI to call one up. . Could you not have the dogs spwan and just follow leader of AI group? And attack enemy with 20 meters prox? I am not scriptor so now sure how easy (or not) to implment. Share this post Link to post Share on other sites
Thirdup 0 Posted October 1, 2009 Groovy. Thanks again! Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 1, 2009 Ok, updated test mission Now includes scripts for adding dogs to patrols. They are not part of enemy squad, just follow the leader around. If leader dies, then they just stay there. They will not follow new leader. You just add the command to the init of the person you want them to follow. Enemy or Friendly Also, added a trigger for Wild dogs, the dogs WILL go after everything except for the side you choose. Again, still cannot have the dogs move forward of the units, just follow them. Share this post Link to post Share on other sites
Thirdup 0 Posted October 2, 2009 OK, now the option to call Blitzy stays after death. But with another player in game, if one of us calls a dog....it despawns the other person's dog. Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 2, 2009 hahahhaa.. yeah it will.. deletevehicle blitzy.. :) sheesh.. I guess I'll work on combining the dogs.sqf and blitzy.sqf All the answers are there. just have to combine them.. using the spawn code in the blitzy script. replace blitzy with _dog etc... Share this post Link to post Share on other sites
Thirdup 0 Posted October 2, 2009 LOL. I looked for like an hour trying to see what was causing that. First line of the script. <smacks head> Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 2, 2009 (edited) Ok, edited the map, combining some of the scripts, sounds, etc.. Same place What's in the map: Single dog via addaction, joins group and you can command him. Run several times have many dogs. Each player who runs the add action will have as many dogs as they need. Multiple guard dogs via add action. These just follow you around, and eat the enemy. :) Enemy soldier with guard dogs following him. They WILL eat you, if you don't kill them. Trigger area with wild dogs, they spawn when you enter, and eat everyone they find. You can select which side they do NOT eat. Edited October 2, 2009 by Big_Daddy Share this post Link to post Share on other sites
Thirdup 0 Posted October 2, 2009 Cool, will test it asap. I was going the other route. 8 player slots, 8 named dogs (blitzy, fido, wolfy, etc). Ened up with 8 scripts and 8 custom calls, but looked like it would have worked. ---------- Post added at 02:01 AM ---------- Previous post was at 12:27 AM ---------- Yeah, a few issues still: *One is with calling as many Blitzy's as you like. You can go over to the recruit tent and get 8 AI (the max), then summon Blitzy, then summon a few hundred more AI. I still think I'll go back and add a named dog for each slot, along with a script set for each (that way there's no duplicates and no canceling eachother's dogs out) *Guarddogs call (pack) seems to be failing for me, as well (nothing happens). Gonna go back over and see if I did something wrong in the addAction call. *Evil dogs trigger works fine (I have great plans for that one)! Really glad you worked on this BigDaddy. Appreciate the time you've put into it. Share this post Link to post Share on other sites
CaptainBravo 0 Posted October 2, 2009 @B_D: Great script update! It works really well. The guard dogs did follow AI group and attacked when saw enemy. 2 observations: AI on my group (enemy for dogs) did not seem to fire on dogs as they attacked him :confused: In evil dogs, it did work when triggered is activated. Any chance to get dogs to roam inside trigger area randomly and attack if enemy is close? As for script that has follower that you can move around I thnk it was made by hoz). I hope it helps with getting dog to run infront of leader of group: Usage: dummy = [Follower,Leader] execVM DoFollowUnit.sqf v.4 */ _Hoz_Follower = _this select 0; _Hoz_Leader = _this select 1; Hoz_ReleaseUnit = true; _Hoz_LongDist = 150; if !(leader _Hoz_Follower == _Hoz_Follower) then { [_Hoz_Follower] join grpNull; }; _leftc = 0; _leftg = 0; _leftk = 0; _leftd = 0; _assigned = 0; while {(alive _Hoz_Follower) && (alive _Hoz_Leader) && Hoz_ReleaseUnit}do { // If unit gets too far behind then wait until the follower is closer. waitUntil {_Hoz_Follower distance _Hoz_Leader < _Hoz_LongDist}; if (vehicle _Hoz_Leader != _Hoz_Leader) then { _Hoz_VehicleTmp = vehicle _Hoz_Leader; _leftc = _Hoz_VehicleTmp emptyPositions "cargo"; _leftg = _Hoz_VehicleTmp emptyPositions "Gunner"; _leftk = _Hoz_VehicleTmp emptyPositions "Commander"; _leftd = _Hoz_VehicleTmp emptyPositions "Driver"; hint format["%1 %2 %3 %4", _leftc, _leftg, _leftk, _leftd]; for [{_i = 0},{_i != count units group _Hoz_Follower},{_i = _i + 1}] do { if (_i < _leftc) then { (units group _Hoz_Follower select _i) assignAsCargo _Hoz_VehicleTmp; _assigned = _assigned + 1; }; if ((_i >= _leftc) && (_i < (_leftc + _leftg))) then { (units group _Hoz_Follower select _i) assignAsGunner _Hoz_VehicleTmp; _assigned = _assigned + 1; }; if ((_i >= (_leftc + _leftg)) && (_i < (_leftc + _leftg + _leftk))) then { (units group _Hoz_Follower select _i) assignAsCommander _Hoz_VehicleTmp; _assigned = _assigned + 1; }; if ((_i >= (_leftc + _leftg + _leftk)) && (_i < (_leftc + _leftg + _leftk + _leftd))) then { (units group _Hoz_Follower select _i) assignAsDriver _Hoz_VehicleTmp; _assigned = _assigned + 1; }; }; (units group _Hoz_Follower) orderGetIn true; while {vehicle _Hoz_Leader != _Hoz_Leader} do { group _Hoz_Follower move [(getpos vehicle _Hoz_Leader select 0) + ((random(7))*sin(getdir vehicle _Hoz_Leader - 180)), (getpos vehicle _Hoz_Leader select 1) + ((random(7))*cos(getdir vehicle _Hoz_Leader - 180))]; sleep 2.5; }; {unassignVehicle _x} forEach units group _Hoz_Follower; }; if ((_Hoz_Follower distance _Hoz_Leader) < 7) then { sleep 2; } else { group _Hoz_Follower move [(getpos vehicle _Hoz_Leader select 0) + ((random(7))*sin(getdir vehicle _Hoz_Leader - 180)), (getpos vehicle _Hoz_Leader select 1) + ((random(7))*cos(getdir vehicle _Hoz_Leader - 180))]; sleep 2.5; }; }; Share this post Link to post Share on other sites
Thirdup 0 Posted October 2, 2009 Single dog via addaction, joins group and you can command him. Run several times have many dogs. Each player who runs the add action will have as many dogs as they need. Yeah, this has to be changed (at least for Domination). Not only is there no limit to the number of Blitzy's someone can spam, but once exceeding eight there is no limit to the number of AI squadmembers a player can call. I'm still tempted to create 8 named dogs with 8 script sets and 8 variations of the addAction (basically to make them all unique) and let 8 player slots have dogs. Then the deletevehicle can be placed back in to limit a single K9 per player. I'm sure there is a simpler way (using a variable of something to make each K9 unique to each player). Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 2, 2009 (edited) Well, sure there is.. And btw, The reason you can add more AI's to your group after the first Blitzy is cause in Xenos's script, it only stops adding AI's if it = 8. Once you add blitzy, then there are 9, and you can add as many as you want. So, if you have 8 in your squad, and you add one blitzy, you'll have 9 in your squad. Without changing Xeno's script there's nothing that can be done about it. (should be >= ) I showed you the script needed to be changed HERE if (_ai_counter == max_ai) exitWith { (format ["You allready have %1 AI soldiers under your control...", max_ai]) call XfHQChat; }; should be if (_ai_counter >= max_ai) exitWith { (format ["You allready have %1 AI soldiers under your control...", max_ai]) call XfHQChat; }; There are 2. One if you are using Ranked version, other is if your not. You can change both. But yes, checking can be added so that the player can only call one. There edited the map to include checking for one dog. Now when you call blitz, the first one will be deleted, and a new one will be spawned. This will work with others calling dogs as well. No public variables used. (using setvariable to store the dog created, then calling that variable to delete it) Edited October 2, 2009 by Big_Daddy Share this post Link to post Share on other sites
Thirdup 0 Posted October 2, 2009 (edited) Thanks. Been tinkering with things since I got home from work (and all I did was muck it up royally). Off to give it a look. Oh, and something I ran across that looked out of place with your recent builds (from the blitzy.sqf) if (_distance < 10) then { _nic = [objNull, _dog, rSAY, "dog_maul01"] call RE; _dog domove position _nearest; [_nearest, _dog] execvm "blitzy\dogattack.sqf"; Appears to be looking to the folder "blitzy" and I think you're using "scripts" as a folder now? Edited October 2, 2009 by Thirdup Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 3, 2009 Yeah, good catch.. Share this post Link to post Share on other sites
Thirdup 0 Posted October 3, 2009 (edited) Well the good news is Blitzy is now working as I had intended in Domination. You can call one and only one. He joins your group. Other players can call one of their own and it does not cancel yours. The only issue we're seeing now is that there is no longer an option to recruit any AI from the hut. It all works fine in the editor and it all works fine self-hosting MP. But on our dedicated server we lose the addAction for recruiting troops. Confirmed in all solts, before and/or after calling a "blitzy". Odd. /bangs head Update: OK, reversing the change I made earlier seems to have fixed it (_ai_counter == max_ai) /fingers crossed Edited October 3, 2009 by Thirdup Share this post Link to post Share on other sites
daza 36 Posted October 3, 2009 Great script BigDaddy! _near_humans = []; _alive_humans = []; _distance = 1000; _neareast = objNull; Is _neareast suppose to be _nearest ? Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 3, 2009 actually, it can be _supercalifragilisticespaladocious (yeah yeah I know) it doesn't really matter, as long as you use the same throughout. misspelling is great, when you do it consistently. :) when your talking about variables, BIS still hasn't perfected the you know what I meant script. Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 3, 2009 Hmm.. thought I mentioned it. The Guard Dogs now run 30 meters ahead of their leader... Used part of the script CB posted. Here's how I changed it. _dog domove [(getpos _leader select 0) - ((random(10)+30)*sin(getdir _leader - 180)), (getpos _leader select 1) - ((random(10)+30)*cos(getdir _leader - 180))]; Share this post Link to post Share on other sites
Thirdup 0 Posted October 4, 2009 Interesting little glitch with Blitzy (at least in Domination): If you die, blitzy goes "rogue" and will eat other players and squad members. I've also noticed that blitzy has a occasional dislike for the friendly AI sniper that roams the base on guard duty. Share this post Link to post Share on other sites
Big_Daddy 10 Posted October 4, 2009 Ok. Here's an update.. guys thanks for testing these... Ok, I was able to figure out how to make the dog's be on a certain side. Apparently there is a limitation on createunit array. I used createunit (and through some pretty good trickery if I do say so myself) The dogs still follow orders. This works on all forms of the dogs (blitzy, guarddogs, wilddogs) an FYI on the wild dogs, set up the trigger to fire only on the side you want, or both. The first person to walk into the trigger, will get a group of enemy dogs spawn. doesn't matter which side. (well, east/west, didn't put resistance in there). Guarddogs can be called via an INIT string of a squad leader (useful if AI patrolling an area) or via addaction. If needed I can set up to delete current guarddogs, before spawning more. But I figured they are going to be used as cannon fodder anyway.. (poor dogs) :) And The "rogue" status should be fixed too. all via getfriend now. Share this post Link to post Share on other sites
Thirdup 0 Posted October 4, 2009 Will get this up for testing tonight. Share this post Link to post Share on other sites
daza 36 Posted October 4, 2009 (edited) Great update BD! just a glitch ive noticed i get a sidechat display my player name and "West . West" continually to the left of screen. Also if try and order the dog to move up 100m using Move there command, it complies verbally, but doesn't go far and just stops. Same if i order the dog to Attack target. And telling dog to regroup is the same, even if u start to move away he will just stand there. In combat situation u dont want to have to keep issuing multiple orders to do one thing. Would there be a way for the script to check distance of attack target issued from player/handler and use that as the highest distance check which the script continually checks and keeps ordering the dog to move toward it until with in 10m? And it would need to be flexible if player/handler decided to switch to a different target, the might be more of a threat. Ie. such as an enemy dog who is seeking to kill, or a a closer target etc Other note while testing. Dog doesnt seem to run ahead of player when player is moving, but just behind to the right. And i guess there needs a new sfx for screaming victim if the victim is a dog. Blitzy won the duel against a wild dog. lol Also on the subject of sfx, would be good to have blitzy making a whimpering sound if he is wounded, so a medic or player can heal him. I can get some of the extra sfx for you, as i have a ton on my pc. I hope that makes sense.. Edited October 4, 2009 by Daza updating feedback Share this post Link to post Share on other sites