-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Posts posted by sarogahtyp
-
-
Ok, I would say lets do a manual correction for that memory point problem.
if we do a manual correction for an average weapon (average in size and IR lasers mount point) then we have a quite good solution I think.
I dont know much about the different weapons in Arma 3 so I could use a hint which weapon we should take.
I already began with those manual correction but its far away from being perfect:
_temppos = player selectionPosition "pilot"; // thats the same as eyePos. _posLaser = AGLToASL (player modelToWorld ( [((_temppos select 0)+0.05), ((_temppos select 1) + 0.1), ((_temppos select 2) - 0.05)]));
Now I ve to go to work and so I have no time to optimize it more... maybe one of u guys could.
-
I got it with that check:
if ((player isIRLaserOn currentWeapon player) and (cameraView == "GUNNER")) then
-
okay, i think i cant help with the start position of that range finding thing but I ve another problem.
I used sjakals script and what I dont want is that the range and the crosshair is drawn when the player is not in the sights view by clicking right mouse button.How do I check if the player uses the weapons sights?
-
KKs tutorial about locality. u should read it to get a good view about that theme:
-
you can get the selectionName with the Dammaged EH its a return value of it. Got that Info from here: selectionPosition
-
-
-
That should work but is not tested.
Give feedback please!
/* Author: Sarogahtyp (with help from BIki examples) Parameter(s): 0: [OBJECT] - Unit with IR laser designator equipped weapon Returns: [NUMBER] - distance to object or 4999 if laser disabled or not pointing to an object */ params [["_bob",objNull,[objNull]]]; //_bob = _this select 0; that was bullsh*t i thought I deleted it _maxdist = 4999; //laser designators range (lineIntersectsSurfaces has a hardcoded limit of 5000 meters) _distance = _maxdist; if (isIRLaserOn currentWeapon _bob) then { _beg = eyePos _bob; _end = (_beg vectorAdd (_bob weaponDirection currentWeapon _bob vectorMultiply _maxdist)); _array = lineIntersectsSurfaces [_beg , _end, _bob, objNull, true, 1, "GEOM","NONE"]; if((count _array) > 0) then { _endL = _array select 0; _distance = _beg distance _endL; }; }; _distance
- 2
-
from bikis animationState entry:
Seems to be forced to lower case in Arma 3
maybe thats the reasontry this:
waitUntil{sleep 1; toLower (animationState _unit) != toLower _anim};
-
I ve not the time to read that all now, but i did a quick look at it and it seems that u want to use the DB at each connected client. As far as I know extDB is thought to store data server side only and thats the way I would use it.
-
according to dreadedentitys post u could spawn scripts with infinite loops instead of calling em because they r running parallel then. I prefer to spawn scripts too if its not needed that they run in a specific order. another advantage of spawning is that the script is not running in a scheduled environment.
if u want to learn basics about armas init order u could look here
-
1. primaryWeapon weaponDirection
2. isIRLaserOn
3. you can use intersect command handled in this thread:
https://forums.bistudio.com/topic/189068-los-line-of-sight/
lineIntersectsSurfaces -
WOW thank you for your work on this :D
It plays the music I need to test it on a server which I don't have.
Once I tested it I will update you.
Maybe send me your steam nickname here or in PM.
Anyways, Thank you very much! :D
My St3@m name is:
Sarogahtyp
feel free to add me :-)
-
Okay, it wont work because the init lines are processed before the init.sqf file.
Arma 3 - Init order
Solution is to group the guys in the editor and name one of them e.g. player_1
You dont need to use createGroup and join commands
Then u can use:
"bombmusic" remoteExec ["playSound", (group player_1)];
and that finaly .... should it be.
-
I m not familiar with armas init processes so i dont know what is executed when because i usually not using those init lines.
But it looks ok so far.
-
As I read the setGroupId command it just sets a name to display for the group. I think its not a variable.
use createGroup and join to setup ur groups variable name!
-
The one and only correct solution for ur problem is that what you nearly found on your own.
After reading biki carefully again I came to it, too:"bombmusic" remoteExec ["playSound", grp_t2];
-
Another try without your group:
_nearestdist=500; { _dist = vehicle _x distance bombmarker1; if (isPlayer _x and _dist < _nearestdist) then { "bombmusic" remoteExec ["playSound", _x]; }; } forEach playableUnits;
with that code everyone nearer 500 meters around bombmarker1 should play the sound.
if thats a suitable solution for you...
My way to solve that may look chaotic but dont worry ... sure it is :D -
yes and im working on a solution.
try it this way please:
_member = []; { if (!(_x in _member)) then { _member pushBack _x; "bombmusic" remoteExec ["playSound", _x]; }; }forEach units grp_t2;
-
okay, I never used that remoteExec command before :D
that should work
"bombmusic" remoteExec ["playSound", -2];
and it will play the sound on each connected client.is it a condition that only the group should hear the sound?
-
could u post ur c4.sqf please and tell me if that is executed at server only?
-
I was on the next step, give me some time to check the above problem.
things will go more complicated if grp_t2 consists of a ai/player mix because your sound will get played more than one time for the owner of the ai.
Solution for that should be:
_owner_ids = []; { _owner = owner _x; if (!(_owner in _owner_ids)) then { _owner_ids pushBack (owner _x); "musicbomb" remoteExec ["playSound", _owner]; }; }forEach units grp_t2;
-
bump
answered above ur post... just edited my post -
no, if an effect is local then the command has to be executed on each client which should get the effect.It plays the music for me, will it play in multiplayer only for group grp_t2 members?
{ "musicbomb" remoteExec ["playSound", owner _x]; }forEach units grp_t2;
that should do it
Weapon IR Laser Ranging
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Okay, we can start that with "Weapon" memory point even if I will not let the crosshair and range show when player is not using sights.
Another thing what came in my mind is to add a laser target at end position of the IR laser.
So we should implement _target = "LaserTargetW" createVehicle (getpos player); and set its pos continueously as long as the IR laser is activated.
Now back to the memory point. BI is doing the same as we do with the laser itself and it is pointing always to the correct position.
They must have a way to do that without the name of the memory point because every modder can name the memory points as he likes for his custom weapon but the IR laser is always at correct position, isnt it?
So we have to think about how is BI doing that?