johnnyboy 3789 Posted May 17, 2017 Problem: I thought this was solved, but it turns out foot prints are permanent ONLY if a player was near the unit making footprints at the time. So we cannot have an AI run through waypoints leaving a permanent footprint trail. However, this would still be useful in a scenario where a player is tracking another player. Bummer!! I'd like to create footprints (and make them permanent) as part of trail for JBOY dog to track. The command nearestObjects returns an array of near objects with left and right footprints in it: [NOID footstep_l.p3d,NOID footstep_l.p3d,NOID footstep_l.p3d] How do I create these footprints via a command? I tried typeOf and getModelInfo on these footstep objects, but it wasn't giving me an object I could use CreateSimpleObject with... Once created, I'm hoping that enableSimulation false will prevent them from disappearing (that works for shell casings..). 3 1 Share this post Link to post Share on other sites
pierremgi 4833 Posted May 17, 2017 Just a feel. I wonder wether you can create some other ones with something like: 0 = [] spawn { _obj = player; _psl = "#particlesource" createVehicleLocal getpos _obj; _psl setParticleParams [["A3\Characters_F\footstep_L.p3d", 16, 30, 0], "", "Billboard", 1, 150000, [0, 0, 0], [0, 0, 0], 1, 1, 0, 0, [4, 5, 10, 10], [[0.1, 0.1, 0.1, 0.75], [0.4, 0.4, 0.4, 0.5], [1, 1, 1, 0.2]], [0], 1, 0, "", "", _obj]; _psr = "#particlesource" createVehicleLocal getpos _obj; _psr setParticleParams [["A3\Characters_F\footstep_R.p3d", 16, 30, 0], "", "Billboard", 1, 150000, [0, 0, 0], [0, 0, 0], 1, 1, 0, 0, [4, 5, 10, 10], [[0.1, 0.1, 0.1, 0.75], [0.4, 0.4, 0.4, 0.5], [1, 1, 1, 0.2]], [0], 1, 0, "", "", _obj]; }}; That doesn't work but perhaps someone can confirm the p3d and give some light on all these parameters. 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted May 17, 2017 9 hours ago, johnnyboy said: I'd like to create footprints (and make them permanent) as part of trail for JBOY dog to track. ....now...for how many of your guests you like me to cook dinner for doing that? 1 Share this post Link to post Share on other sites
EO 11274 Posted May 17, 2017 Can't help with code i'm afraid.....but check out ARTEMIS - Hunting Instinct, it may have some reference material. 1 Share this post Link to post Share on other sites
johnnyboy 3789 Posted May 17, 2017 I figured out how to make footprints permanent. Run the following code for a given unit, and the loop will find near footprints (objects of type "#mark") and disable simulation on them. When simulation is disabled, they no longer disappear after a few seconds. Better trails for tracking someone are now possible! _d=[player] spawn { params["_man"]; while {alive _man} do { { hint format ["surfaceType=%1",surfaceType getpos _man]; if (typeOf _x == "#mark") then {_x enableSimulation false;}; } foreach (nearestObjects [_man, [], 3]); sleep 1; }; }; And you guys thought "#mark"s were just something in your shorts! 8 Share this post Link to post Share on other sites
froggyluv 2135 Posted May 17, 2017 Jonny you da mank mank. Ive been wanting this forever for snowy- track the psycho-who lives in the woods-type missions 2 Share this post Link to post Share on other sites
johnnyboy 3789 Posted May 19, 2017 Sadly, there is a problem with this. Problem: It turns out foot prints are permanent ONLY if a player was near the unit making footprints at the time. So we cannot have an AI run through waypoints leaving a permanent footprint trail. However, this would still be useful in a scenario where a player is tracking another player. Bummer!! I guess BIS felt there was no sense creating footprints if there are no players nearby to see them (for performance reasons). One step forward, two steps back... Share this post Link to post Share on other sites
HallyG 239 Posted May 19, 2017 Eh, came up with a mock up idea for you. You could create an array of footsteps which stores their position and the time at which they were made which you could sort through when hunting or whatever: (Run this in the debug console in the VR world and run round like crazy) h = [] spawn { private _lastPos = getPosWorld player; private _tmpPos = [0,0,0]; private _positions = []; private _footsteps = []; private _i = 0; while {true} do { _tmpPos = getPosWorld player; if (_tmpPos distance _lastPos >1) then { _footstep = createSimpleObject [ format ["a3\characters_f\footstep_%1.p3d", ['l', 'r'] select (_i %2)], AGLtoASL (player modelToWorldVisual ([[0,0.2,0],[0.2,0,0]] select (_i %2))) ]; _footstep setDir (getDir player); _positions pushBack [_tmpPos, time, _footstep]; _i = _i + 1; _lastPos = _tmpPos; }; hintSilent format ["FOOTSTEPS: %1", count _positions]; sleep (1/((speed player) max 1)); }; }; 8 1 Share this post Link to post Share on other sites
pedeathtrian 99 Posted May 19, 2017 Edit: ninja'd BTW, don't forget to use surface normals and set up-vector =) 4 Share this post Link to post Share on other sites
johnnyboy 3789 Posted May 19, 2017 Brilliant workaround @HallyG...where there's a will there's a way. In the beginning of a mission I can record player prints into multiple segments (say 10 prints per segment), and save 10 segments or so, and then leapfrog (setpos) the footprint segments along the track path as the player progesses along the track. Edit: Now that I actually studied your code, I see you actually figured out how to actually create the footsteps. This means I can go back to my original approach of creating footsteps on the AI being tracked...I hope! Sweet! Thanks again. 1 hour ago, pedeathtrian said: Edit: ninja'd BTW, don't forget to use surface normals and set up-vector =) Good point @pedeathtrian, thanks! 3 Share this post Link to post Share on other sites
Undeceived 392 Posted July 4, 2018 Cool stuff, thanks a lot! One question: Is there a way to (scriptwise) color the footprints, e.g. red, like if the guy stepped into a pool of blood? 1 Share this post Link to post Share on other sites
johnnyboy 3789 Posted July 4, 2018 1 hour ago, Undeceived said: One question: Is there a way to (scriptwise) color the footprints, e.g. red, like if the guy stepped into a pool of blood? Great idea UD! I just tried it and setObjectTexture had no effect on the footprints. I think someone would have to take the footprint.p3d and make a red one for that to work. Something else to note is that footprints that the game creates (which was my first solution above) do change color depending on surface type. So they are black/grey on cement/roads, and red/brown in dirt or sand etc. So there is some extra processing happening to determine footprint color based on surface. But in HallyG's solution you use createSimpleObject to create the print and it always comes out dark black. And it looks wrong when in dirt, sand, etc. 2 1 Share this post Link to post Share on other sites