Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. How to install ACE and ACRE. Posted a few days ago in the Armaholic forums. Currently top of the list. http://www.armaholic.com/list.php?c=news_arma2_video
  2. Have a play with this... but it would take repeated calls to keep it oriented the way you want. Along the lines of setpositioning it every 0.05 seconds or less. Might cause some stress on the system and in a MP game not sure how this would look. fn_orientObject.sqf:- /* [b]call with:[/b] nul = [object,direction,angle,pitch] call fn_orientObject */ private ["_obj","_dir","_ang","_pit","_vecdx","_vecdy","_vecdz","_vecux","_vecuy","_vecuz"]; _obj = _this select 0; _dir = _this select 1; _ang = _this select 2; _pit = _this select 3; _vecdx = sin(_dir) * cos(_ang); _vecdy = cos(_dir) * cos(_ang); _vecdz = sin(_ang); _vecux = cos(_dir) * cos(_ang) * sin(_pit); _vecuy = sin(_dir) * cos(_ang) * sin(_pit); _vecuz = cos(_ang) * cos(_pit); _obj setVectorDirAndUp [[_vecdx,_vecdy,_vecdz],[_vecux,_vecuy,_vecuz]]; true In your init.sqf:- fn_orientObject = compile preprocessFileLineNumbers "fn_orientObject.sqf";
  3. The AI at the best of times is still probably not going to do exactly as you'd want them too. As far as I know streetlights won't help the AI see any better.... but attached light objects do. Check http://community.bistudio.com/wiki/lightAttachObject. To implement "line of sight" for the AI you will have to look for posts on the fairly new lineIntersects command. I have not used it as yet so have no code or clue on how to use it. I can't help you with the ACE flashlight as I don't use ACE.... and anything DayZ belongs in the DayZ forums. Also if you are running mods then anything can happen and the AI behavior is probably modified anyway. You may be pushing shit uphill!
  4. Here's a little test mission with AI flying the helo into a trigger. Works well. Should get the same results if you are flying the helo.
  5. Just testing and for createVehicle you have to specify the radius around the markers center. It doesn't use the markers dimensions. The problem with "random locations" is that they sometimes end up being less than ideal. Half way through a wall, in a tree trunk... that kind of stuff. Finding good locations is a whole other scripting experience. Lots of posts on random good locations. Check them out. Anyhow... if you have a list of markers it's easier. Here is the loop you need. [b]_markers[/b] = ["mkr1","mkr2","mkr3","mkr4","mkr5"]; _prim = ["M16A2GL", "M4A1_RCO_GL", "M4A1_HWS_GL", "G36_C_SD_eotech"]; //the loop for "_i" from 1 to 2 do { _weapholder = createVehicle ["WeaponHolder", getPos player, [b]_markers[/b],0, "CAN COLLIDE"]; _weapon = _prim select floor (random (count _prim)); _weapholder addWeaponCargo [_weapon,1]; hint format ["weapon %1 added",_i]; sleep 1; };
  6. It will spawn 1 weapon holder....with 2 weapons in that holder. If you want weaponholder's at random positions then the code will be slightly different. You will need to also generate random positions from a list of markers or whatever.
  7. Hi mate. Here's my 2 cents... 1. Try messing with setSkill array. Maybe you can fine tune the AI to your liking. 2. For this you would probably need a Fired eventHandler and a distance check.... so the AI "hear" the shot. Maybe also check the typeOf weapon to see if it's a suppressed weapon.... then they don't hear the shot. Also lineIntesects along with distance checks (low distance for night time) will be of use with the "seeing" part of it.
  8. Hi... maybe something like this.... note the changes. Also the marker name is passed to the script. script.sqf:- _mkr = _this select 0; _prim = ["M16A2GL", "M4A1_RCO_GL", "M4A1_HWS_GL", "G36_C_SD_eotech"]; _weapholder = createVehicle ["WeaponHolder", getMarkerPos _mkr, [],0, "CAN COLLIDE"]; //the loop for "_i" from 1 to 2 do { _weapon = _prim select floor (random (count _prim)); _weapholder addWeaponCargo [_weapon,1]; hint "weapon added"; sleep 1; }; Execute with... nul = ["mkr_test"] execVM "script.sqf";
  9. He have a look at this... enableEnvironment Add the line to your init.sqf
  10. Functions should not contain sleep or waituntil. Use spawn as cuel suggests.
  11. That crossed my mind but was sure you would have done that :)
  12. It will return negative numbers....so.... _dir = [unit1,unit1] call BIS_fnc_dirTo; if (_dir < 0) then {_dir = _dir + 360}; unit1 setDir _dir;
  13. Don't think so.... think you need a mod for that but someone else might know more about it.
  14. Have a look at this little test mate. See if it helps. It uses say3D. ---------- Post added at 09:39 AM ---------- Previous post was at 09:34 AM ---------- Your code should work. I'm not familiar with "WOTW"... is that actually a sound? Try this code see if it works... flies = createSoundSource ["Sound_Flies", position speaker, [], 0];
  15. The only things I can think of at the moment are.... Make sure the music actually plays outside the game. Check your music volume in the game preferences. I'm sure you've done this...right? Make sure fadeMusic is set to 1 When you make changes to your description.ext either save or reload the mission for the changes to actually show up in your testing. ..or this might be your problem here.... the Biki entry for cfgMusic says... Name can be left blank as in the examples above. Only specify a name if you wish to access these sounds via the environment options of a trigger. Other than that I really can't think what your problem might be.
  16. Not sure if this function will work on houses...but you can try it. fn_orientObject.sqf /* call with: nul = [object,direction,angle,pitch] call fn_orientObject */ private ["_obj","_dir","_ang","_pit","_vecdx","_vecdy","_vecdz","_vecux","_vecuy","_vecuz"]; _obj = _this select 0; _dir = _this select 1; _ang = _this select 2; _pit = _this select 3; _vecdx = sin(_dir) * cos(_ang); _vecdy = cos(_dir) * cos(_ang); _vecdz = sin(_ang); _vecux = cos(_dir) * cos(_ang) * sin(_pit); _vecuy = sin(_dir) * cos(_ang) * sin(_pit); _vecuz = cos(_ang) * cos(_pit); _obj setVectorDirAndUp [[_vecdx,_vecdy,_vecdz],[_vecux,_vecuy,_vecuz]]; true In your init.sqf add... fn_orientObject = compile preprocessFileLineNumbers "fn_orientObject.sqf";
  17. Good answer :) DayZ is a different animal.
  18. As Blackmamb says... a 400MB mission file is probably not a good idea. Just testing that mission would be unbearable I would imagine. You'd be better off making an addon containing the sound files and distributing that to the players. Just my 2 cents.
  19. After looking at it some more myself.... I'm sort of with Kempco. I keep throwing it in the "too hard basket" and then coming back to it. All I can suggest is to not to try to manage the backpack items and let that script handle it. Just manage his other items. Just a thought! Sorry mate.... but It's just too time consuming to test!
  20. Cool... so they will use the other positions... just not prone. That's good mate.
  21. Well.. if you switch to the weapon in your backpack and then don't save your weapons status.... how can it possibly be restored properly? Reading you wrong ...so scratch that.... but this still applies. Your demo ran flawlessly for me as long as I saved the loadout. ---------- Post added at 07:25 PM ---------- Previous post was at 07:18 PM ---------- Mate... just verified that again... your mission works well. I always respawn with exactly the same weapons that I saved. ---------- Post added at 07:28 PM ---------- Previous post was at 07:25 PM ---------- Ahhhh... I just got it to happen. Will investigate more.
  22. Have a look at this demo mission I did for someone. If memory serves me right it should help you.
  23. http://www.armaholic.com/page.php?id=10621 ... demo missions are in the download.
  24. http://community.bistudio.com/wiki/setUnitPos
  25. Hi mate... as promised... try this. Demo mission download here.... both a .pbo and the raw mission files there in the zip. Use the .pbo to check it out...start a coop game. There's a radio trigger (Radio Alpha) to save the loadout. Then just kill yourself with a grenade. See how you get on. If there's still problems we'll sort it out one at a time. Baby steps! ---------- Post added at 03:33 PM ---------- Previous post was at 03:31 PM ---------- Will look at your demo mission now ---------- Post added at 04:07 PM ---------- Previous post was at 03:33 PM ---------- Ran your demo and it seems to work fine. I always respawn with the weapons I had when I chose "Save Loadout". If I switch to another weapon and don't save the loadout then there's no way to have that weapon as the Primary weapon on respawn... unless you save the loadout again. That makes perfect sense and works the way it should.
×