Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About DasClark

  • Rank
    Lance Corporal
  1. Ok, my progress on a silly mission is almost complete. I now have it where a player starts as a civy and can use the scroll wheel (addaction) to spawn a rabbit and then become the rabbit (and delete the original civy). The only issue is that if he dies as the civy (before becoming a rabbit), he respawns as expected on the respawn_civilian marker. If he is the rabbit, the countdown to respawn reaches zero and nothing happens. I know that ARMA treats animals as second class citizens, but I was hoping that I could trick it by having his original slot be a human. Can anyone think of a clever way to trick ARMA into allowing the respawn (the closest idea I have is to hijack the health system and do respawns myself)? thanks DasClark
  2. wow,.... just.. wow... Keep being great contributors to this community IT07 and Terox. Most all of us appreciate the time you guys take to help us, most... DasClark
  3. I am guessing here, but I think that Terox is saying that you need to pass the variable name for the tank into the public domain after it is created (otherwise, your script can't figure out the name of the dynamically created tank). For instance... MyMakeATankScript.sqf // gonna make a tank and let the world know... myTank = "B_MBT_01_cannon_F" createVehicle (position player); publicVariable ("myTank"); MyUseTheTankNameToPointItNorthEastish.sqf if (isServer) then { waitUntil {!isnil "myTank"}; //that way you make sure your _tank variable is defined and only defined as soon as obj1 is present. _tank = myTank; _tank setdir 20; }; although they are right, you could just use myTank in the script. The only reason to cast it to another name is if you are passing it different tank names as a param and don't want a script per tank name. DasClark
  4. DasClark

    Setting npc position?

    For editing's sake, place a trigger on the map. Make it repeatable and make it a radio trigger on whatever channel you want (say Alpha). In the onAction field, put this... copyToClipboard format ["this setPosATL %1;this setDir %2;",getPosATL player, getDir player]; Now, you can preview the mission and walk to where you want the soldier to be. Facing is important as this will handle that also (You can have your guards on both sides of the door facing out). Once you are happy with the placement, tab out of ARMA and go to an editor and hit <ctrl>-v to paste the result into a script. you will see something like this... lets go ahead and assume our soldier is gonna be called mySoldier1. Change the line to look like this... repeat this until you have all the specifically placed units you want. Be aware that the downside of this is each soldier has to be a group of only 1 guy (or else the others will move into formation at mission start). You can get around this by turning of movement (mySoldier1 disableAI "MOVE"). The downside of that is the soldier will never move from that spot. Lets assume for this purpose that we are putting down 4 soldiers to guard the general so we end up with four of the calls. In the editor, place down four soldiers (not grouped) and name them mySoldier1 to mySoldier4. Also in the editor, put down a very large trigger (like 50,000 in size). Make it fire only once, and be onPresent blufor (or you could just make it true for the condition but this way will wait until all units are down before firing). set the onAct to be a call to you script (I usually call this script missionPrep.sqf). nul = execVM "missionPrep.sqf"; that script you were editing before, call it missionPrep.sqf. It might look like this... if (!isServer) exitWith {}; mySoldier1 setPosATL (5019.4,131.3, 12.5);mySoldier1 setDir 182; mySoldier2 setPosATL (5020.2,112.6, 12.5);mySoldier2 setDir 132; mySoldier3 setPosATL (5024.6,121.2, 12.5);mySoldier3 setDir 181; mySoldier4 setPosATL (5028.1,135.5, 12.5);mySoldier4 setDir 115; The ifServer call at the start makes it only fire once on the server. You can use this to populate special items like light poles onto the map or do a variety of things. Lemme know if this works for you. Das ps - gotta give props where due... This is based heavily on work done by Garthra.
  5. try this, it adds an extra waypoint to spice up the move a bit..... _Mech1 = [(getMarkerPos "Mech1"), EAST, (configFile >> "CfgGroups" >> "West" >> "Guerilla" >> "Motorized_MTP" >> "IRG_Technicals")] Call BIS_fnc_spawnGroup; _waypoint1 = _Mech1 addwaypoint [getMarkerPos "insertPoint", 0]; _waypoint1 setWaypointSpeed "FULL"; _waypoint1 setWaypointCombatMode "RED"; _waypoint1 setWaypointBehaviour "COMBAT"; _waypoint1 setWaypointBehaviour "MOVE"; _waypoint2 = _Mech1 addwaypoint [getMarkerPos "ambush1", 1]; _waypoint2 setWaypointSpeed "FULL"; _waypoint2 setWaypointCombatMode "RED"; _waypoint2 setWaypointBehaviour "COMBAT"; _waypoint2 setWaypointBehaviour "SAD"; this should spawn a unit _Mech1, make him move to the marker at insertPoint, then move to the marker at ambush1 and execute a Search and Destroy at the second mark. You can add as many waypoints as you want this way. I use this, works a treat. Das
  6. Easy way. Place the effects module, Flare down. Select the color you want. Place a trigger down (and set it to blufor detected assuming the player is blufor). Link trigger to flare and there you go. It will pop a flare if blufor is detected inside the trigger radius. I used this approach with delays to have a village being assaulted at night through up flares every so often (lots of triggers and flare modules). Hard way. Put an eventHandler on the AI in question. If he spots a player, have him call the script above (but change player to the AI name or 'this') so the flare pops over the head of the soldier that saw you with an offset. This could be cool in that he would keep popping flares all night. You might need to set up a system so he doesn't ripple fire them off. You could also use a variable on the soldier to give him limited ammo. Das
  7. DasClark

    Setting npc position?

    I use a script that gets called at launch and just setPosATL the unit where I want them. There are good scripts out there to put a getPos on a radio trigger so you can just walk around and stand where you want the other unit, hit the trigger and then paste the result into the script directly. This works a treat for my missions. Das
  8. try not putting quotes around the _x. That is what I meant about casting. By putting quotes around it, you are making it a string. Oh, and the other stupid thing I did is you need to use getMarkerPos, not getPos. feh DasClark ps - I am typing this from work so I can't guaranty the answer as I cant test it but I think this is right.
  9. doing this off the top of my head so it is probably full of syntax errors... _newArray = []; _mainspawn = ["mainspawn1","mainspawn2","mainspawn3","mainspawn4 ","mainspawn5"] BIS_fnc_selectRandom; _randomspawn = ["randomspawn1","randomspawn2","randomspawn3","rand omspawn4","randomspawn5"]; { if ((getPos _mainSpawn) distance (getPos _x) < 2500) then { _newArray = _newArray + ["_x"]; }; } foreach _randomSpawn; _newRand = _newArray call BIS_fnc_selectRandom; This way, you check the sde objectives for their distance before you chose one at random. Das ps - I might have messed up the newArray + _x line in the way I cast _x as an array, haven't done that yet in ARMA.
  10. Hey, I have some missions that use triggers to fire effects modules and they work. What module are you trying to fire and what are the settings on the trigger? Das
  11. DasClark

    United States Air Force

    Do you have any plans for other bombs for the B1b? Like retarded bombs or cluster bombs? here is a video. The retarded bombs would allow the plane to come in low and fast to drop and not be splashes by its own drop (plus it would look awesome). Das
  12. No scripting required. It is all in the editor. Just plop down a smoke module on the "wrecked" chopper and viola, you are done. You can play with the sliders in the module (like lifespan or size of particles) to change the look and feel of the smoke if you want but it comes out looking like smoke from a large fire. The only way you would need to script it is if you wanted to have it appear after the game starts at a dynamic location. For this, you would need a couple of lines of script to get it to work. To help out some, let us know what you are specifically trying to achieve and we can get more detailed in the help. Das ps - I am not a scripting guru like some of the brains on here but I will do what I can for you.
  13. DasClark

    Animation Help?

    Animations are pretty finicky. I find that playMove is great but very few animations properly support it (it isn't playing just an animation but all incoming and outgoing transition animations as well). switchMove is more reliable but not all units will do the anim. Best bet is to make sure that in the anim previewer, you have the correct unit selected. Also, be willing to try different animations until you get one that works. The system is far from bulletproof. Das ps - that explains the guy that won't play the proper animation. For the guy that is stuck, try clearing his anim with a playMove "" or switchMove "". The empty animation declaration is supposed to return them to the proper control.
  14. DasClark

    Complex Triggers

    The other option is to use a public variable in the trigger (make the condition "this && range1Hot"). The onAct can set the range1Hot to FALSE so it can't be triggered again. Then just rearm the variable with the same script you are using to reset the targets. Works a treat. Das ps - forgot to mention, you need to make the trigger repeatable. This just stops it from firing again until you are ready.
  15. What Cobra4v320 said, use a smoke module (you can easily change the params to set the color, thickness and density of the smoke also). It stays as long as you want (up to forever). It also works in MP. If you want the fire to persist, use a fire module also. You can set it to not cause damage so it doesn't create a huge hazard. These modules are found under effects. Real easy to us. Das