Jump to content

Doggifast

Member
  • Content Count

    54
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Doggifast

  • Rank
    Lance Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey. I needed base classes for a draw3D script, so it would place a icon on every object near the player that would match the base class, and i succeeded in that. For example, addMissionEventHandler ["Draw3D", { if (goggles player == "USP_GP21_SH4_BLK3") then { {_pos = ASLToAGL getPosASLVisual _x; drawIcon3D [getMissionPath "Icons\IconMine.paa", [1,0,0,1], _pos, 1, 1, 0, "Mine", 0, 0.05, "RobotoCondensed", "center", true]; } forEach nearestObjects [player, ["APERSMine", "MineBase", "MineGeneric","ModuleExplosive_F"], 20]; }; }]; If you want to test this, change the googles classname to whichever you want, and place some mines around you with zeus, and put the code into the debug console. Don't forget to change the icon path to something different. I originally wanted to make it like a one-time scan with a cooldown (hence the struggle with getting base classes of the objects), but i decided to go with procedural scanning instead, hence the struggle with getting base classes of the objects. (for different types of objects, such as loot (objects/weaponholders on the ground that can be picked up) i just do more entries in the Draw3D event handler. I also put it in initPlayerLocal.sqf, so don't worry about the locality for multiplayer)
  2. Found a way. [ configFile >> "Configwiththeclassnameofathinginit" >> "Classname of a thing", true ] call BIS_fnc_returnParents; example: [ configFile >> "CfgAmmo" >> "Bo_GBU12_LGB", true ] call BIS_fnc_returnParents; will return ["Bo_GBU12_LGB","ammo_Bomb_LaserGuidedBase","LaserBombCore","BombCore","Default"] and with a command (i dont remember which) to check if a specific element is in an array, i can find, for example, for several types of bombs "BombCore" is always present, while obviously not being present for other projectiles or items, etc. now i can check the parents for several objects in an array of all nearest object and maybe pushBack them to another array. found the command: 1 *in* [0, 1, 2]; // true Pretty poggers.
  3. Wait. I'll just use the nearestObjects several times for different arrays and then use forEach for those arrays. I'll report back when i try this.
  4. Thanks, i'll try the function. isKindOf returns bool and not the base class, so i'd have to make a LOT of if-then statements... By the way, i get array by doing nearestObjects with this filter: _array = ["Explosives", "Container", "Cargo", "Backpacks", "Items", "ItemsHeadgear", "ItemsUniforms", "ItemsVests", "Magazines", "Ammo", "Mines", "WeaponAcessories", "WeaponsHandguns", "WeaponsPrimary", "WeaponsSecondary", "MineGeneric", "Man"]; _nearestObjectsLoot = nearestObjects [_caller, _array, 100]; //_caller - it's an action btw
  5. For example, i have an array of objects: _array = [object1, object2, etc] and i have a switch case for "_i" from 0 to ((count _array - 1) do { _newObject = _array select _i; switch ((Somekindof typeOf command) _newObject) do { case "Mines": {code to do something to the object}; case "Man": {code to do something to the object}; case "Cargo": {code to do something to the object}; }; }; //_newObject is updated everytime for each of the element so that it applies the code to every element, but that's not the point of the question How would i get these base classes so I'm basically switching between types?
  6. Doggifast

    Object attaching to humans

    It works, jesus it was so easy. Thank you so much
  7. Doggifast

    Object attaching to humans

    Hm. Maybe i missed something and overthinking this. Give me a minute
  8. Doggifast

    Object attaching to humans

    this code only attaches the box to the man. the box remains static, it doesn't follow the rotation of the spine. the code that i attached does,.. but it doesn't update it's position relative to the spine. it basically still floats there attached, now only following the rotation basically i want it to act like a backpack without stealing BI assets and adding the backpack into the game I'm looking to make it like a carrying system (maybe like in Payday 2?) where you can literally steal a thing and put it on your back or anywhere else
  9. What i need: an object (like a rugged case) following a human spine like it's a backpack. What i have: //On start i attach the object to the human with [box, man] call BIS_fnc_AttachToRelative; //Then i use the following code for the object to follow the vectors of the spine: [] spawn { while {alive man} do { box setVectorDirAndUp (man selectionVectorDirAndUp ["spine1", "HitPoints"]); }; }; It follows the vectors, but when i look down or up, it still clips into the body, since it's still relatively attached and not to the person itself. Please help I can post a video on how i made it if more explanation is needed
  10. Doggifast

    [Help] cutText not working

    Fixed using [] spawn {} and changing commands and contents to titleText
  11. Instead of actually working (black screen with white text in the middle) the text blinks in for a split second and then the view is reset to normal first person view. it does that for every command execution. just blinks in black screen + words but instead of staying there for 5 seconds just disappears immediately here's the code: 0 cutText ["After the extraction of Foxtrot 1 things didn't go as planned.", "BLACK FADED"]; "marker_minefield_blacklake" setMarkerAlpha 0; "Lighthouse_1_marker" setMarkerAlpha 0; "Lighthouse_2_marker" setMarkerAlpha 0; "Lighthouse_3_marker" setMarkerAlpha 0; "Unk_radio_ping" setMarkerAlpha 0; "Marker_heliport" setMarkerAlpha 0; 0 fadeSound 0; 0 fadeMusic 0; 0 fadeEnvironment 0; sleep 5; 0 cutText ["After an unlikely series of events, 48th's main ship was destroyed.", "BLACK FADED", 1]; sleep 4; 0 cutText ["Your task is to survive. Find a naval or air-based extraction and head East to link up with Foxtrot 2.", "BLACK FADED", 1]; sleep 4; 0 cutText ["Do what you do best. Good luck.", "BLACK FADED", 1]; sleep 3; 0 cutText ["", "BLACK FADED", 1]; sleep 3; 0 cutText ["", "BLACK IN", 3]; alarmer say3D "ac_alarm1"; "lambda_core" remoteExec ["playMusic", allPlayers]; 3 fadeSound 1; 3 fadeMusic 1; [] spawn { {_x switchMove "Acts_UnconsciousStandUp_part1";} forEach allPlayers; sleep 43.859; {_x switchMove "Acts_UnconsciousStandUp_part2";} forEach allPlayers; sleep 2.732; {_x switchMove "";} forEach allPlayers; }; sleep (65); 10 fadeEnvironment 1; Animations and all other things in this script work, except for cutTexts need help ASAP
  12. Doggifast

    Preloading images

    Cheers, i'll try
  13. Hello. Here is my problem: when i use ace slideshow (which works correctly), the pictures on the screen are only shown to people that came close to the rugged screen, otherwise it is just black texture. How do i fix that? Please help.
  14. It works perfectly man, thank you very much!
  15. Mate you're a genious. Let me see if that works out for my script.
×