-
Content Count
662 -
Joined
-
Last visited
-
Medals
Everything posted by loyalguard
-
Few questions (Addaction, Anims and others)
loyalguard replied to Sasuke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
For problem A, try addSwitchableUnit and see if that works. If have not used it so I cannot confirm. For problem B, there are locality issues. A script executed using the addAction command will only run on the client where it was executed so only the player using the action will hear the conversation. There are two possible solutions: The first is the easiest but I am unsure it will work. Use say instead of playSound. if that does not work, you will have to do something similar to discussed in fatty86's post in this thread: Some problems with removing the addactions for everyone Again, scripts executed by addAction are local, so if you monitor a public variable on the server and when it meets the condition you are looking for, it can execute the conversation script and ensure the it is heard. You should also use the say command here as well to make sure the conversation is only heard at Sidiki's location. for problem C, if I understand correctly, you want to simulate knocking out the units and then teleport them to the kidnapping area. If you don't want the players to see what is going on, you could use cutRSC or similar commands to black out the screen so the players cannot see what is going on after the explosion and while they are teleported and then undo it when you are ready for the kidnapping scene. We did something similar in ACE1 when players died so they could not see what was going on around them when the respawn menu appeared. If that is not the effect you are looking for chime on. Good luck! -
Need help with script
loyalguard replied to tini's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Just to make sure I understand what you want, you do not want the vehicle to be able to respawn until it drives inside the trigger area. Is that correct? What respawn script are you using? Does it require that it writes something into the init line line of the vehicle or does it just need to know which vehicle it is? There is a way to use a script to add code to a vehicle's init line after game start using setVehicleInit and processInitCommands, but there are locality issues involved if your mission is multiplayer. -
DisableAI enumeration?
loyalguard replied to 123justin321's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
One method could be to place the name of all of the actors into an array and then use the forEach command to loop through each actor to execute each disableAI command: _hqActors = [actor1, actor2]; {_x disableAI "ANIM"; _x disableAI "MOVE"; _x disableAI "FSM"; _x disableAI "AUTOTARGET"; _x disableAI "TARGET"} forEach _hqActors; There are also examples to use "units group" if all of the units are in the same group instead of placing the names into a separate array. -
As you said depending on the damage model, you should be able to use getDammage to script a detonation.
-
You may want to check out this thread from 2010/2011 that also dealt with determining a unit's stance: http://forums.bistudio.com/showthread.php?112513-Polling-a-unit-s-stance
-
AEG - ArmA Electrical Grids (Script Pack and Addon)
loyalguard replied to loyalguard's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
KK, I am sorry for the delayed response (that applies to everyone else posting a question in this thread). I am not currently developing for ArmA or OA (maybe again one day) so I infrequently log in to the forum. But in order to maintain support for AEG, I will monitor and try to assist when I can. Each transformer pole included in the simulation has a global variable that stores the current state of the power "flowing" through it. If a pole is destroyed or switched off (it does not matter which) the variable will go from true to false. If you check the state of the variable in your triggers condition, you can trigger it when it becomes false. For example, in Zargabad there is a transformer pole at the villa. To check if the power if off (either by destruction or switched) put the following in the condition line of your trigger: !AEG_on_D_Zarg_V You can include multiple variables to check (one for each pole) in the condition line if you only want the trigger to activate when several are destroyed/swtiched offf. To determine which variables to monitor, run the AEG Zargabad Demo Mission and open the briefing. Inside it contains a map that shows all of the transformer poles support by the simulation and tells you the names of the global variables to check like this: I hope that helps. ---------- Post added at 04:47 ---------- Previous post was at 04:43 ---------- Styxx42, I am not currently doing any development work on AEG or anything else ArmA or OA related right now so unfortunately no. I did do some intial evaluation on IceBreaker's awesome islands but never got to anything substantive before I stopped developing. If I am able to get reinvolved with ArmA I would definitely consider working with Ice to bring AEG to his islands. -
DevCon - the developer console
loyalguard replied to .kju's topic in ARMA 2 & OA : Community Made Utilities
Yes. I have been using it extensively. I planned on doing some documentation but have not had the time. I have been going in an out of debug cam mode, teleporting, capturing cursor target info, watching variables, executing code. Maybe I can do some docu this weekend. -
AEG - ArmA Electrical Grids (Script Pack and Addon)
loyalguard replied to loyalguard's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
Thanks Shezan! Work is 80% complete. I just have to test create the briefing and mission maker guidance. -
Particles for Fire and Smoke
loyalguard replied to jedra's topic in TAKE ON HELICOPTERS : MISSIONS - Editing & Scripting
I think this is the new path: \HSim\Data_H\data\ParticleEffects\Universal\Universal -
Particles for Fire and Smoke
loyalguard replied to jedra's topic in TAKE ON HELICOPTERS : MISSIONS - Editing & Scripting
The BIS_Effects_Burn function is still present and the universal particle seems to be there as well. How exactly are you trying to create a fire? -
call BIS_fnc_spawnGroup not engaging
loyalguard replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I poked around in the function file. Nothing obvious jumps out. Just out of curiosity, do you use the optional skill parameter? The function takes it if you did and then uses setUnitAbility to set the unit's skill. If the skill is 0 the unit won't really do anything except lay down. That is the only thing I can think of but I don't see a direct correlation. -
call BIS_fnc_spawnGroup not engaging
loyalguard replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Seems to be a common problem. See this thread: http://forums.bistudio.com/showthread.php?t=123093 I may dig around in the function file later and see if I can figure out the problem. -
Prevent the Ambient Civilian Module from spawning civilians
loyalguard replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think the primary problem will be that the house effects are contingent upon someone being in the "door" (invisible object created at a civ's house). So,if there are not civs, there will probably be no effects. -
This is untested, but if you have not done so already, try this: 1. Find the SHK_Taskmaster_updateTask function in the .sqf file. 2. Look for the following line in that function: _handle settaskstate _state; 3. Paste the code below directly beneath the line above: if (_state in ["created","assigned"]) then { _x setCurrentTask _handle; }; The code above is exactly the same as Shuko used when adding new tasks. There is even a blank line in the function between where the state is set and where the function continues (this is where I recommend pasting the code above) so I wonder if it was in there but was removed. In fact if you look at the change log, there was a conflict between v.29 and v.31 with JIP and setting the current task so it could be that my fix breaks JIP current tasks. Try it and see if that works. If you already have and it does not work then I am afraid I don't see an easy fix.
- 187 replies
-
- briefing
- taskmaster
-
(and 1 more)
Tagged with:
-
How do you know what code line you are looking at within the script code.
loyalguard replied to avibird 1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Most advanced text editors such as Notepad++ and several IDEs like ArmAScript, SQF Editor, etc. will show you lines numbers as well. -
From looking at he GITA module code there does not appear to be a limit on the size of the town or the number of buildings...however, I am pretty sure a 120,000m radius would cause some lag! :D
-
I am not intimately familiar with Shuko's great script, however I did take a quick look through it to see if anything seemed wrong. As far as I can tell there is only one instance of setCurrentTask in the entire script located in the function that adds new tasks (SHK_Taskmaster_addTask). SHK_Taskmaster_addTask does not appear to be called or spawned through the chain initiated by calling SHK_Taskmaster_upd with the optional 3rd parameter as a string -- it is only called or spawned when the third parameter is an array (which adds a new tasks after updating. There are a lot of function calls in this script, so, it is possible I missed it somewhere, but without setCurrentTask somewhere in the chain, the task will not be made current. I hope this helps.
- 187 replies
-
- briefing
- taskmaster
-
(and 1 more)
Tagged with:
-
Various questions on scripting and the engine...
loyalguard replied to ryfle's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There is a lot to digest in your post and I am not the one to answer all of it, but here is an untested soultion to "1) No 'continue' keyword?" // Loop through all of the elements in the local array _myArray. for "_i" from 0 to count _myArray do { // If the value of element at the current index in the loop is < 10 (i.e. opposite of >=10) then execute the code in the block otherwise skip and go to next iteration. if (_myArray select _i < 10) then { // Get the value of the element at the current index and increment by 1. _new = _myArray select _i + 1; // Set the new value of the element to the current index. _myArray set [_i, _new]; }; // Go to next iteration. }; For you PS, here is where you can find macros and such: http://community.bistudio.com/wiki/PreProcessor_Commands -
pilots addaction question
loyalguard replied to Bulldog Six's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Bon has done an excellent job of the summarizing the MP/locality issues. Even though our projects are different in scope, I encountered these same issues with switching off street lamps in my electrical grid simulation scripts, which are also local-effects only. They way I handled locality and all the MP aspects is exactly this: I am happy to go into detail with you to explain how I did it in a way that could be applied to your project. -
JIP code execution (6thSense.eu)
loyalguard replied to Gameadd1cted's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
SickBoy's example code in that article is excellent and still relevant but it is a little dated in that we have a few new commands that can help us determine multiplayer, server type, and JIP. The new command are: isMultiplayer isDedicated We can uae these commands to simplify the JIP test: if (isMultiplayer) then { if ((!isDedicated) and (isNull player)) then { hint " I am JIP!"; } else { hint "No JIP here!"; }; -
JIP sample / example
loyalguard replied to Gameadd1cted's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It's a little hard to put together a sample mission because it totally depends on what you want to be updated at JIP. Do you want to synchronize tasks, update markers, etc? -
Problem with "getvariable" - alternative syntax causing RPT error
loyalguard replied to Rydygier's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Good catch. I might update the Biki article to reflect that. -
Problem with "getvariable" - alternative syntax causing RPT error
loyalguard replied to Rydygier's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The alternate syntax was added to the Biki in Novembrr 2010 which predated 1.10 so that would imply it was viable before then. I have never seen the alternate syntax, have you had luck with it before? -
Dedicated Server triggers. All about them and potential pitfalls
loyalguard replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think the problem is that _tnul3 is local to the setTriggerStatements block and is not accessible in the main scope of the script. Try making it a global variable instead. -
Dedicated Server triggers. All about them and potential pitfalls
loyalguard replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
deleteVehicle should definitely work. Are you sure you are running it on the server?