igneous01
Member-
Content Count
924 -
Joined
-
Last visited
-
Medals
Everything posted by igneous01
-
Enemy count in trigger condition
igneous01 replied to Doodle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
actually, i have found another solution that works with just using one trigger and 1 global trigger blufor detected by opfor, repeated onact: Opforguys1 = nearestObjects [AB1, ["RU_Soldier_Base", "RW_RU_Soldier_Base"], 200]; {_x setbehaviour "COMBAT"; _x setcombatmode "RED"} foreach Opforguys1; {_x reveal ((list AB1) select 0)} foreach Opforguys1 nearestobjects lets you specify what classtypes you want, so i used the base class of russian infantry (and a check for the winter reskins base class here) i also named the trigger AB1, and made it reveal the first detected unit to all the opfor in the trigger area, to make it feel better. Your solution works great, but the mission im working on is going to be quite dynamic and big with lots of scripts and triggers running already, so this atleast solves the problem of having to have an extra one. Thanks for the suggestion tho I do appreciate it ;) -
Enemy count in trigger condition
igneous01 replied to Doodle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I know this is an old thread but Its relevant to ask: Is there a way to acquire the unit array of all opfor inside a trigger, that is set to blufor detected by opfor? i want to set all opfor into danger inside this area, once blufor is detected, but im trying to avoid using double triggers to acquire one effect. maybe someone can help me out? -
New conversation system how-to
igneous01 replied to Jezuro's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Jezuro im having a problem using the interrupted event, It does not work for my conversation (infact i cannot use sentenceid check for anything) I have an NPC, and a trigger around him that will add the topics to the npc and the player that walks into the trigger. I can engage in conversation with him, but as soon as I hit backspace, the check sentenceid == "Interrupted" does not go through in the fsm, and doesnt display the hint. I did add an Interrupted sentence class into the bikb file, and i added it into the fsm. Does this check only work when in the start state of an fsm? Currently It is setup that: the player must talk to him first, this works then the NPC engages with the first sentence, also works then the player response, works npc engages with second sentence, works the entire conversation and flow works, but the interrupted check does not, hanging the entire conversation and all the scripts, until the player has given a response (which he cant since he has cancelled the conversation) here is a picture of my FSM so that maybe someone here might explain to me why this doesnt work: http://img695.imageshack.us/i/npcborisfsm.jpg/ I had to use kbWasSaid to check if a response was given, sentenceId does not work apparently after the first state, and kbWasSaid does not work to check for "Interrupted" -
Pick up object script - If Player is running then drop cargo?
igneous01 replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Problem solved: In case people are wondering how this is done, you need to use speed to check how fast a unit is moving, and you can use forcewalk to keep them from jogging (not sprinting ofcourse) first script (part of the mission) [player, _Cargo1, _Cargo2, _Cargo3, _Cargo4, _Cargo5, _obj1] spawn { _Cargo1 = _this select 1; _Cargo2 = _this select 2; _Cargo3 = _this select 3; _Cargo4 = _this select 4; _Cargo5 = _this select 5; _obj1 = _this select 6; player setVariable ["carrying", 0]; player sidechat "setting carriar variable to 0"; while {(taskstate _obj1) != "SUCCEEDED"} do { player sidechat "in loop"; _AID1 = _Cargo1 addaction ["Pick up Cargo", "PickupObjects.sqf"]; _AID2 = _Cargo2 addaction ["Pick up Cargo", "PickupObjects.sqf"]; _AID3 = _Cargo3 addaction ["Pick up Cargo", "PickupObjects.sqf"]; _AID4 = _Cargo4 addaction ["Pick up Cargo", "PickupObjects.sqf"]; _AID5 = _Cargo5 addaction ["Pick up Cargo", "PickupObjects.sqf"]; waitUntil {(player getVariable "carrying") != 0}; hint "carrying something"; _Cargo1 removeaction _AID1; _Cargo2 removeaction _AID2; _Cargo3 removeaction _AID3; _Cargo4 removeaction _AID4; _Cargo5 removeaction _AID5; waitUntil {(player getVariable "carrying") == 0}; sleep 1; }; }; PickupObjects.sqf private ["_unit", "_objects", "_actionid", "_carrying"]; _actionid = _this select 2; _unit = _this select 1; _objects = _this select 0; _unit setvariable ["carrying", 0]; // attach the object _objects attachTo [_unit,[0,2,0.3]]; _unit setvariable ["carrying", 1]; _unit setvariable ["object", _objects]; _unit forceWalk true; // remove pickup action _unit removeaction _actionid; // add drop action _DA = _unit addAction ["Drop Cargo", "DropObjects.sqf"]; [_unit] spawn { private ["_unit"]; _unit = _this select 0; _FEHandle = _unit addEventhandler ["fired", {(_this select 0) setVariable ["carrying", 0]}]; while {(_unit getVariable "carrying") == 1} do { if ((speed _unit) > 7) then { _unit setvariable ["carrying", 0]; }; sleep 1; }; _unit RemoveEventHandler ["fired", _FEHandle]; }; waitUntil { (_unit getvariable "carrying") == 0 }; detach _objects; _unit removeaction _DA; _unit setvariable ["object", nil]; _unit forcewalk false; DropObjects.sqf _unit = _this select 0; _id = _this select 2; detach (_unit getvariable "object"); _unit setvariable ["carrying", 0]; its rough, but it wasnt intended to be a standalone script, just something for the purposes of my mission. -
Pick up object script - If Player is running then drop cargo?
igneous01 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
As the titles says, i cant figure out how to get the player to drop his cargo if he is running too fast. I just finished making a simple mission involving a crashed cargo truck having players pick up the scattered boxes and dumping them into the water. So far this works, however I cannot get it to check the speed at which that unit is going. I want it to drop the cargo if he is running, jogging, and stays so long as hes walking. I know that load in and carry commands exist in domination, with the same features built in. So there must be a way. Here is what I have so far on my script, its not MP-Worked yet, but i am working on that. I am using this in tandem with the generic actions script that converts the arguments into code. PickupObjects.sqf private ["_unit", "_objects", "_actionid"]; _objects = _this select 0; _actionid = _this select 2; _unit = _this select 1; _unit setvariable ["carrying", 0]; // attach the object _objects attachTo [_unit,[0,2,0.3]]; _unit setvariable [_unit getVariable "carrying", 1]; _unit setvariable ["object", _objects]; // remove pickup action _objects removeaction _actionid; // add drop action _unit addAction ["Drop Cargo","gen_action.sqf", "detach ((_this select 0) getvariable 'object'); (_this select 0) setvariable [((_this select 0) getVariable 'carrying'), 0]; (_this select 0) removeaction (_this select 2)"]; waitUntil { (_unit getvariable "carrying") == 0 }; _unit setvariable [_unit getvariable "object", nil]; // add original action again _objects addaction ["Pick up Cargo", "PickupObjects.sqf"]; -
yes, some of these missions may work properly in coop, the missions that may not work are the 5th mission, and possibly the 7th mission. You can just unpack the missions, and move them into your missions folder and see if it works. But let me know if some of them work ^^
-
I am a Spec Op... Therefore the Mighty Shilka is no match for me and my friend.
igneous01 replied to Chief_Wiggum's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
why dont you just add a trigger that sets the leader setcombatmode "blue"; that way he will never fire, no matter what. You could make this toggleable with a radio command (but u need to be the leader of the group then) or just script it so that if leader knowsabout (iskindof "Tank") then set the behaviour -
Campaign updated - didnt have much time to do alot but i did add one new mission. Just copy this campaign over the older one and it will retain your campaign saves. Removed USNavy and SM dependencies first post updated
-
hmm... interesting indeed. I have never had that happen yet, the action is added to the player so long as hes inside that little area where the flag is, so it should pop up as long as your sitting on that sandy tarmac and not too far away from it. (5m radius from the shooting position)
-
Dynamically spawned mission - how to check for local variables
igneous01 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok, so ive hit a bump here in my mission. I have managed to successfully script a simple sidemission that activates when you talk to an NPC, everything spawns and the tasks show up. However, I want to keep all my variables local, because i will have many more of these sidemissions come up from other NPC's. So the problem I am having now is this: How do I check for tasks to complete (in a cpu friendly way) so far i tried by creating triggers inside the script and checking inside them - no go since they dont recognize local variables I also tried to use an FSM to check for the tasks, same thing I did try using a while loop, however it wont work either: while {!_finishmission} do { if (!alive _exStash1 && !alive _exStash2 && !alive _exStash3) then { _obj1 settaskstate "SUCCEEDED"; }; if (!alive HVT) then { _obj2 settaskstate "SUCCEEDED"; }; if ((taskstate _obj1) == "SUCCEEDED" && (taskstate _obj2) == "SUCCEEDED") then { _finishmission = true; }; }; the problem here being that it will continously loop and reset the tasks to succeeded after they are completed - its redundant and waste's cpu resources. I dont want to get cryptic with this, so surely i must have forgot a simple method to check for these obj's once? I want the script to continue as I am deleting all the units, triggers, markers and variables at the end of the script (when the player gets out of range of the area) so what can I do? any suggestions please? thanks -
Dynamically spawned mission - how to check for local variables
igneous01 replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks again Demonized, thats something i missed, works perfectly now and without issues. -
How to find classnames for addons?
igneous01 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I want to ask this because there is no thread about it, and i kind of need it now. I am right now working on a mission using KuiK's winter skins, and i want to dynamically spawn some groups using bis_fnc_spawn and createunit with these units. Problem is, i dont know their classnames, i unpbo'd the addon, to see if i could find a script file that would show me their names, sadly, i havnt found anything. I believe it is in the config.bin file, except i cant open the dam thing :S does anyone know what i have to do to access the file to see the classnames for the units? -
How to find classnames for addons?
igneous01 replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
O how i wish addon makers would document this stuff :( ill see if theres a way to open up the config file for the groups -
How to find classnames for addons?
igneous01 replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
alright this works perfectly, but is there a way to get the group classname? the reskins have the groups premade, so it would be easier for me to spawn an mgteam thats snow camo with bis_fnc_Spawngroup can i do typeof group? ill see what the biki has to say -
UPSMON - Urban Patrol Script Mon
igneous01 replied to Monsada's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
UPSMON does not work on thirsk :S USPS does work, but upsmon does not (i thought it was a pathing problem on the island itself) i have not tested on other islands yet, but i might suspect the result is the same. -
How to find classnames for addons?
igneous01 replied to igneous01's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
thank you demonized! didnt think of that -
is there a possiblity you could give us a classnames list for the units? i want to dynamically spawn them and i dont know how to find the classnames inside the pbo?
-
error in scripts causes crash to desktop?
igneous01 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
so ive noticed that when returning to one of my missions to work on, any sort of scripting errors that i would have (missing ; or brackets, etc) would cause the game to crash to desktop. Im not sure if its because of a new patch (if an update came out for oa) or an update on ace but now any syntax errors just cause me to CTD. never used to happen before, and -showscripterrors always worked fine a week ago. latest mod i installed was SLX mod, but after too many crashes with the mod itself i removed it from my target line. so the only mods im running are all the ace mods and expansions, and cba anyone got any ideas as to why this might be happening? -
how to make an american radio message
igneous01 replied to k i n g's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hmm, the chances of scripters or mission makers being in the military is probably 1% which in some cases might explain why some missions created are very unrealistic (not all ofcourse, but some out there are very untrue to the real) -
Defining an undefined variable in an if-clause
igneous01 replied to roguetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
^ the work around to seeing variables outside their scope would be to setvariable and getvariable, as this variable can be modified through any scope, as its attached to an object -
How to make ingame screenshot in Arma 2 and OA?
igneous01 replied to bboy's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
wth? ive been able to printscreen full game ever since arma 1.05 maybe u guys are running windows 7 or vista and thats why -
Conversation System // Add Topic Question
igneous01 replied to Coffeecat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
i admit it looks confusing at first, but if you open up an example fsm then it actually looks quite simple. just think of it as a bunch of triggers with activations - they dont all run at the same time, but the ones connected to a state do -
Conversation System // Add Topic Question
igneous01 replied to Coffeecat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
no you dont need another sqf file for a new conversation. And if i understood correctly, you want to add a new topic to a new ai character? then just add a new topic to your new character ai NewGuy kbAddTopic ["NewTopic", "kb\briefing.bikb", "", {call compile preprocessFileLineNumbers "kb\conversation_svoboda_pavel.sqf"}]; you can pretty much keep all of the conversation strings inside the one bikb file, but if you have alot of different topic and conversations going on, it might be best to divide them up by character. if you want to have the ai respond to choices, your going to need to use an fsm for that. other wise you can do something like: waituntil {kbWasSaid} i forgot the format of kb, and im not 100 familiar with the conversation commands myself, but basically you can just do kbtell, then waituntil kbwassaid, then add the new kbtell - and keep doing this until the conversation ends. ill see if i can find an example of this in one of my missions -
Objectives Question
igneous01 replied to todayskiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
hmm, im not sure what the problem might be here. the way i have always run it is execVM the briefing sqf inside the init. and in briefing i created all the diaries + obj1 = player createsimpletask ["blah"]; obj1 setsimpletaskdescription ["blah", "blah", ""]; obj1 settaskstate "CREATED": perhaps its the way your creating the task? are you using player createsimpletask (if its coop this might cause problems, if theres no player unit inside the editor, then it wont run for anyone, since there all playable type) have you tried giving your guy a name? like pilot1, and using obj1 = pilot1 createsimpletask? -
Objectives Question
igneous01 replied to todayskiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ah your missing one thing: obj_1 settaskstate "Created" this lets the game know the task was created, and it should show up (however there have been times when an objective shows up even tho this line was not used) that should do it for ya