-
Content Count
2658 -
Joined
-
Last visited
-
Medals
Everything posted by demonized
-
Need JIP Help
demonized replied to A-SUICIDAL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
no, i intended it to work throughout the mission create tasks at start, create more task during mission etc. you just update the array, whenever you create a new task... though markers and such you also need to account for but that can also be incorporated. -
d30 enemy shooting in direct mode
demonized replied to jorxe33's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
that should be something related to your d30 is just placed on a "hill" and cant get his guns far enough down, i use them at 50 meter on airport grounds and they hit correctly.. -
Trigger condition: faction x kills (number) of faction y
demonized replied to katipo66's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
you need to use killed eventhandlers on every unit, and then add to a variable. place this in init.sqf: eastKilled = 0; westKilled = 0; place this in all west and east units: this addEventHandler ["killed", { _dead = (side (_this select 0)); _killer = (side (_this select 1)); if (_dead == west AND _killer == east) then { westKilled = westKilled + 1; publicVariable "westKilled"; }; if (_dead == east AND _killer == west) then { eastKilled = eastKilled + 1; publicVariable "eastKilled"; }; }]; end trigger condition: eastKilled > 10 on act: hint "more than 10 east have been killed by west units, west wins"; -
Need JIP Help
demonized replied to A-SUICIDAL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
place in init.sqf preferably at the top: if (isNil "AllOurTasks") then {AllOurTasks = []}; if (isNull player) then { player spawn { if (_this != player) exitWith {}; // exit all other clients. waitUntil {sleep 1; !isNull player}; // waituntil player is ingame. _tasks = []; if ((count AllOurTasks) != 0) then { { _task = player createSimpleTask (_x select 1); _task setSimpleTaskDescription (_x select 2); _task setSimpleTaskDestination (_x select 3); _task setTaskState (_x select 4); _tasks = _tasks + [_task]; } foreach AllOurTasks; }; }; }; here we create the tasks, in some script, at some time. // task 1. task1 = player createSimpleTask ["NewTask"]; task1 setSimpleTaskDescription ["Today you have to kill Spongebob.", "Kill Spongebob", "Here he is !"]; task1 setSimpleTaskDestination (getMarkerPos "obj1"); task1 setTaskState "Assigned"; // here we collect all info, top to bottom, left to right in the AllOurTasks array. AllOurTasks = AllOurTasks + [["task1", ["NewTask"], ["Today you have to kill Spongebob.", "Kill Spongebob", "Here he is !"], (getMarkerPos "obj1"), "Assigned"]]; // when we are finnished we broadcast the array to all clients, including JIP´s so they can create them in the init.sqf code. publicVariable "AllOurTasks"; when you update your task, use set command, you see in the init part that taskstate is select 4, so we now adjust that variable. task1 setTaskState "Succeeded"; { if (str(task1) in _x) then { _x set [4, "Succeeded"]; }; } foreach AllOurTasks; publicVariable "AllOurTasks"; now any JIP will create their task with the same taskstate as others already playing, in this case its now "Succeeded". you can adjust any part of the tasks with the set command, like for example adjusting setSimpleTaskDestination, we use select 3 etc. you can add and adjust how many times you like at any point in the mission, just remember to use the same order for all tasks info. then collect info as above, publicvariable it and all players that join will recreate the tasks for themselves when they join. NOTE: in theory its all good, untested, also if someone knows how to just use the MP framework for this all would be easier, but it isnt to much work once you got it down. -
Hostage rescue - Dedi server woes.
demonized replied to SOLDIER X's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
try this: _pow = _this select 0; _caller= _this select 1; _id = _this select 2; sleep 1; _pow removeAction _id; // remove action on all clients. // execute remaining commands only on server side. if (isServer) then { _pow enableAI "MOVE"; _pow setCaptive false; _pow setUnitPos "UP"; [_pow] joinSilent group _caller; }; if then has same effect as placing F2k Sel´s code above the commands. -
Remove Addaction then put it back ?
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
yes it will because publicVariable broadcast the variable to all clients, but unsure if the addaction is JIP friendly when placed on a object in game wich is not player. my guess is that JIP joining server after the addaction is created will not see it. you can use MP framework to fix that if needed. -
updating a marker position every second
demonized replied to Oglesbee's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I asuming that you actually have named your unit ed Maybe you need to use vehicle ed, vehicle ed is ed when he is not in a vehicle. while {true} do { "Obj6" setmarkerpos (getpos (vehicle ed)); sleep 1; }; else it was just your spaces in { true } wich put it off. dont use () in while loops like Grimes did above, always use while {some condition} do { -
Burning scripts
demonized replied to cobra5000's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
forest fires and other -
Showcase: US Army
demonized replied to Gameboy789's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
maybe you can depbo it in Arma2\missions folder using eliteness, then copy the extracted folder to: C:\Users\win User nick\Documents\ArmA 2 Other Profiles\yourNick\missions edit: look here maybe for pre installed missions: C:\Program Files\Bohemia Interactive\ArmA 2\AddOns\mission.pbo -
Have been playing with this soundmod last week now. When im in my Abrahams approacing the battlefield to the hiss of the beefy gasturbine, while my Commander unleashes his devastating 50´ rounds at the hostile rpg team on my left flank and my main gunner fires a deafning sabot round at the T72 up ahead in the streets... I giggle abit and feel euphoric :) sound is half the game, thank you for this.
-
since we are nitpicking: Strategy - is what you plan to do. Tactics - is also something you plan to do. you "DO" both of these plans... :p
-
How to disable the score/scoreboard
demonized replied to ios's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/server.armaprofile found ca 1/3 down the page. untested, but hopefully it does what you want... -
Add Action to "arrest" sb
demonized replied to Bish's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
and what inspired you to post the question in a thread about arresting??? :rolleyes: use search function -
Random tasks by radio
demonized replied to lockjaw-65-'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
make the trigger repeated and reset the missiondone variable: condition of trigger: missiondone on act: missiondone=false; nul = [] execvm "missions.sqf"; -
some pseudo help with creating AI
demonized replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
1: findcover command is not working in latest official patch. you can use a combination of boundingbox and nearestObjects maybe, and then calculate direction to enemy or area and select the side of the object found in opposite direction. 2: Calculating LOS, can be done by pushing a invicible object forward from position to object and checking if any other object touches it, but its a time consuming and heavy way of doing it, several posts about it on forums, i think CarlGustaffa had a very good version, but again, he warns of massive usage of it as its heavy in use. note, be aware that simply pushing the object forward will not do, as you also need to push it in the Z direction, (uphill, downhill). 3: this one will be somewhat script heavy, but i would not use any selectbestplaces etc commands, simply go for range and direction spaced out in whatever formation you decide, for example tanks behind inf squads, mg and AT teams on flanks and in center etc.... very doable, but would require you to script for alot of variables, like enemy here or enemy there, enemy what or enemy whatnot, amount of enemy, are they firing, did someone get spotted before all is ready and so on.... the issue you have with additional squads being sent out to recon is most likely because you dont have collected the first squad and waited until its task where done or dead etc. hard to say wittout looking at your whole script. I was intrigued by your post, and have been fiddling with a similar idea before, but never got around to try and realize it. -
this. The community will be in warp speed once A3 is out, several hundreds of community members will spit out ready to use A2 content in A3 within a very short timeline after release. And come on!! stop crying about sci fi!! it is near future, it has todays armor, some experimental helis no lasers or terminators have been confirmed....
-
Add Action to "arrest" sb
demonized replied to Bish's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
place a marker at your police station vehicle parking space. place a marker at the civilian holding area. once the civi is in landrover, run this code: (driver landrover) doMove (getMarkerPos "parkingMarker"); waitUntil {unitReady (driver landrover)}; unassignVehicle civilianman; [civilianman] orderGetin false; waitUntil {(vehicle civilianman) == civilianman}; civilianman doMove (getMarkerPos "holdingmarker"); waitUntil {unitReady civilianman}; [civilianman] joinSilent grpNull; // only added if he is in captive group and now he is all alone waiting for interrigation. doStop civilianman; this is ofc asuming that there is no threats at all to the police landrover, if so youll need to either script in for that or exit script if driver is dead or captive is dead etc.. -
Conditions for not being "in" the vehicle?
demonized replied to wontial's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
(vehicle engineer) == engineer but anyway, using the builtin special variables of addaction (_this and _target) repair = this addAction ["Emergency Field Repair","repair\repair.sqf",[],1,false,true,"","(damage _target > 0.5) && (_this distance _target) < 4 && (typeOf _this) == 'US_Soldier_Engineer_EP1' && (vehicle _this) == _this"]; here only the US engineer class can ever see the action, and only when vehicle is damaged more than 0.5 and engineer is less than 4 away and engineer is on foot. more classnames here for other factions like USMC etc.. http://forums.bistudio.com/showthread.php?t=73241 -
count is a ingame command, you have assigned it to true in init.sqf. use something else, like GEN_count etc.. if (!isServer) exitWith {}; this will exit all that is not server, so no player will see it on dedi, and only host will see it on local hosted, remove that line. whats this?? newvariable = true; publicvariable "newvariable"; newvariable is never used in your script.. also: if (!isnil "timer") then {}; ????? remove that, if something do nothing... you see? if (timer >= 0) then {Count = true}; shouldnt you use if (timer == 0) then {GEN_Count = false}; as the purpose would be to stop the hint of timer??? making it true (what it already is), makes no sence, and when you keep adding to timer instead of subtracting the line is just empty fillings. something like this should it look like: init.sqf null = player execVM "countdown.sqf"; if (!isServer) exitWith {}; sleep 5; if (isnil "timer") then { timer = 0; publicvariable "timer"; }; while {true} do { hintSilent parsetext format ["<t size='1.5' align='center'>%1</t>",(timer / 3600) call compile loadfile "time.sqf"]; timer = timer + 1; publicvariable "timer"; sleep 1; }; maybe you need in init.sqf this instead to work with JIP: if (isNull player) then { null = player execVM "countdown.sqf"; };
-
Addaction and passing info
demonized replied to 1para{god-father}'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
this addAction ["Get Intel","inform1.sqf",[b]["marker1", 5000][/b]] if isserver then {[b] _arguments = _this select 3; _source = _arguments select 0; _radius = _arguments select 1;[/b] _mission = switch (floor random(5)) do { // radio tower stuff case 0: {"missions\mission1.sqf"}; // scud launcher stuff case 1: {"missions\mission2.sqf"}; // suicide bomber stuff case 2: {"missions\mission3.sqf"}; // suicide bomber stuff case 3: {"missions\mission4.sqf"}; // suicide bomber stuff case 4: {"missions\mission5.sqf"}; }; _nul = [_source, _radius] execVM _mission; }; -
you should read the guide in my signature by Mr Murray.
-
AI V-22 Helicopter
demonized replied to Gameboy789's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
using this code in init of MV 22 _null = (vehicle this) spawn { while {true} do { _this limitSpeed 50; sleep 0.1; hintSilent format["speed is %1",(round(speed _this))]; }; }; the Mv22 will keep VTOL´ing at ca 160 km/h, rotors tilt back and forth quite often. using it on a heli or a car etc and it works flawlessly at 50 km/h, im asuming its the plane class that kicks in wich determines it to have a minimum speed to prevent stall or crash. i remember in my not released update of parareinforce script, i scripted A10´s to follow a slow moving C130, though maybe it was around 160 speed i used.... actually i think i used 180 and that would make sense then... -
beginning construction of my "holo deck", and getting my symbiotic holo impressionating tool together. sceptically optimistic, as far as i can see from these videoes, they are just 3d Max or Maya rendered videos. the PC technology have been stagnant for a few years, i am waiting for the next leap, though this one might not be it.
-
Script to cut off helicopter engine mid-flight
demonized replied to ILoveSpaghetti's topic in ARMA 2 & OA : Community Made Utilities
well he wanted something random to react to.. balls on fire surely fits that bit :D -
AI V-22 Helicopter
demonized replied to Gameboy789's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
just limitspeed and it will VTOL forever.