Norbak
-
Content Count
141 -
Joined
-
Last visited
-
Medals
Posts posted by Norbak
-
-
**** Now ,only the player unit you chose will can use the trigger.
Great!.it works!.Thank you guys.
-
When a player gets in the area and use the itemx the trigger detects the creation of this itemx and the Actions begin.
That's cool for singleplayer but i saw an AI or another player could get in the area aswell and activate the trigger.Then you couldn't use the ITEMX even from outside the area. Switching Activation: BLUFOR to NONE ,nothing happened. Any idea?
((itemx distance thisTrigger) < ((triggerArea thisTrigger) select 0)) and {(itemx distance thisTrigger) < ((triggerArea thisTrigger) select 1)}
It didn't work, Schatten.
:(
-
I'm not sure if its that. my apologies if i didn't explain well.
i meant to say when someone calls a possible ITEMX but inside an Area trigger. Then the itemx is not able to be made.
-
Ok, Schatten.
A quick question about distance again using triggers. If i put a trigger with Axis a and b. Which should the CONDITION be to detect a contruction of an ITEMX or a VEHICLEX inside the range of the trigger when that ITEMX is created?
Condition: itemx distance thistrigger < distance? (doesn't work)
Itemx distance thistrigger < (don't want a number, i need the range of the trigger, or manually [x,y])
-
I don't know gow to explain lol
-
It didn't work.. Maybe i did something wrong.
-
Hmm interesting. Then a player who can't make a "itemX" will only wait "waituntil {}" for 5 seconds... and a player who can make "Itemx" will wait for "itemx" or not.
Interesting thing. Thanks for this great tip.
I'll test later.
-
itemx is undefined on server. waitUntil needs to wait until itemx will be broadcasted from client.
Then if the cleint doesn't create "Itemx", Waituntil will never end and will never start "OnPlayerDisconnected"?. Is that right?. So it's a big problem.
-
waitUntil { sleep 0.1; !(isNil "itemx") }; ArraysToDelete = itemx nearObjects [["Thing","Car","Static"], 20];Not sure if that could work. It will using the unit which makes "BASE" but not sure for the rest of units. Waituntil {!(isNil "Itemx"} if's forcing to make an ITEMX every time.
-
itemx = createVehicle ["Baseball", [(getpos player) select 0,(getpos player) select 1,0], [], 0, "NONE"];
Publicvariableserver "ITEMX";
Then... ??
ArraysToDelete = itemx nearObjects [["Thing","Car","Static"], 20];
-
But that "_this" in "ArraysToDelete = _this nearObjects [["Thing","Car","Static"], 20];" shouldn't be the player but something inside BASE..
Maybe using this in Client Side 2? :
CLIENT SIDE 2:
itemx = createVehicle ["Baseball", [(getpos player) select 0,(getpos player) select 1,0], [], 0, "NONE"]; // Spawning that base creates ITEMX aswell.
And changing Server Side to:
ArraysToDelete = itemx nearObjects [["Thing","Car","Static"], 20];
-
I'm learning to use these commands. Thank you.
Next level. More than one array inside ONDISCONNECTED?
Server Side:
YourOwnVehicles = [];
ArraysToDelete = _this nearObjects [["Thing","Car","Static"], 20];onPlayerDisconnected "
{_x spawn {deleteVehicle _this}} forEach YourOwnVehicles;{_x spawn {deleteVehicle _this}} forEach ArraysToDelete;
YourOwnVehicle = [];
ArraysToDelete = [];
";
"YourOwnVehicle" addPublicVariableEventHandler {
YourOwnVehicles set [count YourOwnVehicles, YourOwnVehicle];
YourOwnVehicle = nil;
};"BASE" addPublicVariableEventHandler {
ArraysToDelete set [count ArraysToDelete, BASE];
BASE = nil;
};CLIENT SIDE 1:
YourOwnVehicle = "Old_moto_TK_Civ_EP1" createVehicle [(getPos player select 0), (getPos player select 1), 0.3];
publicVariableServer "YourOwnVehicle";CLIENT SIDE 2:
BASE = [getPos Player, random 360, "smallbase_EP1"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"));
publicVariableServer "BASE";
-
I tested it. It works. But i need to make some addons. Thank you, Schatten
-
Yes!. It works!. Nice solution!. Thanks, Master Schatten!
-
It's not working for me.
I need to delete an object made using a local script with a global effect.
If local player then {
YourOwnVehicle="Old_moto_TK_Civ_EP1" createVehicle [(getPos player select 0),(getPos player select 1), 0.3];
};
* When he dies his "YourOwnVehicle" is deleted but...
when he disconnects "YourOwnVehicle" is still alive.
-
I tried something like this:
_Target = nearestObject position player;
if (_Target isKindof "Man" && _Target distance player <= 20) then {
Hint "somebody is near";
};
And i think it works but i need to make a distance between >90 and <10. Or something like that because the condition is detecting player as himself like an "Man" . Any idea please?.
Thanks in advance.
-
Well. The cuestión is just that. I need to make a script (not using triggers con editor) .I tried using some IF but brutal fail.
Can anyone help me?. Maybe creating a trigger inside the script?. My knowledge is quite poor.
-
onPlayerDisconnected = "deletevehicle House1; deletevehicle House2; deletemarker "marker1";"; ??? .
It's not working for me. Am i doing anything wrong?
-
Sure! See examples.
Those examples are not telling me great things. I can't understand its funtion.
-
hmm i see. and does onplayerdisconnected accept more than 1 action?
-
I'm trying to to something like this but didn't work:
onPlayerDisconnected = "if (!isPlayer player) then {deletevehicle House1}";
-
onPlayerDisconnected "deleteVehicle cube4";
Should i put this inside the init of the unit?, or could it work inside init.sqf making something like:
if (player == Soldier2) then {onPlayerDisconnected "deleteVehicle Cube4";};
If (player == Soldier9) then {onPlayerDisconnected "deleteVehicle Flash2";};
....
-
Thanks, but how to make it inside a trigger?
-
how could i make to work a script to delete a vehicle or object when a specific (or not) player disconnects?
i tried:
if (isNull player) then {deletevehicle Cube4};
and...
If (!local player) then {deletevehicle Cube4};
but didn't work. Object "Cube4" is still alive when the player disconnects.
Any idea?.
Delete object (name) when player or players disconnect.
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
I'm doing something wrong.it's not working now for me.do i need to place Onplayerdisconnected in init.sqf or in a trigger in the editor?
Server side is a trigger in the editor ,yes?. Repeatable and local player?
And another issue:
Every player ( player1 and player2) are able to spawn a "Yourownvehicle". When one of them disconnects the other Yourownvehicle item is deleted aswell, not only the player1's vehicle. Is this correct?. Is there any kind of fix this to delete only our own item?