-
Content Count
372 -
Joined
-
Last visited
-
Medals
Everything posted by Gekkibi
-
waitUntil all players are in game in MP
Gekkibi replied to ADuke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@shk If you want to make sure all players can start the mission at the same time. I wouldn't use black screen myself, I would use disableUserInput to ensure they don't do anything. In my missions some players have to wait 15-20 seconds more than others... -
Create a thousand markers via one script? And if some unit is in It?
Gekkibi replied to Khalashnikovf's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Use call compile format. For example: _vehicle is a car named "myPorsche" call compile format ["%1_fuel = fuel _vehicle", _vehicle]; This would create a variable called myPorsche_fuel, and the value is the fuel value of myPorsche. -
waitUntil all players are in game in MP
Gekkibi replied to ADuke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I know exactly what you mean. I have the same problem in my current MP-mission project. You can't use "p1 == player && p2 == player && ... && pn == player", because player is different to every client. You'll have to check it in client side. I am not sure if this works, but make a script that waits until player have loaded the mission (Not sure how... p1 == player..?) and then it sets a global variable to true and broadcasts it to other clients. Server has a waitUntil {var1 && var2 && ... && varn}; If it works could you be so kind to inform me? :) -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What I meant was that try out different commands by using "hint format ["%1", command]". You will see what the command returns. So, put this to the trigger init field (Condition can be radio alpha for example): hint format ["%1", magazines player]; You will get a hint. It will show you the returning value of "magazines player". In this case it will show you an array, and each element in that array represenets a magazine in your inventory. I help you out on this one. Put this to the trigger condition: "magazineclassname(whatever it is...)" in magazines player -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hint format ["%1", magazines player] will show you which magazines you are carrying. Now you'll only have to check if the specific magazine is in the inventory. In other words, you'll have to check if the magazasine is in array. -
AI waypoint trigger help
Gekkibi replied to gho-t's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Synchronize (F5) the waypoint to the trigger. -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I suggest you put the condition to: (player hasWeapon "ACE_M3TripodProxy" && s6 hasWeapon "ACE_BAF_L2A1Proxy") || player hasWeapon "ACE_BAF_L2A1Proxy" && s6 hasWeapon "ACE_M3TripodProxy") Then it doesn't matter which takes which. Say, what if the player would take the weapon instead of tripod? The AI doesn't know how to take the other one. So I would make a condition that first it will try to take the weapon, but if there is no weapon it would take the tripod instead (Check the cargo of the ammo crate. If there is no CSW weapon then make the AI to take the tripod. You already know the command for this one, ay? :) ) And about the magazines... Sure, there isn't command "hasMagazine", but use ctrl+f and search for "magazine": 17 hits. Now browse them through until you find the right one (senizagam :tnih). Try the different commands by placing a radio trigger: Condition "this" and on activation "hint format ["%1", command_and_variables]", for example ["%1", unitPos s6]; This way you will find out how different commands works, what will they return and maybe during the testing you will get a bright idea of a new way to make something really fancy. (Brushed my teeths already. Yes, about to go to bed) ;) -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I suggest you browse BI wiki, and especially the list of Arma 2 commands. Just use ctrl+f and find a keyword (For example if you wonder how can you attach something just ctrl +f and search for "attach". The Best Way To Learn scripting. Trust me. :) -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It is (kind of) deleted after the variable is set. The problem is not the trigger, but the .sqf code. If you only need to load one magazine I recommend you don't use the script. The other method has no bugs at all, doesn't eat processing power as much and is much cleaner (You don't have n+1 different .sqf files in the mission folder). Glad to help (And yes, heading to bed real soon!). -
1.56 New features HELP
Gekkibi replied to Vicarious's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
As far as I know it is not possible to destroy the city before the mission starts. Try to destroy an object ([0, 0, 0] nearestObject x setDamage 1) in init.sqf: It will happen after the mission starts. -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
"car" is the name of the object. So if you have a bradley named "vehicle_1" put "vehicle_1" instead of "car". Or if the bradley is named "armor" put "armor" instead of "car". Select 0 is that it selects the first (n-1) element and checks if "ACE_M2HBProxy" is in that array. If you want the trigger to activate when there are 1 M2, 1 tripod and 2 magazines it is little bit trickier. Put this to the init-line of the vehicle: nul = [this] execVM "scriptname.sqf"; Create scriptname.sqf (You can name it to anything) and put that to the mission folder. Put this to the mission folder: _car = _this select 0; waitUntil {"ACE_M2HBProxy" in (getWeaponCargo _car select 0) && "ACE_M3TripodProxy" in (getWeaponCargo _car select 0)}; waitUntil {((getMagazineCargo _car select 0) find "ACE_M2_CSWDM") > -1}; _element = (getMagazineCargo _car select 0) find "ACE_M2_CSWDM"; while {(getMagazineCargo _car select 1 select _element) < 2} do { _element = (getMagazineCargo _car select 0) find "ACE_M2_CSWDM"; sleep 0.1; }; vehicleLoaded = true; Create a trigger. Put this to the condition: vehicleLoaded And put to the on activation whatever you want to happen after the weapon, tripod and at least two magazines are in the trunk. Note that there is an awful bug: If you put the weapon, tripod and ONE magazine to the trunk and then take the magazine out it will activate the trigger. And if you take either the M2 or the tripod away after putting one magazine to the trunk it isn't counted (The trigger will activate when you put one more mag, no matter if the weapon is in the trunk or not). And alot more, to be sure. It would be much easier if it would be only one mag, then it would be: "ACE_M2HBProxy" in (getWeaponCargo car select 0) && "ACE_M3TripodProxy" in (getWeaponCargo car select 0) && "ACE_M2_CSWDM" in (getMagazineCargo car select 0) Sorry, way way way too tired to code anything more efficient. :( -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Whoops. I must be too tired. I meant getWeaponCargo, of course... Put this to triggers condition: "ACE_M2HBProxy" in (getWeaponCargo car select 0) && "ACE_M3TripodProxy" in (getWeaponCargo car select 0) -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
"getMagazineGargo car" will return an array. The array is in form [[weapon1, weapon2, weapon3, ... ,weaponn], [magazine1, magazine2, magazine3, ..., magazinen]], so if you want to check if a specific weapon is in a cargo you'll have to check the first array inside that array. If "'weaponclassname' in (getMagazineCargo car select 0)" returns true, the weapon is in a cargo compartment, else it isn't. -
Activate a Trigger when Retrieving a Weapon
Gekkibi replied to mtuckner's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Use getMagazineCargo. -
Move order synch not working
Gekkibi replied to SOSyourself's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes I did. 1) Create a waypoint where you want the squad to hold 2) Create a trigger 3) Synchronize this trigger to this waypoint 4) Create n+1 waypoint you want the squad to go after the trigger is activated 5) ??? 6) Profit -
.PAA and .PAC Transperancy
Gekkibi replied to akiman94's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I use gimp. I save the picture as .png and use TexView 2 to convert it to .paa. Transparency is working for me. -
Move order synch not working
Gekkibi replied to SOSyourself's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Trust me: You don't have to put two waypoints close to each other. Only one is necessary, and you synchronize this waypoint to the trigger. -
Move order synch not working
Gekkibi replied to SOSyourself's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You synchronized the wrong waypoint. -
Updating "start" marker in briefing
Gekkibi replied to Nephris1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Remove "sleep 0.1;". -
Multiplayer Script to force player into a vehicle
Gekkibi replied to blanic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is it working in the editor? If I recall correctly the target of moveInCargo has to be local to the one who executes the command. -
Init-field will do just fine.
-
1. Requires separate addon if you want to change the uniforms/gears physical look. setIdentity if something else. 2. removeAllWeapons, addMagazine, addWeapon, and ....
-
Trigger activates waypoint, new objective, ect
Gekkibi replied to SOSyourself's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
To create a waypoint put this into your sqf after the conversation: nul = group _bigChief addWaypoint [[123, 456], 0]; Can't help you with tasks, 'tho. -
Trigger activates waypoint, new objective, ect
Gekkibi replied to SOSyourself's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I would create a waypoint directly where the leader is (Select the leader, press F4 and double-click the leader) and synchronize (F5) this waypoint to the trigger, and then I would make another waypoint where I would want the team to go. When the player enters the trigger area the team starts to move. Is this what you wanted? Unfortunately I lack any experience concerning tasks. Personally I hate them, and I have made series of scripts to create my own task-system so I don't have to use built-in task-commands. -
1.56 New features HELP
Gekkibi replied to Vicarious's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I did it by putting this after the while-loop: CONTROL ctrlsetfade 1; CONTROL ctrlcommit 0.1; I lack any experience with controls, so I have no idea how to actually delete the text permanently (This will make the text disappear, but it is still there...)