Jump to content


  • Content count

  • Joined

  • Last visited

  • Medals

  • Medals

Community Reputation

651 Excellent

About johnnyboy

  • Rank
    Master Gunnery Sergeant

Profile Information

  • Gender
    Not Telling
  • Location
  1. Thanks @Hazj, thanks to your great example, I have this working with the nearby weaponholder. Solution: _box = (cop2 nearObjects ["WeaponHolderSimulated", 6]) select 0; _boxContents = weaponCargo _box; _weapon = _boxContents select 0; cop2 action ["TakeWeapon", _box, _weapon];
  2. I would like to script having AI take weapon from nearby ground weapon holders. I know I can fake it by using addWeapon, and deleting the nearby WeaponHolder. But it seems I should be able to use action TakeWeapon. After forcing an AI unit to drop a weapon, there is a weaponHolder object near him with that weapon. I wrote the following script: cop2 action ["TakeWeapon", cop2 nearObjects ["WeaponHolderSimulated", 15], // returns near weaponHolder object: "1259b1600# 164141: dummyweapon.p3d" (weaponsitemscargo (cop2 nearObjects ["WeaponHolderSimulated", 20] select 0) select 0) select 0 // returns name of weapon in holder ]; The AI unit plays the TakeWeapon animation, but does not actually take the weapon. Updated: Here's the solution thanks to HazJ: _box = (cop2 nearObjects ["WeaponHolderSimulated", 6]) select 0; _boxContents = weaponCargo _box; _weapon = _boxContents select 0; cop2 action ["TakeWeapon", _box, _weapon];
  3. @Gunter Severloh, @Greenfist, thanks much guys, greatly appreciated. Now can you listen to all 500 of those and pick a couple good ones for me? Just kidding of course! I'll put them in a loop, and then stop when I get one I like. Cool!
  4. I think there is an in-game sound that plays sometimes when you ora an AI are hit with a bullet..."a pain grunt" or "impact grunt". Anybody know what the sound config path is for that or how to find it? Other useful sounds like that would be heavy fatigue breating sound, and any other pain sounds. Thanks!
  5. Awesome post Mr. Larrow. The comments are much appreciated. This is perfect for anyone who want to learn how to navigate configs, search text, parse text, etc.
  6. HandleDamage Event Handler Explained

    Thanks, @fn_Quiksilver, I was being dense, but i get it now!
  7. HandleDamage Event Handler Explained

    I read the thread, but not sure it answers a need I have. I want to test a condition that if true, no new damage occurs, but if false, the normal damage occurs at whatever hitparts, etc. How would I do that?
  8. Here's some code from JBOY_Dog. When dog attacking an armed guy there is a chance he drops his weapon. With this code you see the weapon drop so it looks more natural. You might want to adjust the z velocity for your case (I'm having the guy toss the weapon up a little bit via z velocity of 4). Note that WeaponHolderSimulated has physics enabeled, so weapon drops nicley. WeaponHolder does not have physics. _weapon = currentWeapon _dude; _dude removeWeapon (currentWeapon _dude); sleep .1; _weaponHolder = "WeaponHolderSimulated" createVehicle [0,0,0]; _weaponHolder addWeaponCargoGlobal [_weapon,1]; _weaponHolder setPos (_dude modelToWorld [0,.2,1.2]); _weaponHolder disableCollisionWith _dude; _dir = random(360); _speed = 1.5; _weaponHolder setVelocity [_speed * sin(_dir), _speed * cos(_dir),4];
  9. Last Tango in Tanoa --[COMING SOON!]

    Ok everybody, you can now thank @kremator for the new command:
  10. Last Tango in Tanoa --[COMING SOON!]

    Sneak peak! Mission coming soon...
  11. With a little more digging I discovered customRadio, which totally solves this for me: JBOY_Channel = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "JBOY Radio", "%UNIT_NAME", [valdez, tinker, leader HeistTeam]]; tinker customRadio [JBOY_Channel, "heistYouDidGoodBro"]; valdez customRadio [JBOY_Channel, "heistIfArmedHesGoingDown"]; leader heistTeam customRadio [JBOY_Channel, "suckItFiveO"]; The above code guarantees that the radio text displayed in lower left of screen is always prefixed with the speaker's name!!
  12. Here's how I set the identity and name for the player (valdez) and the AI (tinker): valdez setIdentity "valdez"; valdez setName ["Valdez, Jr.","Bob","Valdez"]; tinker setIdentity "tinker"; tinker setName ["Tinker Tavu","Tinker","Tavu"]; The identities are clean in the config (because i see they are getting the right faces assigned). I'm doing dialogue like this: valdez sidechat "Sorry Tinker, looks like your cousin is dirty."; valdez sideRadio "heistCousinIsDirty"; tinker sidechat "I can't believe it, I must talk to him. We can't shoot him."; tinker sideRadio "heistCantShootHim"; The correct voice file is played, and the correct text is displayed. But where the text is displayed in the lower left, the player lines are prefixed with "Alpha 1-1 (Valdez): Sorry tinker...", but the ai lines are prefixed with just the group unit id like this: "Alpha 1-2: I can't believe it...". I want to see the AI names in the prefix so its clear which character is speaking. In the console I used name command to verify that tinker's name is set, and it showed "Tinker Tavu" for the name, which is correct.
  13. I'm adding voices to my mission, and using sidechat to show the text. When I use sidechat, the player character's name (assigned via setName) is displayed in the chat on lower right of screen. But other AI characters will not show the name for their sidechats. I am using setIdentity and setName on all the AI characters. How do I get the name of the AI chatting to show? SOLVED: The code below insures that the radio text displayed in lower left on screen is always prefixed with the units name (instead of stupid "alpha 1-2"). This works perfect for my SP needs. For MP and using Mods you might have to change this...not sure. JBOY_Channel = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], "JBOY Radio", "%UNIT_NAME", [valdez, tinker, leader HeistTeam]]; tinker customRadio [JBOY_Channel, "heistYouDidGoodBro"]; valdez customRadio [JBOY_Channel, "heistIfArmedHesGoingDown"]; leader heistTeam customRadio [JBOY_Channel, "suckItFiveO"];
  14. Actually the sound and tracks keep going because you don't start using setVelocityModelSpace until the tank is moving already. This is achievable by starting tank in a clear area and giving him a Move waypoint to a point before the forest starts. You then start the script before the tank reaches that waypoint and stops (so tank is moving, tracks are moving, and engine is on). Your tank will bounce and change direction some as you roll over small rocks, logs, etc. But the main problem I just discovered in a test on Tanoa, is that some large trees are indesctructible. These trees and large rocks will stop the tank even when using setVelocityModelSpace. So this idea will only work in isolated conditions: Path of tank must contain only objects that are descructible. Large rocks and some indestructible trees will stop the tank. Its possible to find objects with nearestTerrainObjects and remove them with hideObjectGlobal. It would take work to use this and make a forest "friendly" for tank passage.
  15. Player Walking Slowly - Can't Debug

    Check getAnimSpeedCoef. Maybe some script/mod is running that changed speed with setAnimSpeedCoef.