charonos
Member-
Content Count
207 -
Joined
-
Last visited
-
Medals
Everything posted by charonos
-
It goes: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> NAMEOFYOURGROUP = group player or NAMEOFYOURGROUP = group unit1 You have to state a member of the group after the group command Group command
-
Trigger to dedect civvies
charonos replied to RogueRunner's topic in ARMA - MISSION EDITING & SCRIPTING
There is no trigger option or editor accessible function like that. So if you have never written a script, there is unfortunately no way, you can achieve exactly what you want. You would actually have to write a script that counts all civilians and calculates the percentage of dead civilians from the total number of civilians: So let's say your trigger feeds a list array named "townarray" then it can be like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _totalcivs={side _x==civilian} count townarray _deadcivs={(not alive _x) and (side _x==civilian)} count townarray _percentage=(_deadcivs/_totalcivs)*100 The list array is stated in the condition field of the trigger like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> townarray=thisList See if that gets you further. EDIT: Dead soldier of the west,east side in the trigger might distort the total number, because they are for some reason made civilians after they die. But if no soldiers die in your case, then you are fine. -
What i usually do for exact object placement is, ALT + TAB out of the game, open the mission.sqm of the mission. Do a search (CTRL+F) for player (or the object with the desired position) until you find <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Item0 { position[]={14082.471680,33.242897,10018.473633}; id=121; side="WEST"; vehicle="SquadLeaderW"; player="PLAYER COMMANDER"; leader=1; rank="SERGEANT"; skill=0.466667; text=""; init=""; }; Then i copy the position out and paste it into a script. You have to swap the y and z coordinates though, since BIS for internal reasons use different axes than the Direct3D standard. That means that for example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> 14082.471680,33.242897,10018.473633 becomes: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _pos=[14082.471680,10018.473633,33.242897] So now you can either use setposASL the object with that position or for setpos you leave out the height: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _pos=[14082.471680,10018.473633] You can of course,like Hoz described, write down the position, that the hint gives you, but i am usually too lazy to write down all the digits onto a piece of paper Hope that helps you achieve what you are looking for. Charon
-
That's a tricky one since object ID has been removed there is the workaround with nearestposition to at least get a pointer to the map objects, but for the actual ID i have no clue. I wonder anyway why BIS removed the object ID option, since you still can change objects in the map, it's just slightly more complicated, so it can't be to prevent cheating or some similar motivation. Have you tried out SenseleSS Violence's tip?
-
is selectionposition bugged
charonos replied to Giova_BLH's topic in ARMA - MISSION EDITING & SCRIPTING
The fact that this relates to model space coordinates and not to world coordinates, might clear this up. Usually in Direct3d engines vertex positions im model space are defined relative to the centre. So a prone unit still has the same relative distance of the head to the center (as in your example), therefore the command will return the same values. -
strings/format in forEach constructs not working?
charonos replied to charonos's topic in ARMA - MISSION EDITING & SCRIPTING
@SenseleSS Violence Thanks, it was my fault i checked that from the init.sqf which was lame. Calling an individual script resulting in the function working now as intended. I always have used this in a very complicated foreach construct before, so probably the complexity of the construct resulted in error messages that i have misinterpreted and falsely case-checked in the init.sqf. Shame on me. Thread can be closed. -
strings/format in forEach constructs not working?
charonos posted a topic in ARMA - MISSION EDITING & SCRIPTING
Since i started scripting for ArmA i have been wondering why i can't use format or strings related to _x in a foreach construct. For example: _array=[1,2,3,4,5]; { player sidechat format ["element: %1",_x] } foreach _array; It must be an issue with the brackets and the code status of the contents. I have tried double hyphens, but no result. Has anyone found a way to get that working? -
If you really want that and can edit configs then just make an addon and define the sniper class like: class SoldierWSniper ; class YOURSNIPER : SoldierWSniper { attendant = true; }; That will make him a sniper/medic.
-
I'm sure Kegetys is way too busy for that. Have you tried to convert the scripts yourself? You might wanna start with defining a dummy AGS in an additional config, the scripts should be easy to convert. An excerpt: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> agsScript_dummyobj = "KEGdummy" createVehicle [-10000,-10000,10000] agsScript_dummyobj addAction["Load AGS-17 in vehicle","\KEGags\load.sqs"] Before releasing it ask him for approval of course.
-
it's <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this addeventhandler [""hit"", {_this setdammage 0}] Arma Eventhandlers
-
These forums have helped me alot over the years, so i can share this: If you want to write a future addon-compatible script, then the easiest way is to use the new ArmA config commands. For example: You a writing a detection script for a tank commander, that has to determine whether the spotted enemies are equipped with anti-tank weapons. As long as there are only the standard weapons in the mission you are fine, but if people add more and more different launchers to the game, you can't anticipate their names and put them into a check-array. So it is recommendable to check the enemies weaponry for any kind of weapons that inherit the launcher class in their config. The following sqf checks if a unit called _enemy has a launcher. Instead of the hints you can of course use the appropriate actions that the tank commander would take once he detects a launcher-equipped soldier (engage,register,escape...) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _weaparr= weapons _enemy; _weapclassarr=[]; _i=0; {_weapclass= inheritsFrom (configFile >> "CfgWeapons" >> _weaparr select _i);_weapclassarr set [_i,_weapclass];_i=_i+1;} foreach _weaparr; _launcher=""; for [{_j=0}, {_j<count _weapclassarr}, {_j=_j+1}] do { if (format ["%1",_weapclassarr select _j]=="BIN\CONFIG.BIN/CFGWEAPONS/LAUNCHER") then { _launcher=_weaparr select _j }; }; if (format ["%1",_launcher]!="") then { hint format ["Enemy has a launcher of the type: %1",_launcher] } else { hint "Enemy has no launcher" }; This is just an example of the numerous occasions where a config check is the way to go. Hope that helped. Charon
-
How to make a bridge invincible
charonos replied to xg0ffx's topic in ARMA - MISSION EDITING & SCRIPTING
@nephilim objectID is not working anymore in Arma for uncertain reasons. It would be easier with that (like in OFP), no doubt. read the wiki: http://community.bistudio.com/wiki/object -
@Jahve : Read the whole thread
-
How to make a bridge invincible
charonos replied to xg0ffx's topic in ARMA - MISSION EDITING & SCRIPTING
Hmm, well i'm not sure if you have thought about this, but putting that in the init line will only "repair" your bridge at the beginning of your mission. What you want is to have a loop running that sets the dammage of the bridge to zero constantly. The issue with this is though, that if the bridge gets "1-Hit-Destroyed" by a strong bomb or multiple charges then the loop might not prevent the bridge from actually being destroyed. That you need to test for yourself. In case you don't know how to loop that: SQS: #loop (position Bridge1_1 nearestObject 161744) setDammage 0 ~0.001 goto "loop" SQF: for [{_loop=0}, {_loop<1}, {_loop=_loop}] do { (position Bridge1_1 nearestObject 161744) setDammage 0; sleep 0.001; }; -
I can also confirm that issue, i ran into it while trying to find the absolute height of a camera because there is no camsetposASL command. But always when the camera is above an object the camera would bounce up by the height of that object. I will try it with modelToWorld, seems promising. Good workaround idea there deanosbeano! Edit: modelToWorld isn't needed for the specific problem that i had, i just forgot to actually setpos the object that measures the absolute ground height after createvehicle-ing it,setpos compensated for the height differences that i had before. Still the modelToWorld-workaround will find its applications.
-
Hi, i have written a little tool to debug my missions, as there is always some units just lying around or are in the wrong place and i wanted to share that early version with the community as there is currently/yet no similar tool available. It is very easy to use, a simple object addon placed in your map adds the player-action to run the tool. The UI is kinda like Xcam, but more combat-data-related. Things like : Who is the checkunit targetting? Who is he firing at? And in turn, who is targetting/firing upon him? are always visible as well as a troop count display that shows the number of alive/dead units of all sides. The most useful function is the ability to switch the view to the enemy unit that is targetting the checkunit and back More features are dynamic group creation functions which can be given a basic waypoint. There is 4 camera views. One is like the 3rd person view from behind the unit, the second one allows a freely adjustable camera position. The 3rd one is a view through the ironsight of the units weapon (also for vehicles) and the 4th is a normal POV of the checkunit. Also camera positions can be saved/loaded. Generally the tool is working nicely so far, a few little bugs still remain and some of the waypoint creation stuff needs to be improved and it can really help mission makers to optimize their unit placement and combat settings. Feel free to let me know what you would like to see improved/considered for an update. I hope you have fun with it and can use it for your missions! Charon Download links: Armaholic mirror : TroopMon V0.7 beta freedatahost: TroopMon V0.7 beta
-
TroopMon V 0.7 Mission debugger
charonos replied to charonos's topic in ARMA - ADDONS & MODS: DISCUSSION
Here another video demonstrating the new viewport unit selection and camera mouse control features: -
If there is something on the road that has a valid geometry LOD, the vehicles will try to go around it. Not sure if a roadway LOD will change that (cause it's not adhered to the road like a bridge),it needs to be tested. Especially since the ArmA vehicle AI is worse than in OFP in regards to vehicles staying on the road. They sometimes leave the roads for no obvious reason.
-
Let's talk about feasability. I'm sure BIS did not make a world-map, because they always stated that ArmA is primarily an infantry combat simulation. So transport times from one continent to the other would annoy most players, i mean who wants to watch himself getting transported in a ship for two weeks in front of his screen if he just wants action. Only for planes this would make sense (as in FS2004), which is not the focus of ArmA. Simplified real-world locations with so-called POIs (Points of Interest) as individual maps as mentioned before in this thread will probably be done by some island creators and i encourage that, could be exciting.
-
@Col. Faulkner: The Daisy Cutter would be more realistic. The cloud looks very similar, only smaller ofc. And there has to be less objects to be destroyed due to the smaller yield than a nuke. I have ported my old scipts to ArmA and the result is not very promising. The lag is considerable and this only with an area of 400 m * 400 m, even though i have used delayed fuzes. Here is a video showing what i mean: Maybe if BIS fixes ObjectID then the objects could be destroyed directly.
-
TroopMon V 0.7 Mission debugger
charonos replied to charonos's topic in ARMA - ADDONS & MODS: DISCUSSION
Here is a demonstration video on youTube that shows the new waypoint functionality of TroopMon V0.8. This update will be released in 1 or 2 days. -
I have spent hundreds of hours on testing all kinds of destruction when i was working on that in OFP, the problem is always, that if you want to be REALISTIC you would create so much lag that the game would freeze even in ArmA. Consider how many objects, that get loaded upon mission start for many seconds, would have to be 1. selected by an algorithm that decides whether they are to be destroyed or not 2. modified (and as Gaia correctly put it, it won't work on island objects, BIS prevented that since 1.90 i think) or damaged. A nuke is just too massive to convincingly create that destruction on the map, people will have to be willing to make compromises. I will give it a try, and convert my old OFP destruction scripts to ArmA and see what i can come up with though.
-
Gaia and Xenom did a really good job on that, i wish i had available the drop command when i made the first OFP nuke . You can see several smaller bombs exploding in the center in this picture: At that time i achieved the destruction with delayed bomb addons of high damage values to counter the lag, they moved with the dustcloud and created considerable damage to houses and trees. Maybe try that to have a little bit of destruction at least in the center area of the explosion? This is an example of the devastation: I am looking forward to Gaia's final release with the full ArmA potential.
-
Sounds like a very plausible cause, still i have seen enemies stand around 5-10 meters away from each other and not fire their guns, i assume the minimum range for an M16/Ak47 will probably be something like 1 meter, but who knows.