ayser
Member-
Content Count
56 -
Joined
-
Last visited
-
Medals
Everything posted by ayser
-
So i'm editing the Domi mission, and instead of having the mission end once all of the spots have been cleared, i'm trying to make the cleared area come back after 45 minutes. I'm trying to use a trigger for this, but I repeatedly get errors takenAgiaMarina = false; _attack1 = createSite siteAgiaMarina; _attack1 = createmarker ["Attack1",getpos m_attack1]; I get errors on "_attack1 = createSite siteAgiaMarina". How am I able to encounter this? I'm basically trying to undo the code below by adding everything back takenAgiaMarina = true; deleteMarker "m_attack1"; deleteSite siteAgiaMarina; Appreciate the help to those who give it :o
-
While i'm editing Wasteland, i've added water barrels, but with this script, when someone takes water from the barrel, it takes 1 from every barrel. What should I edit to take only 1 from that certain barrel? foodCreation.sqf // @file Version: 1.0 // @file Name: Script Name // @file Author: [404] Deadbeat // @file Created: DD/MM/YYYY HH:MM // @file Args: if(!X_Server) exitWith {}; _objPos = _this select 0; _Objtype = foodContainers select (random (count foodContainers - 1)); _obj = createVehicle [_Objtype,_objPos,[], 10,"None"]; _randomnum = floor(random 4); // Random # up to 4 foodObject = _obj; if(_Objtype == "Land_Barrelwater_F") then { _obj setVariable["water",_randomnum,false]; // Gives 3 _obj addAction ["Take water","client\digestion\thirstConsume.sqf","",1,false,true,"","(_target distance _this) < 3"]; }; _obj setpos [getpos _obj select 0,getpos _obj select 1,0]; thirstConsume.sqf if(foodObject getVariable "water" <= 0) exitWith { hint "This crate of water is empty"; }; if(foodObject getVariable "water" > 0) then { hint "Wait..."; sleep 10; hint "OK"; sleep 3; player setVariable["water", (player getVariable "water")+1,true]; foodObject setVariable["water", (foodObject getVariable "water")-1,true]; hint format ["You take a bottle of water, there is %1 left", [foodObject getVariable "water"]]; };
-
Land_Barrelwater_F ----------------- I've tried to find the nearest of the object, and tried working with that, but, no dice :( It won't even find the object. _closestFoodObject = nearestObject [player, "foodObject"]; if(_closestFoodObject getVariable "water" <= 0) exitWith { hint "This crate of water is empty"; }; if(_closestFoodObject getVariable "water" > 0) then { hint "Wait..."; sleep 1; hint "OK"; sleep 3; player setVariable["water", (player getVariable "water")+1,true]; _closestFoodObject setVariable["water", (_closestFoodObject getVariable "water")-1,true]; hint format ["You take a bottle of water, there is %1 left", [_closestFoodObject getVariable "water"]]; }; ---------- Post added at 06:59 PM ---------- Previous post was at 06:37 PM ---------- If it makes anything more clearer, this is everything: foodSpawning.sqf // @file Version: 1.0 // @file Name: foodSpawning.sqf // @file Author: [404] Deadbeat, [404] Costlyy // @file Created: 20/11/2012 05:19 // @file Args: if(!X_Server) exitWith {}; private ["_counter","_pos","_markerName","_marker","_amountOfVehicles","_hint"]; _counter = 0; for "_i" from 1 to 16 do { _pos = getMarkerPos format ["Food_%1", _i]; _newpos = [_pos, 21, 40, 1, 0, 60 * (pi / 180), 0] call BIS_fnc_findSafePos; [_newpos] call foodCreation; _counter = _counter + 2; }; diag_log format["WASTELAND SERVER - %1 Food crates Spawned",_counter]; foodCreation.sqf // @file Version: 1.0 // @file Name: Script Name // @file Author: [404] Deadbeat // @file Created: DD/MM/YYYY HH:MM // @file Args: if(!X_Server) exitWith {}; _objPos = _this select 0; _Objtype = foodContainers select (random (count foodContainers - 1)); _obj = createVehicle [_Objtype,_objPos,[], 10,"None"]; _randomnum = floor(random 4); // Random # up to 4 foodObject = _obj; if(_Objtype == "Land_Barrelwater_F") then { _obj setVariable["water",4,false]; _obj addAction ["Take water","client\digestion\thirstConsume.sqf","",1,false,true,"","(_target distance _this) < 3"]; }; if(_Objtype == "Land_WoodenBox_F") then { _obj setVariable["canfood",3,true]; _obj addAction ["Take food","scripts\score4Barrels.sqf", "(_target distance _obj) < 4"]; }; _obj setpos [getpos _obj select 0,getpos _obj select 1,0]; thirstConsume.sqf //_closestFoodObject = nearestObject [player, "foodObject"]; _closestFoodObject = getPos player nearestObject "foodObject"; if(_closestFoodObject getVariable "water" <= 0) exitWith { hint "This crate of water is empty"; }; hint "3"; if(_closestFoodObject getVariable "water" > 0) then { hint "Wait..."; sleep 1; hint "OK"; sleep 3; player setVariable["water", (player getVariable "water")+1,true]; _closestFoodObject setVariable["water", (_closestFoodObject getVariable "water")-1,true]; hint format ["You take a bottle of water, there is %1 left", [_closestFoodObject getVariable "water"]]; }; hint "4"; if(foodObject getVariable "water" <= 0) exitWith { hint "This crate of water is empty"; }; hint "3"; if(foodObject getVariable "water" > 0) then { hint "Wait..."; sleep 1; hint "OK"; sleep 3; player setVariable["water", (player getVariable "water")+1,true]; foodObject setVariable["water", (foodObject getVariable "water")-1,true]; if(foodObject getVariable "water" > 1) then { hint format ["You take a bottle of water, there are %1 left", foodObject getVariable "water"]; }; if(foodObject getVariable "water" == 1) then { hint "You take a bottle of water, there is 1 left"; }; if(foodObject getVariable "water" <= 0) then { hint "You take the last bit of water"; }; }; Edited some code from the last post
-
So, i'm not exactly sure how to do this I want to add 1 of _obj to the current variable. I've got this _obj setVariable["water",5,true]; I'm trying to do something along the lines of _obj setVariable["water", count "water" +1,true]; (I know the above code is terribly wrong, but it's just for an example if you didn't understand the question) Edit: PROBLEM SOLVED player setVariable["water", (player getVariable "water")+1,true];
-
How to activate a trigger with a trigger?
ayser replied to NeutiquamErro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why don't you do something like "putTrig2 = 1;" in Trig1's act and in Trig1 you put "putTrig2 == 1" in Trig2's Condition -
Remove smoke from units and weapon boxes
ayser replied to weaponsandcash's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For removing on players: _man = _this select 0; _man removeMagazine "1Rnd_Smoke_Grenade_shell"; _man removeMagazine "1Rnd_SmokeBlue_Grenade_shell"; _man removeMagazine "1Rnd_SmokeGreen_Grenade_shell"; _man removeMagazine "1Rnd_SmokeOrange_Grenade_shell"; _man removeMagazine "1Rnd_SmokePurple_Grenade_shell"; _man removeMagazine "1Rnd_SmokeRed_Grenade_shell"; _man removeMagazine "1Rnd_SmokeYellow_Grenade_shell"; For gearboxes, go into the gearbox script and remove where it adds smokes. -
onDifferentData, onHackedData, onUnsignedData
ayser replied to Xeoniz's topic in ARMA 3 - SERVERS & ADMINISTRATION
Both unsigned and hacked work for my server, but i've never tested OnDifferentData -
I'm trying to make a button, but everytime I try to load up the mission with this bit of code added to it I crash, specifically on the "onbuttonclick" line. How can I fix this? :confused: class btnDistanceAtmo : w_RscButton { text = "Atmo"; onButtonClick = ["true execVM "Atmo.sqf";"]; x = 0.32; y = 0.60; w = 0.125; h = 0.033 * safezoneH; };
-
Shameless bump..
-
http://www.mediafire.com/?1pgeddvbbalr956 Been learning scripting through 404's wasteland. I've got a lot to learn.. The script is in Custom\toggleAtmosphere.sqf
-
if (Atmo |#|== true) then { Atmo = false; fals...' entry,Display (dialog,Control,Network Object, Team member,Task,Location That's the error I get :(
-
I did the methods you suggested, and now it doesn't crash :) but, once again, i'm running into problems :( I've got an init.sqf with _Atmo == false; And a script with this in it... #include "init.sqf"; if (_Atmo == true) then { _Atmo = false; false execVM "Atmo.sqf"; } else { true execVM "Atmo.sqf"; _Atmo = true } I keep getting an error "|#|_Atmo == false;#line 1"... Error ==: Undefined fariable in expression: _atmosphere What am I doing wrong? I've tried doing _Atmo == 0; but nothing seems to work for me Edit - So I edited the code a bit, practicing my trash coding skills, and I'm getting errors on "Atmo = 1;", Why though? if(Atmo == 1) exitWith { player globalChat "ACTION"; }; Atmo = 0; if(Atmo == 0) then { hint "1"; } else { Atmo = 1; hint "2"; }; ---------- Post added at 09:49 PM ---------- Previous post was at 08:44 PM ---------- Getting super low on the list, doubt anyone will see this.... sooooo....... Badabump
-
Now he's insulting linux users, quick, grab the spears! :cool:
-
Loved it! :) But now i'm trying to go a little bit further. I'm trying to make it toggle itself.. But I keep getting an error, again, on the "onButtonClick" line. Any clues? onButtonClick = " if (_Atmo == 1) then { _Atmo == 0; false execVM ""Atmo.sqf""; } if (_Atmo == 0 ) then { true execVM ""Atmo.sqf""; _Atmo == 1 } "; Error message: "Config: End of line encountered after onButtonClick" Am I just not able to do all of the if's, and thens? Just 1 line?
-
Make a unit go into a animation
ayser replied to tambovskya's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, if you want to make it simple and make the player do the animation once, then put this in his init this playMove "InBaseMoves_table1"; If you want him to repeat it, make a .sqf and call it in his init with this while {true} do { if (animationState this != "InBaseMoves_table1") then { this switchMove "InBaseMoves_table1"; }; } It will work, but I tried using a switchmove on your animation, and it didn't activate, so it might be something with the animation, if not, then i'm not sure :confused: -
Make a unit go into a animation
ayser replied to tambovskya's topic in ARMA 3 - MISSION EDITING & SCRIPTING
"For an immediate transition use switchMove. This command must be executed after mission start. If you place it into init.sqs or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command." ~ BIWIKI -
Lovely little script! Works great when i'm not trying to use the pictures, but when I remove all of the //'s, I get a error on line 91, which is <img size='2' image='%3'/> Isn't this an HTML script? How would I use this? As even though everything us uncommented, but leave this line commented, no pictures show :(
-
You either have to make your own, or find one, then [] execVM it.
-
My server's only getting a good 1-3 FPS, always. The computer it's on has a 1055T, 8 GB of ram, and a 6950 as its graphic card. Is there something i'm doing wrong here?
-
You want everything done for you with big shiny GUI buttons? You must be from the Apple community ;)
-
When I start my server, the AI doesn't disable, unless I manually do it, which sucks! I've got "disableAi=1;" in my init.sqf, AND my description.ext. How can I disable it automatically? Or is the command currently not working?
-
If ArmA editor sucks, go back to Battlefield's editor, or the Call of Duty editor... Oh wait :cool:
-
Locked vehicle, AI still gets out and in
ayser posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure what I did, but yesterday I placed a Chinook, set it captive so no one shot it, and it was perfect, flew from point A to point B. I replaced the Chinook with a C-130J so I could do a quicker / better para drop. Once I changed it, the AI kept getting out of the plane, then got back in. I tried to lock the vehicle through editor and scripts, and they still got out/in. Once again, tried removing the get out/eject action, and they still got out and in. Deleted the C-130J and placed down another Chinook, and the same thing is happening, they get out and back in. Why do they need to get out, scan for about 5 seconds, then get back in? How can I keep them in? Nothings working for me today :( -
Locked vehicle, AI still gets out and in
ayser replied to ayser's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Got it all working perfectly now, thanks for the mission example :) Is there a way to get rid of the music once everyone gets in/out the blackhawk? -
Writtens on the right at the bottom like in the sp campaign
ayser replied to Bioz's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What errors are you getting? Make sure its in the same mission folder, and being called correctly. In the init: execvm "SQF_DIRECTORY\FILENAME";