Jump to content

MetalGearXM

Member
  • Content Count

    5
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About MetalGearXM

  • Rank
    Rookie
  1. If it were really a big issue, I'd switch out that one simple line with some good old fashion trig: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _dir = getDir Player _sTent = "CampEmpty" createVehicle (player modelToWorld [0, 10]) _sTent setDir _dir _dis = 5 ; (How far infront of the tent origin - In this case 5 meters) _offc = 100 ; (How far right or left - In this case 2 meters right) ?(_dir <= 90): _temp = 90 - _dir ?((_dir > 90) && (_dir <= 180)): _temp = 180 - _dir ?((_dir > 180) && (_dir <= 270)): _temp = 270 - _dir ?((_dir > 270) && (_dir <= 360)): _temp = 360 - _dir _y = _dis * sin(_temp + _offc) _x = _dis * cos(_temp + _offc) ?(_dir <= 90): _posx = (getpos _sTent select 0) + _x ?(_dir <= 90): _posy = (getpos _sTent select 1) + _y ?((_dir > 90) && (_dir <= 180)): _posx = (getpos _sTent select 0) + _x ?((_dir > 90) && (_dir <= 180)): _posy = (getpos _sTent select 1) - _y ?((_dir > 180) && (_dir <= 270)): _posx = (getpos _sTent select 0) - _x ?((_dir > 180) && (_dir <= 270)): _posy = (getpos _sTent select 1) - _y ?((_dir > 270) && (_dir <= 360)): _posx = (getpos _sTent select 0) - _x ?((_dir > 270) && (_dir <= 360)): _posy = (getpos _sTent select 1) + _y _pos2 = [_posx, _posy, 0] _sShed = "ShedSmall" createVehicle _pos2 _sShed setDir _dir Actually, that might not be right.. But really close. Just tweak it a little bit.
  2. MetalGearXM

    Crouch,NO PRONE...

    Alright Seth, sorry for the month late response, but I do have an answer to one of your questions, although the other I can't fully help you with. Firstly, as for the AI crouching/proning problem. I'm not sure what would be the best way to go about it but there are some cheap alternatives. I couldn't figure out how to check a unit's current pos, but if you could, you could set its unitpos to crouch whenever it goes prone, wait ten seconds, set the unitpos to auto and then go back to checking when it goes prone. There is another alternative I've thought of. If you put all of the enemies in an array you can check the knowsabout value from one unit to another and if it goes over I believe 0.105, you can use setpos to set him to crouch until the knowsabout value drops. I can, however, help you with the switching weapons problem. Now, this is a cheap alternative (again), so it might not fufill exactly what you desire. It will work, however. For each unit in the group you can remove their weapons and give them only the pistol you want them to use. Then when you switch back, give them all their weapons back. You can give them all their weapons with <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 _loadouta = weapons _unit _loadoutb = magazines _unit removeAllWeapons player blablablbla removeallweapons player _wnum = count _loadouta _wnum2 = 0 ?(_wnum2 == _wnum): goto "loopweapba" #loopweapa player addweapon (_loadouta select _wnum2) _wnum2 = _wnum2 + 1 ?(_wnum2 == _wnum): goto "loopweapba" goto "loopweapa" #loopweapba _wnum = count _loadoutb _wnum2 = 0 ?(_wnum2 == _wnum): goto "loopfin" #loopweapb player addmagazine (_loadoutb select _wnum2) _wnum2 = _wnum2 + 1 ?(_wnum2 == _wnum): goto "loopfin" goto "loopweapb" #loopfin exit That blablabla whatever is your other code by the way. Theoretically you can simply remove their primary weapon by doing the same script but leaving out the primary weapon in the weapons array by starting _wnum2 off with 1 instead of 0. Por ejemplo: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _wnum2 = 1 ?(_wnum2 == _wnum): goto "loopweapba" #loopweapa player addweapon (_loadouta select _wnum2) _wnum2 = _wnum2 + 1 ?(_wnum2 == _wnum): goto "loopweapba" goto "loopweapa" The only problem you'd face is that you'd have to have everything in one script because the original loadout for the unit is a local variable, though I'm sure you could find a way around that. Anyways. I haven't tested any of that so I'm not sure how it would work but give it a try and tell us if it works. Also I tried your method for removing magazines and I generated this (Triggered by [this] exec "script.sqs"): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 Stealth = false Assault = false #loop ;Create a new radio command _tri = createTrigger["EmptyDetector",getPos player]; _tri setTriggerActivation ["ALPHA", "PRESENT", false] _tri setTriggerStatements ["this", "Stealth = true", ""] _tri setTriggerText "Stealth" Waituntil Stealth Stealth = false _point = 0 ; Get loadout info about the unit _loadouta = weapons _unit _loadoutb = magazines _unit #find ; Check the magazine loadout array names against itself to find where the magazines are different _mag1 = _loadoutb select (_point) _mag2 = _loadoutb select (_point + 1) ?(_mag1 != _mag2): goto "found" _point = _point + 1 goto "find" #found ; Remove all the magazines of first given type _unit removeMagazines _mag1 "SoldierE" createvehicle getpos player ;Create a new radio command _tri = createTrigger["EmptyDetector",getPos player]; _tri setTriggerActivation ["ALPHA", "PRESENT", false] _tri setTriggerStatements ["this", "Assault = true", ""] _tri setTriggerText "Assault" ; Wait until stealth mode is turned off Waituntil Assault Assault = false #give ; Give back number of magazines we took out _unit addMagazine _mag1 ?(_point == 0): goto "loop" _point = _point - 1 goto "give" Unfortunately he still refused to use his secondary weapon. Was it working for you?
  3. MetalGearXM

    Arma bugs

    Not sure if this is a glitch or something that's was never bothered with because of certain things that would cause it to do so, but when a tank or something else goes under water, after awhile it takes enough damage to explode, but then it catches on fire and there are flames erupting from the hull under the surface of the water. Also, when a unit ejects from a vehicle any number of meters beneath the surface, it will play the get out animation and then automatically teleport to the surface. If a jet is flying and touches the surface of water, if completely flips out. At somewhere around 10,000 meters high, you loose control of your jet and it begins flying by itself (Which involves pointing the nose straight down into a suicide plummet) At somewhere around 1,000,000 meters high, your jet will point its nose down, and begin accelerating to thousands of KM/h, until it just freaks out and starts spinning very rapidly with its speed spazzing between 9999 and -9999 KM/h. That looks funny for some reason. Also at this height, all the pieces of the jet will pull apart and move by itself, and your guy will be sticking way out of the cockpit. As a unit this high, your gun will be between your feet and bullets will spray out of the gun sideways and float off into the distance. At around one trillion meters high, the game starts "not being right." You will be in the sky, that is, the dome that is the sky will be lowered so that you're 3/4ths up it, and if you look straight out at the sky, the center half of it disappears. When it rains at this height, it's a strip of rain texture repeated over and over again. In a tank, you can fire exactly ten shots before you can't fire anymore, but then if you go to commander and order your gunner to fire, the tank will fall under the physics of having fire, and you can just keep ordering your gunner to fire and the tank will keep acting like it fired. Also, for some reason, it takes twice as long to start a mission this high than it does to load the entire island for the first time. If you eject from something this high, you'll teleport to the ground (Unless it's a jet or plane). When the player dies out in the ocean, he'll fall through the water like he would through air. Edit- Another thing is if you have a unit from an addon with alot of hitpoints, tanks and other units will just run away. This is wierd! This is all on the international English version 1.05.
  4. Hey. I've been playing around with OFP scripting off and on for a long while, but now with the release of Armed Assault, I want to remake some dead projects. Unfortunately, not only have I re-run into old problems, but there are some new, interesting whats I was hoping someone would know how to clear up. Now, playing god can be fun, with the killing and ressurecting and stuff, but with the release of Armed Assault, I notice the simple command "setdammage 0" doesn't work on units that have died anymore. Is this done purpousfully or something? Perhaps there is a command or way to revive the unit without going through a respawn? On that note, something else a little distraughting is about. Whenever a script is being run on a unit using variables, and the unit dies and respawns, the script is no longer valid to the unit. i.e. it has to be reinitialized to get the proper variable. I haven't been able to figure out what to do to keep a script running! On another topic, I noticed you can change a units side by editing the mission.sqm file, but is there a way to change a unit's actual side in game or via command? If you change the unit side in the mission.sqm, and then you change something in the editor, you're left with the units going back to their original sides! Using format in a command such as "globalchat ["blahdebla %1", _var] produces very satisfying results, but what if you want to use a variable in an array, such as TitleText ["bladebla*insert variable here", "PLAIN", 3]? There are alternatives to this, but it would be nice to know how this can be done. Lastly, is there a way to spawn custom sprites? Like with the drop command, you can spawn one of three different kinds of sprites, but what if you want to spawn a number that's just floating there instead of an ambient smoke-effect? How/Can this be done? These questions have been killing me forever, and perhapse some wise people would know the answers?
  5. MetalGearXM

    EECP - Enhanced ECP

    Grr, whenever I start up EECP, it sticks on a black screen and never loads the menu. I've waited quite a long time (Watched TV, ate dinner, went outside)! It only does it with this particular mod, and I've tried everything to fix it, reinstalling everything from ECP to the last addons, different hardware and software modes, removeing unofficial addons, but it's all the same. Some help would be appreciated, as I really want to play this TC. The things all the others lack is the complete ECP config =/ Edit: Nevermind, I was running the latest version of ECP
×