Twitch.tv/princessbuttonmasher replied to deer are coded to dodge projectiles July 2, 2022 @ 4:16:10 am PDT

Originally posted by HashSlingingSlasher:
don't get me wrong, I've told myself that a lot. but I also took half a year learning to code in highschool in a program. I've witnessed it enough times to know whats going on lol to add a script to dodge incoming projectiles isnt as hard as you'd think. if-projectile incoming=then-input dodge command

It would be an event handler that detects an array decided by you.

Go back to school.

Code is not this ifpretendbrain = brainpretendon.exe launch.

Here is some actual code I made recently.

alluits addEventHandler ["Fired",
{
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
copyToClipboard str _magazine;
if (_magazine == "1rnd_smokegreen_grenade_shell") then {
systemChat "Magazine correct";
[_projectile] spawn {
_projectile = _this select 0;
_pos = position _projectile;
_time = time;
while {(alive _projectile) and ((speed _projectile > 1) or ((time - _time) < 10))} do {
_pos = position _projectile;
sleep 0.01;
};

"MyMarker" setMarkerPos _pos;
[_pos, 50, 8] execVm "Mortar.sqf";

};
};
}];

Actually could rewrite this so Deer do "avoid" spears by launching another line of code instead of "evecvm Mortar.Sqf"

Also the Event Handler would need to be changed, various ways to do it.
2:13 pm, July 2, 2022
Twitch.tv/princessbuttonmasher 0 comments 0 likes