Jump to content

Gekkibi

Member
  • Content Count

    372
  • Joined

  • Last visited

  • Medals

Everything posted by Gekkibi

  1. Here you can find everything you need: http://community.bistudio.com/wiki/Ambient_Combat_Manager_-_Functions ...Even how you can configure the module to spawn enemy units to certain areas only... (Hint: inverse of union of markers).
  2. BUMP. New version available (Read the 1st post). Now it is much neater code, and shouldn't stress the server so much if used in MP (Haven't tested that yet, 'tho).
  3. I have come to this conclusion as well. It sure isn't the direction of player, and seems that it isn't the direction of the AI unit. It seems it is the direction the formation is moving (And the direction of the formation isn't exact when you move small distances. Test for yourself: Order your group to follow you and circle and / or move back & forward abit). PS. Why can't we have a direction clock like back in the OFP. It helped alot... Now the contact reports are kind of useless!
  4. There is a way. It is called attachTo. http://forums.bistudio.com/showthread.php?t=73630 http://forums.bistudio.com/showthread.php?t=73483
  5. Yes. ...After I learn SQF! :D
  6. Updated my old OFP-script. It allows objects (units, vehicles or static objects) to triangulate one single specified target. Good for finding hidden enemy camps, hidden weapon caches etc where it is not wise to give specific coordinates to the player(s), but just a general direction. Haven't tested in MP. The script is two-fold: Triangulation.sqs allows objects to triangulate their target. Triangulation_marker.sqs places marker pointing the average position of the target. Both are WIP, but they works. Not sure if anyone would want to use it, but at least test it and give me feedback. Here are the scripts: triangulation.sqs: triangulation_marker.sqs:
  7. Maybe this will get you to the right direction: http://community.bistudio.com/wiki/sideChat
  8. I want to have babies with you!! *hug* EDIT: For some reason getMarkerDir isn't working. I copypasta part of my code (_object == unit1, _target is object, _error is number): _triangulation_line = str(_object) + "_triangulation_line"; (And then I createMarker, setMarkerPos etc by using variable _triangulation_line (Which is local, but the name of the marker is global)) _triangulation_line setMarkerDir ((getPos _target select 0) - (getPos _object select 0)) atan2 ((getPos _target select 1) - (getPos _object select 1)) + ((_object distance _target) / _range) * _error; call compile format ["%1_triangulation_direction = getMarkerDir _triangulation_line;", _object]; hint format ["%1", unit1_triangulation_direction]; It says any. However, if I don't use getMarkerDir I will get the angle (I copypasted setMarkerDir equation instead of getMarkerDir). call compile format ["%1_triangulation_direction = ((getPos _target select 0) - (getPos _object select 0)) atan2 ((getPos _target select 1) - (getPos _object select 1)) + ((_object distance _target) / _range) * _error;", _object]; hint format ["%1", unit1_triangulation_direction]; EDIT 2: Found out that there isn't command "getMarkerDir" in ArmA 2. It is "markerDir". :)
  9. I am making a script that simulates triangulation by drawing a line from one object to the direction of another object. The angle of the line isn't exact, and has some randomized margin of error. I want that another script calculates the position where two different triangulation lines crosses. The problem is that all objects that triangulates runs its own script, so I'll have to name variables by the unit (If I put global variable "unit1_triangulation_direction = getMarkerDir _triangulation_line", other executed scripts will naturally overwrite this variable). So what I want is that I can create a variable what is named "unit1_triangulation_direction" (Where unit1 is the name of the unit, _this select 0), but don't know how (Tried just about any combination of _unit, str(_unit), "_unit" with + _triangulation_direction, _"triangulation_direction", etc). Any ideas, because I sure don't have...
  10. Use commands clearMagazineCargo, clearWeaponCargo, addMagazineCargo and addWeaponCargo
  11. Fuel truck: Name: truck Vehicle lock: Locked 1st trigger: BLUFOR present condition: this on activation: incoming = true Synchronize this trigger to the enemys waypoint. 2nd trigger: timeout: Put your random time here condition: incoming on activation: truck lock false Hopefully this was what you were after.
  12. It is not just about that. It is also if two unit posesses exactly the samy Y-coordinates (Azimut is 0 or 180 degrees) and was placed to line formation in editor (Or 90 and 270 degrees and in staggered column' date=' or just about anything else what causes them to be in the same y-coordinates). PS. What is the correct forum to put finished scripts (No, this is far from finished. But I have couple of other WIP-scripts what I plan to publish when they are finished)? EDIT: Found a problem I can't solve. Hopefully someone can point me into the right direction. I am trying to put all variables into specific arrays, so I don't have to run multiple scripts for every unit. Here is the code with comments: What am I doing wrong? And should I really start learning SQF-scripting? :)
  13. ...Now I wonder why on earth I started to use atan in the first place... Must been too tired to think about that (After all, this isn't the first time I am coding... And atan2 was created for coding purposes...). However, I don't get any kind of error message when using atan (Read: Dividing by zero). I made a small script that does the following equations: 1) (a - b) / (c - d) 2) atan (a - b) / (c - d) 3) (a - b) atan2 (c - d) Here it is (Under the spoiler): When a and b are any numbers and c = d, then solutions are: 1) 0 2) 0 3) 90 Okay, so atan2 fixed the problem, not going to argue with that (Thanks, by the way for the hint). However, I am confused, because I don't get any kind of error, even I divide by zero (As I do in this equation script... Two times). It seems ArmA 2 decides that division of zero is zero... I give a virtual hug if someone can explain this to me. :)
  14. It is because unit and its leader posesses the same y-coordinates. Cyclometric function of tangent is opposing cathetus divided by adjacent cathetus. Because the length of adjacent cathetus is zero (Anything subtracted by itself is always zero) script tries to divide using zero. Quick solving: Don't use 0 degree azimut with formation line in initialization. :) Slow solving: I fix it next time I improve the script. The problem is that if I use other trigonometric functions I will get another "features". The problem is that the cycle of sin and cos is pi/2 radians, and full circle is 2 pi radians. So I'll have to make a little more than just fix the mathematic equation. I thank you for this bug report. Didn't found it when I bug-tested the script.
  15. Gekkibi

    Crash during Razor two mission

    My game only freezes. I can still hear ambient sounds, but no input will do anything, and the view stays static.
  16. I try to simulate company sized chain of command by using HC-module. The point is that company commander can give orders only to platoon leaders (Working), platoon leaders can give orders only to squad leaders (working) and squad leaders can give orders only to fire teams (Working). The problem is that I want to have one extra feature: All leaders can group & ungroup their subordinates (Squad leaders can lead the whole squad, or split it into fire teams. Same goes to platoon leaders concerning squads). I can group all into one group fine, but when I ungroup one fire team from a squad, they will lose their ability to be in high command (In other words: Probably they lose their synchronization to the module). If I ungroup all fire teams at once, they will form one big team (Technically, squad leader is the only one who ungroups). I have tried to use command synchronizeObjectsAdd, but for some reason it just won't work! Any ideas? Here is the mission.
  17. Thank you for that. I found that script before I posted, but thought it would do something else (Placing all and every units from your side to your group). Checked it, and it's working. However, not like I would want it. Now the leader have to select those members he wants to split. And that means it is kind of slow to use. I was thinking about creating one action (To action menu, so it is quickly selectable by using wheel & middle mouse button) that automatically splits the squad to fire teams (Members 1-4 goes to fire team 1, members 5-8 goes to fire team 2 etc). Oh, well... I guess I'll have to use this peace of script (Don't get me wrong, this script rocks, even if it rocks little bit another way I would like it to rock. ;) )
  18. How about an addon that changes kobra dot color from green to red..? :) Every time I aim using AK's with kobra in arma 2 I wonder why they decided green...
  19. Gekkibi

    Crash during Razor two mission

    Happens to me around 12:05 PM... Collected all three static evidences and haven't seen the target anywhere. After that what ever I do, the game crashes after couple of minutes. This is my fourth revert of that mission, so sooner than later I am going to put arma 2 back to the shelf... (I have seen the target once, and botched that attempt. Other three reverts ends in a crash).
  20. Hope this is the right thread for this kind of request... I need a very small desert island: Aprox 800x800 meters and water in one side of the map (Others are land). No trees, no houses, no roads. Nothing. And completely flat. Why? Because I am making a small CQB co-op mission, and when I use crowe_desertisland some building disappear when you look it at right (Or technically wrong...) angle. I think it has something to do with huge island combined with flatness. Please inform me if this is in the wrong place.
×