-
Content Count
37 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Archosaurus
-
Rank
Private First Class
-
RHS Escalation (AFRF and USAF)
Archosaurus replied to soul_assassin's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hello. I posted a bug report of a serious bug. T-72 ATGM causes crash when firing at some things. Take a look. Thanks. http://feedback.rhsmods.org/view.php?id=2563- 16577 replies
-
- Weapons
- Accessories
-
(and 1 more)
Tagged with:
-
Archosaurus started following Find leader of group and addWaypoint onto group leader?, RHS Escalation (AFRF and USAF), Continuous check of if condition instead of continuous loop and and 4 others
-
multiple statements after do
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've been asking, but how exactly do I get the interface to input the code into so it can be formatted properly? -
Continuous check of if condition instead of continuous loop
Archosaurus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. Yet again, help is needed. I have a script that has an "if, then" segment of code in it that I want to ONLY loop if the condition changes. So, for example. _cond = true; if {_cond} then { _unit doMove pos; }; Then let's say I have a trigger or whatever that sets _cond to false, so if !{_cond} then { doStop _unit; }; Then another trigger that changes _cond to true. So with all logic, the former's statements should be called, again, if the whole thing is looped. That's all good and the unit moves and stops accordingly. Now, the problem here is that I need the script to not loop through the "doMove" or "doStop" more than once as long as the condition does not change, but I need it to constantly check if the condition changes. Make any sense? The reason I need to do this is because it's obviously problematic to call some statements over and over again when they only need to be called once. With my current knowledge, I can only do a loop that loops the statements continuously, or only a single call of the statements and then no more. What I want is continuous checking, then looping the statements again, but then no more looping until the condition changes. EDIT: Perhaps waitUntil or exitWith can solve this? Although I failed to find a way to make the script "triggerable" again. -
As I was typing this thread and triple checking that what I tried actually doesn't work, I came across the solution. Hah. To make multiple statements happen after "do", you input it like this: _cond = true; //Can be anything but I use this to loop while {_cond} do { [hint "guy has stopped"] , [doStop guy] }; Statements must NOT be enclosed in {} nor should they be un-enclosed nor should they have ; after them. while {x} do { [statement 1], [statement 2], [statement 3] }; This is the correct syntax. Just posting this in case someone else has been tearing their hair out over this. It's really easy to make a typo in the correct syntax then never come back to it again. :lol: If you need an "if, then" then do this: _cond = true; while {_cond} do { if (alive guy) then { [hint "guy has stopped"] , [doStop guy] }; }; I need to loop a script with an "if, then" and multiple statements, so that's how I figured this out. Tested and it should work.
-
getPos of group's current waypoint?
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks, waypointPosition is what I was looking for. -
Resume group's editor waypoints after doMove or doStop
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I didn't know about waypointPosition. I was thinking it's strange that we couldn't return a WP's position, I thought. I'll take a look. -
getPos of group's current waypoint?
Archosaurus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I need your help, again, forums. These units just won't listen to me! This thread has a lot to do with this, so go and read it: https://forums.bistudio.com/topic/187098-resume-groups-editor-waypoints-after-domove-or-dostop/ My question's simple: Is there any way to get the position of a group's current waypoint and input it into a variable that I can getPos and doMove later? expectedDestination provides some...interesting...results. Mainly wandering off in a set cardinal direction. Thanks. -
Resume group's editor waypoints after doMove or doStop
Archosaurus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. I'd like to know how to make a group resume it's editor placed WP's, or the WP it was doing before a doStop or doMove is in place. For example: _vehicle has a move waypoint in the editor. Let's say that if a=1, then _vehicle runs doStop and it stops. Something makes a=2, and the vehicle resumes what it was doing. Is this possible, or even feasible to input via simple code? Also, I tried: _travel = currentWaypoint _vehicle; if (condition) then { _vehicle setCurrentWaypoint [_travel]; }; and it just caused the vehicle to wander off in the opposite direction. EDIT: _tank = [test_tank]; _destination = (expectedDestination test_tank) select 0; doStop test_tank; sleep 10; test_tank doMove _destination; Seems to work. EDIT 2: After further testing, this craps up too. Is there any way to get the position of a group's current waypoint then doMove there? I tried the obvious ways, but nothing worked, kept getting errors. -
findNearestEnemy then check result?
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yep, testing against "null" should probably work. Haven't tested yet but I have faith. I'll report back when I eventually manage to cause an error, and I'll also look into parentheses use. ;) Thanks guys. EDIT: Well, I can get the whole thing to run, but it's in a very clunky format. I have to put a "if !(isNull _var) then { code; };" and copy that for every function I want. Is there a way to embed multiple functions as a consequence to the _var being not null? I tried to simply put multiple lines between the {}; but it failed to run. Also, how do I access that good and clean looking input box so I can put my scripts there and they show correctly here on the forums? -
findNearestEnemy then check result?
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah, so that's how it's done in Arma's language. Variable's result is anything but objNull. I've misunderstood ! for quite some time, then. I found a more complex way to do essentially the same thing, but it also produced huge problems further on down the road. This is far nicer and simpler, I'll try it out later. This should also allow me to designate what happens when there's no more enemies in sight. Thanks. I'm new to complex Arma scripting, so I'm also having some problems with making a script that runs constantly during the mission, and runs some functions only once, but with repeatibility. ie: Script checks if enemies in sight, if enemies in sight, it sends a hint. When enemies are not in sight, it sends a different hint. It will do this again the next time you run into enemies, but it won't constantly spam hints. I'll make it's own thread if I can't figure it out in the meanwhile. I think I just have to type in quite a lot of "if, when" and whatnot. EDIT: There's a problem. Putting in if (_var != objNull) then {hint str _var} else {hint "No enemies near"}; causes the script to hint back either a null object when enemies are not in view, or the expected result when they are. Nowhere does it hint "No enemies are near". Thus the script basically runs the "then" part constantly. If this is intended, how do I make some functions run when the script reads a valid hostile unit? Right now, the script just reads back what the units see. -
findNearestEnemy then check result?
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_var = leader _group findNearestEnemy getPos leader _group; if (!objNull "_var") then { Is this correct? -
findNearestEnemy then check result?
Archosaurus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. I need your help once again, forums. I want to use findNearestEnemy to check if a squad sees any hostiles. If the result is null, I want nothing to happen and for the script to keep looping and checking if findNearestEnemy is not null. If findNearestEnemy is not null, I want a script to run. In this case, let's say a simple hint with "Working!" or something in it. Some kind of indication that it's working. I know how to do a simple "_loop = true; While {_loop} do {" loop to just loop that entire section, so my real issue is with checking the result of findNearestEnemy. I tried isNil and !isNil and nothing really produced anything, so perhaps I'm just misunderstanding. -
Find leader of group and addWaypoint onto group leader?
Archosaurus replied to Archosaurus's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That'd work fine, I imagine, if I wasn't trying to get it to work with an AI group. When I tried referencing the group that I named, I got an error back. Perhaps I put it in incorrectly. I'll try this and see if it works. wp1 = QRF_group addwaypoint [getpos leader _group, 100]; EDIT: Oh wow, it works. The hours of pulling my hair out have finally been made up for. This is simple and nice like I want it, no idea why I missed this approach. Thanks a lot. -
Find leader of group and addWaypoint onto group leader?
Archosaurus posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. I've run into a huge problem and I need your help, forums. I've tried everything, and there just isn't a satisfactory way to do this. Let me underlay the scenario: I have one group of INDFOR attacking a BLUFOR position. I have a BLUFOR QRF stationed elsewhere. Once the BLUFOR is aware of the INDFOR, a simple .sqf runs via trigger that sends the QRF to attack the INDFOR. In the .sqf I have: wp1 = QRF_group addwaypoint [getpos Arch, 100]; //Player is named, and I know I can use "position player, 100" as well. That's not the point. wp1 setwaypointType "MOVE"; wp1 setWaypointCombatMode "YELLOW"; wp1 setWaypointFormation "WEDGE"; wp1 setWaypointSpeed "NORMAL"; wp1 setWaypointBehaviour "AWARE"; wp1 setWaypointCompletionRadius 10; and more. They simply get a waypoint to move roughly onto my position where I was when the script went off. There's nothing wrong with that, it works fine. What I want to do is to make a script that checks the LEADER of the current group, NOT the player or a single named unit. The reason being that the named unit can always die before they get there, and then the script will work incorrectly/not work at all. I tried referencing the group, which I named in the leader's init, but it didn't work. I tried a marker method by calling the leader, but it didn't work. I've tried so many I can't remember half of them. How exactly would this be done, in the most simple way possible? All I need is a script that makes a move waypoint onto a group's leader, even if the old leader has died prior. Thanks. -
Question: How badly does using the dev build affect performance? As of now, my Arma 3 is running absolutely horrible, and I really hope it doesn't run like that when it releases. It used to run better some versions ago.