Jump to content

masterfulninja

Member
  • Content Count

    32
  • Joined

  • Last visited

  • Medals

Everything posted by masterfulninja

  1. Ive been googling and looking up code and syntax since yesterday and for the life of me i cant get a single script to work. I'm trying to attach a simple script to a trigger, in the on activation box i put (null = execVM "script.sqf";) and every time i get "script.sqf" not found. I have a script.sqf in the mission folder along with the mission.sqm file. Can anyone help me out here?
  2. Im setting up a respawning squad that is scripted to enter a waiting transport once they respawn and get driven halfway to the objective and i cant get them to enter the transport. The way-points all fire, if there's an empty transport there they will man it without issue. From my research it looks like i need to assign them the vehicle first but because they respawn using the init line isn't an option and every time I try to assign them to the transport in the scripts it doesn't work... Ive been stuck on this two days now i really need some help. Im using a respawn code i found online so i dont understand it 100% but i think Ive found the part that actually respawns the units and Ive added the assign right after and no luck. _group = createGroup _side; {_x createUnit [ _pos, _group];} forEach _AI_unit; sleep 2; {_x assignAsCargo driver1} foreach _AI_unit; {_x orderGetIn true} foreach _AI_unit; };
  3. masterfulninja

    Troops wont enter waiting transport

    The respawn loop im using is not my own, so im trying to change as little as possible. Meaning im stuck with waypoints. Thats fine because when i put the assign command in the init line it works smoothly. Only once they respawn as new units do they refuse to enter the truck. f2k im going to try your fix now. ---------- Post added at 01:55 ---------- Previous post was at 01:50 ---------- Thanks so much F2k, i did indeed have the wrong group targeted or wrong syntax. those variables were already defined though its just a big script i didnt want to post the whole thing. C&P this line did the trick. ---------- Post added at 03:28 ---------- Previous post was at 01:55 ---------- Actually I'm having a new problem now... I got the first group to work perfectly (thanks again) and now im trying to copy that to a second and then third group. Ive made new scripts with a 2 at the end and copied all the relevant markers etc and renamed them for the second group as well. The scripts fire and waypoints are given and it appears to be working except now the squad leader wont get in the truck after issuing the get in order. Iver tried deleting the squad leader and making a new one and viola it works but it always kicks 1 squad member out and he refuses to board which then causes the truck not to move from the load waypoint and its ground to a halt. What in the world would cause one member like that to not get in and for the error to essentially pass through when i try to delete and remake? I remade the entire squad and pasted in all the relevant code and got the same problem with the squad leader then again to the subordinates after i deleted the leader a second time.... what the hell?
  4. Ive already got a re-spawn script working that i found online, Ive modified it so there is a 4th troop behavior that I've verified is firing via hints already but its not acting the way its supposed to. The intended function is that a troop transport picks up a squad and drives them to a drop off location then the truck returns. The troops respawn when they die and (should) get back in the waiting troop transport for round two over and over until the transport itself is destroyed. They respawn and the hints fire but no luck on the right activity. Here is the code im using, any help is greatly appreciated I'm not so hot with scripting. hint "transport1"; for "_i" from 0 to (4 + (floor (random 4))) do { private ["_wp", "_newPos"]; _newPos = getMarkerpos "loadmarker"; Sleep 1; //_prevPos = _newPos; _wp = _grp addWaypoint [_newPos, 0]; _wp setWaypointType "GETIN NEAREST"; //Set the group's speed and formation at the first waypoint. if (_i == 0) then { _wp setWaypointSpeed "FULL"; _wp setWaypointFormation "LINE"; }; }; sleep 1; hint "Transport2"; [_grp, 0] synchronizeWaypoint [ [_drivergrp1, 1] ]; _drivergrp1 setCurrentWaypoint [_drivergrp1, 1]; the drivers last waypoint is a hold, so when they respawn he is in the same spot where loadmarker is located. its supposed to kick driver back to waypoint 1 and sync that to the get in nearest command to make the loop. it isnt.
  5. Ive searched and come up dry on this one and i know there's a guide somewhere. Can anyone point me to a how-to on how to link multiple missions together as a campaign?
  6. masterfulninja

    Civilian search helicopter

    Thanks for the help, Im trying that now and im getting "im looking" to fire in the loop which is a step forward but even with the knowsAbout set anywhere above 0 and the heli flying directly over the guy at 50 meters still no firing of the final knowsAbout clause. I know they see him because they set off the detected script that fires the search script to begin with. EDIT: Ok i got the basics to all fire, now i need some help with getting the behavior set right. After further debugging i found that the code only fires when knows about is set exactly on 0, > 0.01 doesnt fire when flying directly over the unit. I finally got the loop ironed out and help text that alternates between the beginning and end of the cycle so i know the code is cycling and i know they see the unit because they call him out. Somehow i guess im not linking to the script correctly? This is what i have in the triggers activation box. names are all lower case no caps
  7. Does anyone have any idea how to make a civilian helicopter start patrolling looking for members of a squad then lock onto them with the searchlight if they find them?
  8. Nevermind... was scripting errors
  9. masterfulninja

    Civilian search helicopter

    I'm trying to set up a loop with the code you suggested and I'm having trouble getting my hints to fire off... I'm doing something wrong still. Searching fires but loop start never does... hint "searching"; _search = _searcher knowsAbout _mainchar; _looking = true; null = [] spawn { private ["_search", "_looking"]; hint "loop start"; while {true} do { _search = _searcher knowsAbout _mainchar; hint "Im looking"; if (_search >= 0) then{ (group _searcher) move getPos _mainchar); hint "found him"; }; sleep 0.1; }; };
  10. masterfulninja

    Altis is MINE

    I'm nearly finished with my first user mission, i envision a mini campaign where an exiled Altis national returns years later to lead a small group of guerrillas in a rise to power first conquering Stratis as a base to invade Altis from. Im looking for feedback to finish polishing the gameplay and would appreciate some testers. http://steamcommunity.com/sharedfiles/filedetails/?id=399438010
  11. masterfulninja

    Civilian search helicopter

    the lights arent a problem, they work. null=[] spawn { while {true} do { player action ["lightOn", Cheli]; sleep 0.01};}; I found this and the lights force on at all times so that's good to go. I also found code forcing civilians and independent to be enemies and tested it and it works too. So i need script that makes the heli actually fly and look for pre-designated units and then orient itself to face them in such a manner as to aim the light on them when it finds them. if possible also script that makes the helicopter reveal the squads location to Opfor ---------- Post added at 04:17 ---------- Previous post was at 03:48 ---------- i know this isnt right because im not very good at scripting but this is what i think im looking for, at least in the ballpark.
  12. masterfulninja

    Altis is MINE

    Thanks Big, I've been busy further refining the mission I just now saw these posts. Does that link update when i upload a new version?
  13. I've got a group named hmggrp1 and have successfully coded BIS_fnc_unpackStaticWeapon to get the group to deploy the static MG. When i try to call BIS_fnc_packStaticWeapon later the gunner dismounts and disassembles the weapon but then neither pick up their packs and the gunner is stuck with move disabled and unusable. The function isn't broken is it?
  14. Ive found a little bit of info online about this but when i tried to implement it all i get is the animation of the guy dropping the bag and then no bag on the ground. Im trying to script a HMG to be set up. Am i using the wrong class name? EDIT: Im playing the independent side if that makes any difference. man2 action ["dropBag", "B_HMG_01_support_F"];
  15. masterfulninja

    Script AI to drop folded tripod

    i got it, putBag instead of dropBag and it lands right at his feet just like it should. Now on to getting the gunner to assemble the weapon lol.
  16. masterfulninja

    AI controlled mortars

    This is the functionality im looking for code wise, i want the mortars to actually pick out targets and fire at them within a certian area. Problem is I still cant get this code to work. I got one of the other fixes mentioned to somewhat work where at least they fired a few rounds but it wasnt reliable performance. Ive been stuck on getting mortars to work properly since i first started i dont know what the issue is.
  17. Im having trouble getting the AI to use the mortars properly. My mission has soldiers who join the player after you accomplish tasks, one soldier I want to man a mortar and fire at targets before he joins. Getting him to man is no problem but i cant get him to fire on his own and i don't want to preprogram the mortar impacts. Ive had no luck with the few AI artillery scripts Ive found im not sure if its because im using a soldier to man the empty weapon or if im just not getting it. need help.
  18. masterfulninja

    Script AI to drop folded tripod

    ive just tried that and I still get the animation only. He has a pack on his back and no pack on the ground. EDIT: After trying several times Ive discovered he occasionally does remove the backpack but it just dissapears. maybe 1 activation out of 4 or 5 he removes the pack. thats the code im trying now. it always triggers animations and sometimes he loses the pack. Ive discovered the pack does land on the ground in the random times he actually does remove it but its several meters away.
  19. masterfulninja

    Simple Ai actions

    that did it! thanks. Makes a big change in the atmosphere of the mission start.
  20. I'm making a stealth type mission where the player lands on a shore lit by campfires set by his comrades already on land. I want the two guys to walk over to the campfires and put them out as the boat lands for added cinematic effect. I'm assuming i can waypoint them there within action distance then script something to cause them to do the action? I know i can script the fires to go on and off manually but i don't want to go that route. Any help on scripting the ai to do it themselves?
  21. masterfulninja

    Make OPFOR Heli destroy Radar tower?

    I'm having this same problem, I can get the missiles to lock if i designate a vehicle as the target but getting a building or a static defense to lock isn't working. Ive tried the invisible helipad option and the missiles still don't track. Im using an MI-48 if that makes any difference.
  22. I'm trying to get two attack helis to take down a defensive tower (killing the static defenses on top) but they keep strafing using the guns primarily. Ive seen them use rockets occasionally, sometimes they do take the building down, but not reliably. Im sure there's a script to limit the vehicles AI weapon choice, anyone know what it is?
  23. masterfulninja

    Set AI vehicle weapon choice per waypoint.

    Well, I've even tried just scripting the cannon to fireattarget to see if it would aim at my targets and it wont even do that, just fires blindly into nothing. I don't get what I'm missing here, i guess ill just give up on helicopters...
  24. masterfulninja

    Set AI vehicle weapon choice per waypoint.

    Alright, Ive got the fireattarget command working with "missiles_SCALPEL", the missiles fire on command but still aren't tracking. Ive tried using dowatch, dotarget, assignedTarget, and laserTarget, none seem to be working. heli1 doWatch mg1; mg1 = assignedTarget heli1; heli1 dotarget mg1; mg1 = laserTarget heli1;
  25. masterfulninja

    Set AI vehicle weapon choice per waypoint.

    MI-48 I know its not a rocket, initially i wanted rockets to destroy a tower but since the heli needs to be perfectly aligned to fire rockets ive given up on that idea and ill just missile the thing. The missiles track and follow where the gunner is looking, when i have the script fire them and im the gunner they curve to where im looking, so no need for a laser pointer. (i guess?) I thought a dowatch and dotarget followed by a manual missile fire would lead to a hit. Sometimes the AI autofires missiles from a distance on their own, when they do they hit. So i know the vehicle is capable of hits. But they dont always fire missiles and dont always fire at all -_-
×