frezinator
-
Content Count
128 -
Joined
-
Last visited
-
Medals
Posts posted by frezinator
-
-
How do you force eject all players out of the aircraft by using a trigger?
For example: im using a MV-22 plane and set a waypoint called "move" somewhere on the map. Then I put a trigger before the waypoint "move". Then when the MV-22 plane is inside the trigger, all players will be forced to eject, or paradrop.
It's like an automatic paradrop. I don't what to put in the trigger to make this work..
-
it should, yesthank you so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :)
-
I gonna have to test it out, ill give you an answere in an hour or so---------- Post added at 15:42 ---------- Previous post was at 14:06 ----------
OK.
got it to work.
I did not manage to make it with variables, so its a bit clumsy...
SO, the Removeweapons.sqf is changed to "Removeweaponsp1.sqf", and inside there is this:
while {true} do { waitUntil {!alive p1}; waitUntil {alive p1}; sleep 0.001; removeallweapons p1; sleep 0.001; };
with p1 being your unit name.
now you need to copy and paste it for every unit you want, and change the following things inside the script:
while {true} do { waitUntil {!alive [name here]}; waitUntil {alive [name here]}; sleep 0.001; removeallweapons [name here]; sleep 0.001; };
and change the script name to "Removeweapons[name here].sqf".
in the Init.sqf, you need to execVM all of those scripts. for example:
execVM "Removeweaponsp1.sqf"; execVM "Removeweaponsp2.sqf"; execVM "Removeweaponsp3.sqf"; execVM "Removeweaponsp4.sqf";
sorry its so clumsy and complicated, but could not make it work anyway easier.
P.S:
it is very wierd, I have a very similiar script that does work with variables:
_unit = _this select 0; while {true} do { waitUntil {!alive _unit}; sleep 0.01; waitUntil {alive _unit}; sleep 0.01; [_unit] call _setLoadout; sleep 0.1; };
with the script being called with the following in the unit's init field:
nul = [this] execVM "Removeweapons.sqf";
but it doesnt work in this case, no metter what I did...
hope you understand how to use that...
THank you so much !!!! I finished testing it!! it works like a charm!!!
I really appreciated for all the effort u put, just to figure, find, and make a script that works!!! THANK YOU SO MUCH!!!!!! it means a lot :)
its not that complicated and clumsy, as long it works! it's all good!!! :) I don't know how to make or write scripts but I can read and understand some scripting language :)
one more thing! This should work fine in dedicated server right?
-
I think he wants it just after the unit REspawn, not first dpawnYes ur right! I just want removeallweapons after players respawn.. did u found a way? I still can't find a solution :(
-
You got the first one (waituntil script) into a file and gave it the name "removeweapons.sqf"?Then, did you replace the [1,2,3] with the names you gave your units in the editor?
If so, ill have to test it out...
yes I did, I put all of that in notepad then I named it removeweapons.sqf. I also put the codes in the init.sqf and I named the players p1,p2,p3, including replacing [1,2,3,]. When I tested it, after I respawned I still have weapons..
-
You run it through Init.sqf.ExecVM "Removeweapons.sqf";
Im not really fimiliar with MP part of the script, but its is a very simple script, and it should be running ok in MP just as well as in SP...
didn't work :(
---------- Post added at 06:22 ---------- Previous post was at 06:21 ----------
try this, in each player init line:this addeventhandler ["respawn",{removeallweapons (_this select 0);}];
not working :(
-
You can use this:{
Waituntil {!alive _x};
Waituntil {alive _x};
Removeallweapons _x;} forEach [1,2,3,..];
Replace 1,2,3 with the players you want to remove the weapons from.
how do I run this?
Also, does this works for dedicated server?
-
How do you remove players weapon after they respawn?
-
You either place two trigger for Opfor and Blufor or use just one with "Anybody" and check which side the players are.Because the first attempt should be slightly easier to use, place two triggers on the same spot and set the activation BLUFOR and OPFOR, both repeatedly.
In the activation field you've to add:
{removeAllWeapons _x;} forEach thisList;
There could be another solutions so if someone else has better ideas, just pop them :D
Thank you so much Animus :) I love ur profile pic lol
-
Well "respawn_west" is a marker, isn't it? If so, it's quite easy :DName your trigger (for my example I'm going to use "myTrigger") and insert this into the activation field:
"respawn_west" setMarkerPos (getPosATL myTrigger);
Thank you so much!!!
-
-
One must always provide a full explanation of the situation if one expects to be provided with a solution. Do not assume anything except an occasional air of intelligence and provide all relevant details.The solution is simple:
(1) In the editor place an empty CRRC, name it boat and put in the init: this lock true; this lockdriver true;
(2) Place a player character and put in the init field: this moveincargo boat;
(3) Place another character, name it boat_driver and put in the init field: this moveindriver boat;
(4) Place a Move waypoint just before the Get Out waypoint and on activation: boat lock false;
(5) Place a trigger and set in the condition field (!(alive boat_driver)) and in on activation field: boat lock false;
That way the boat gets unlocked either just before hitting the beach or when the driver gets kileld. Job jobbed.
Sander
I found another problem.... when I played in dedicated server, everyone was on the water swimming, not in the boat... :( is there a way I can fix this? I think it has something to do with locality problems? I have no experience doings locals..
-
How do you remove all weapons by using a trigger??? im making a spectating zone beside the battlefield, I don't want spectators to be armed.. I moved the respawn_west in the spectating zone. How do you remove weapons for both sides (Blufor and Opfor) when they respawned to the spectator zone???
-
How do you move the respawn_west in a capturable trigger, when a player steps in that capturable trigger?
So, if a player is inside that trigger and he died, he will respawn in that trigger that he just went into..
-
yourVehicle addEventHandler ["killed", { _vehicle = (_this select 0); // Spawn a new one on the exact same spot _newVehicle = (typeOf _vehicle) createVehicle (getPosATL _vehicle); // Delete the old one deleteVehicle _vehicle; _newVehicle addMagazine "2Rnd_GBU12"; // ..... }];
This is one way you could achieve this, but it's not that practical because the vehicle spawns instantly after the other one got "killed", so you have to think of an appropriate way of respawning your vehicle.
how do I run this?
-
One must always provide a full explanation of the situation if one expects to be provided with a solution. Do not assume anything except an occasional air of intelligence and provide all relevant details.The solution is simple:
(1) In the editor place an empty CRRC, name it boat and put in the init: this lock true; this lockdriver true;
(2) Place a player character and put in the init field: this moveincargo boat;
(3) Place another character, name it boat_driver and put in the init field: this moveindriver boat;
(4) Place a Move waypoint just before the Get Out waypoint and on activation: boat lock false;
(5) Place a trigger and set in the condition field (!(alive boat_driver)) and in on activation field: boat lock false;
That way the boat gets unlocked either just before hitting the beach or when the driver gets kileld. Job jobbed.
Sander
Thank you so much!!!!! it worked!!!! Im really sorry for not explaining the whole details in the beginning >.< I thought there was like an easy and quick solution, that's why I didn't really explained the whole details.
Thank you so much!!! I really appreaciated it!!! :)
-
It works exactly as intended in my game running at default, which leads me to suspect that there are circumstances that you have failed to mention in your question, such as specifying addons and mods that alter the default behaviour of the game.(1) In the editor place an empty CRRC, name it boat and put in the init: this lock false; this lockdriver true;
(2) Place a player character and put in the init field: this moveincargo boat;
(3) Place another character and put in the init field: this moveindriver boat;
(4) Press preview and try to change seats
Regards,
Sander
My CRRC boat is not empty, there's a non-playable AI Driver in it. Im doing a boat insertion. I set a waypoint called "Getout" for my CRRC Ai drivers. So, when they reach the beach it will automatically eject the players. The problem is when we are halfway to our destination, when the enemies start shooting at us, the AI driver stops the boat or he get shot and get killed... then players are stuck in the boat because I set my CRRC boats to "locked", they can't eject out the boat.
The reason I set my CRRC boat's to locked, is because I don't want players to get in the driver seat.
Just to make it clear, im not using a empty Boat CRRC, I went to Blufor->Ships->CRRC.
The CRRC has already have AI driver in it, which I set him to nonplayable.
I hope you understand or it's clear enough to understand.
---------- Post added at 23:42 ---------- Previous post was at 23:29 ----------
off the very top of my head{_x addaction ["Eject", "eject.sqf"]} forEach crew vehiclename
"Eject" is what is shown in the action menu if you want a more fitting name for your action, and then you need to create an eject sqf - I'm utterly clueless with .sqf, but if we were to use the old, slightly defunct .sqs it might look like:
_Vehicle = _this select 0 _UnitToEject = _this select 1 _Action = _this select 2 _UnitToEject action ["eject", _vehicle] _UnitToEject removeaction _action exit
[EDIT]
can see that addaction has improved since ArmA when I last used it, so instead it might actually be better to use this in the boat's init field:
this addaction ["Eject", "eject.sqf", "", 1, false, true, "", "_this crew _target"]
as that is always attached to the vehicle, rather than my first example that attaches the action to the unit which is a bit clunky, and will only appear to those who are the crew of the vehicle, and not those standing outside it. Script would then update to:
_Vehicle = _this select 0 _UnitToEject = _this select 1 _UnitToEject action ["eject", _vehicle] exit
maybe someone here may be kind enough to conver that to an sqf, if not then update eject.sqf to eject.sqs
I tried all of them including changing sqf to sqs, it still won't work :(
---------- Post added at 23:43 ---------- Previous post was at 23:42 ----------
what happens if you lock it after you eject?when I locked it, I can't still eject out the boat.
-
The boat must be unlocked if the passengers are to disembark the vehicle. To ensure that passengers can disembark, but cannot switch to the driver position explicitly define the vehicle as unlocked as well as having the driver position locked by putting in the init field of the CRRC:Regards,
Sander
didn't work.. I can eject but I can still switch to the driver seat :/ the driver seat won't lock..
---------- Post added at 09:00 ---------- Previous post was at 08:58 ----------
lock the entire boat and create a custom eject action?How do you make a custom eject action?
-
how about putting an actually driver in boat then in his init field usethis hideObject true
turning him invisible, then you can use disable AI move or whatever other stuff you may need for him as well.
no luck :/
-
you could use a "killed" eventhandler on the vehicle. that way every time the vehicle is destroyed it fires the eventhandler and will recall the script. just use a "waituntil" command at beginning of script for vehicle to be present again. no use in re-arming a vehicle that hasn't respawned yet if your using respawn delay on it ;)how do you use killed eventhandler??? im not a pro scripter lol sorry T.T
could you show me the steps?
-
try lockDriverit works but I can't eject out of the boat :/
---------- Post added at 23:26 ---------- Previous post was at 23:25 ----------
Put the invisible man in the drivers seat. Disable his AI so he doesn't try to drive it anywhere.classname InvisibleManW_EP1
it doesn't work
-
Well if your jet is respawned, you have to re-supply it using the code lines I posted above - if you don't do it, your jet will have the default amount of ammo.how do you re-supply it??? or make it loop?
By the way, I like you profile pic, cute and creepy.
-
How do you disable the driver seat of CRRC boat??? so players cant switch to driver seat but they can still eject out of the boat.
-
You can use addMagazine to, yeah, add magazines to units or vehicles, even if they don't have enough slots left for it.To add 2 more GBU's to the F35B:
yourVehicle addMagazine "2Rnd_GBU12";
And to add 2 more sidewinders:
yourVehicle addMagazine "2Rnd_Sidewinder_F35";
If you want much more of em, do it in a loop :D
if the jet respawns, does the line "yourVehicle addMagazine "2Rnd_GBU12" disappears?
---------- Post added at 01:35 ---------- Previous post was at 01:32 ----------
If you want unlimited ammo of everything aswell use this:this addEventHandler ["Fired","this setvehicleammo 1"];
Where "this" is the plane. Edit with the appropriate name of the plane.
thnx but I just want to increase the number of missiles not unlimited.
How to force eject all players out of the aircraft by using trigger?
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
it works!!! but the pilots ejects too >.< then the plane crash lol. How do you prevent the pilot from ejecting?
---------- Post added at 07:14 ---------- Previous post was at 07:13 ----------
I want everyone to be forced to eject out of the plane except the pilot.
---------- Post added at 07:15 ---------- Previous post was at 07:14 ----------
How do you prevent pilot from ejecting?