ghandolhagen
Member-
Content Count
38 -
Joined
-
Last visited
-
Medals
Everything posted by ghandolhagen
-
Hi all, I did some searching and found an arma2 thread that lists the issue but doesn't offer a solution. Now I am trying to do it for Arma3. How do I force the AI to fire in full auto? I have tried various things (i.e, fireSelect, fireMode, rateOfFire...) attempting to brute force a code hint from the editor to no avail. There has to be a way. any ideas?
-
Greetings Community! Anyone experience inconsistent trigger behaviour? I have a repeatable trigger that randomly spawns enemies if no enemies are present so that I can have waves of attacks. Sometimes it works exactly as expected, if the enemies leave the trigger area or are all dead a new group spawns in some random location and proceeds to attack and I can fight enemies for as long as my ammo lasts. Other times however it will only spawn the first group. Not sure if it has something to do with how many times the trigger gets checked or where in the loop it gets checked and whether or not that is conflicting with the on activation. Any ideas?
-
Inconsistent Trigger behaviour?
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Yeah it's not really an issue with the activation that just calls the script that spawns the group. The conditional as I previously stated is OPFOR NOT PRESENT and the trigger is repeatable. The issue seems to be a conflict with how often in the core game loop the repeatable trigger condition is checked. And it seems buggy because sometimes it works perfectly and sometimes not at all... -
Inconsistent Trigger behaviour?
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks @Tankbuster and @wogz187 great suggestions! I'll give it a try. -
Green IFF text on Friendly units?
ghandolhagen posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How do I remove the green text that appears when you look at a friendly unit? It really kills immersion. -
Green IFF text on Friendly units?
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks very much. I can't believe I never knew about that... -
I have recently encountered some odd behavior in one of my scripts. I thought I had a pretty good grasp of this command but it has stopped behaving in the usual way. consider the following: {_x setUnitPos "UP"}forEach units group squad1; In the past and indeed up until a few minutes ago in my script, this yielded the expected behaviour of each member of squad 1 standing up. Then I got a typerror . Type group, expected object. So then I removed the word group from the command: {_x setUnitPos"UP"}forEach units squad1; And NOW it works again. Does anyone know what is going on with this? Thanks for the help.
-
Inconsistent commands?
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@whiztler Thanks very much, that actually makes a lot of sense. It never occurred to me before. Thanks for the clarification, I'll watch out for this in the future. -
It's back the old maintain distance problem in a convoy...
ghandolhagen posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello I am attempting to have one vehicle follow a lead vehicle's current position whenever the distance between them is greater than 10 metres. Here is my first stab which doesn't work. The second vehicle does move to where the first vehicle WAS but then stops. It is as if the code is not updating the current position of the lead vehicle. Any ideas? Cheers! while{alive VIC1}do{currPos = getPos VIC1;}; dist = VIC2 distance VIC1 > 10; while{dist}do{VIC2 doMove currPos; VIC2 setSpeedMode "LIMITED";}; -
It's back the old maintain distance problem in a convoy...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Further Update. I removed the follower vehicle's way points and instead assigned the lead vehicle the waypoints. Then in each of those onAct I just update the currPos with a getPos on the lead vic and then also tell the follower vic to move to currPos. By spacing out the waypoints and playing with the speed of the lead vehicle, the following vehicle can move along at a good clip as it is always playing catch up with the lead. Not perfect but it is serviceable. Thanks everyone for the assistance. This community is awesome! A note: two vehicles works pretty good, three or more and it gets dicey. -
It's back the old maintain distance problem in a convoy...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just wanted to update. I modified my script a bit and I got a solution that seems to work mostly. I give the following vehicle it's own series of waypoints but at each waypoint activation I run this and what seems to happen is that it recalculates the lead vehicles position at each waypoint. There is a slight stop or slow down of the following vehicle at each way point, but I think i can live with that. :D : VIC2 disableAi "Move"; while{alive VIC1}do{currPos = getPos VIC1;}; dist = VIC2 distance VIC1 > 10; while{dist}do{ VIC2 enableAi "MOVE"; VIC2 doMove currPos; VIC2 setSpeedMode "LIMITED";}; -
It's back the old maintain distance problem in a convoy...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
jshock, Oh so it is just an index in an array. So does the script in Arma treat every variable as an array? -
It's back the old maintain distance problem in a convoy...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks everyone for the responses! nikiller, I have not encountered canMove before, so thanks for the education! :D One other thing. I have seen this select 0 before, but what does it refer to? That concept is fuzzy for me. -
Greetings. I had a question. Is the Random Patrol Module functional? Or am I using it wrong? Here is how I attempted to use it: First I have a squad called squad1, then I put down a civilian called c1 and give him several move waypoints. Next I place a random patrol module down and in the first array I put squad1. In the second array (the one that pulls the waypoints) I place c1. Finally I synchronize the squad and the civilian to the module and test it. So far so good the squad moves to all the way points that were given to the civilian. Neat but not random so now it is time to add more civilians with different move waypoint paths. I place more civilians down assign waypoints and add their names c2, c3, c4 to the array in the module. I synchronize them to the module. As I understand it at this point the module will choose one of those civilians and assign its waypoints to the squad. What happens instead is sometimes the squad is removed leaving a civilian to follow the first civilian's waypoiints and other times I test it, the squad is there but will always go to only the first civilian's waypoints. I must be doing something wrong. Any ideas? Thanks very much :D
-
RHS Escalation (AFRF and USAF)
ghandolhagen replied to soul_assassin's topic in ARMA 3 - ADDONS & MODS: COMPLETE
The problem I seem to be having is the Mi-24s don't work. They instantly run out of fuel, even when I try to do a hack like setFuel 1; or some kind of recursion that keeps setting fuel to 1. They just won't fly. The other Russian choppers seem to work fine. Really great mod in general just wish the Hinds would fly- 16574 replies
-
- Weapons
- Accessories
-
(and 1 more)
Tagged with:
-
checking if east ai near marker
ghandolhagen replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I too am looking to check the distance between a unit named DUDE and a marker. Everything works fine until the conditional at which point it throws an error and says that I am missing a '{'. Doesn't look like it to me so something else must be going on. Any thoughts? private ["_this", "_rWP", "_wps", "_wpPos", "_wpDist"]; _wps = ["wp1", "wp2", "wp3"]; _rWP = _wps call BIS_fnc_selectRandom; _wps = _wps - [_rWP]; _wpDist = DUDE distance getMarkerPos _rWP; DUDE doMove getMarkerPos _rWP; hint _rWP; if(_wpDist <= 0) then { hint _rWP + " reached!"; }; -
I have two arrays. One has 10 values in it, one is empty. I want to randomly select values from the first and place them into the second while at the same time removing them from the first to avoid duplication. Will this work or am I forgetting a parenthesis or something else? This is what I have so far: for "_i" from 1 to count _waypoints do{ _randIndex = _waypoints select floor count random _waypoints; _patrolPath set [count _patrolPath, _waypoints select _randIndex]; _waypoints resize _randIndex, 1; }; Thanks for taking a look :D
-
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the tip .kju -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
good to know :P I will check it out. also for the sake of thoroughness here is an example conditional I was playing with but it doesn't work either: if((speed _this == 0) && (_this distance _currentWP < 5)) then{ _currentIndex = _currentIndex +1; _nextWP = _patrolPath select _currentIndex; _currentWP = _nextWP; {_x doMove getMarkerPos _currentWP} forEach units group _this; }; -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey Champ-1, thanks for chiming in again. Still no dice. they just stand still and don't move at all. In my original script (the one where I was trying to write the whole thing from scratch) The logic I was following was, 1. randomize waypoints 2. store random wps in an array 3. Conditional to see if the units were moving or not. If yes then continue to current way point , if not then go to the next wp in the array via something like a currentIndex variable or something unless they were at the end of the wp chain.... -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the suggestion, unfortunately, setting a search and destroy waypoint only results in them wandering around the initial waypoint until they have determined it is clear then they stop moving. Ignoring all the other waypoints in the chain . This is a tricky one but i do appreciate all the feedback and support. Cheers :D -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just a quick follow up. I tried the code and the group moves to a random waypoint (the first one) just fine, however they stop when they get there they don't move to the next in the series. I appreciate the feedback and the code snippets. A lot less intimidating to work with than my madness :D I'll keep crunching on it and post an update if I get a breakthough. Cheers! -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow yeah seems like I was trying to code that from scratch. Nice to know about the built in functions. Thanks for the heads up. I am trying to get a handle on the syntax. I am not used to it :P And I will look into the show script errors thing. Thanks a bunch k0rd and F2K Sel -
Need a syntax check...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello again everybody. I am updating this post to show my progress. I am currently stuck on a logic problem, but the rest of the code seems to work. What happens now is the unit moves to the first way point in the _patrolPath array but then stops, instead of continuing to the next one and so on... The logic that I am going for is If the unit isn't moving, then move to the current waypoint else wait until unit stops moving to move to the next waypoint. I can feel I am getting close there is just a problem with my logic that I am not seeing. Maybe a fresh pair of eyes would help? Here is the CODE: private ["_waypoints", "_patrolPath", "_randIndex", "_this", "_currentWP", "_isNotMoving", "_currentIndex"]; _waypoints = ["wp1", "wp2", "wp3", "wp4", "wp5", "wp6", "wp7", "wp8", "wp9", "wp10"]; _patrolPath = []; _currentWP; _isNotMoving = true; _currentIndex = 0; if((speed (vehicle _this)) == 0) then { _isNotMoving = true; }else{ _isNotMoving = false; }; for "_i" from 1 to (count _waypoints + 1) do{ _randIndex = _waypoints select random (floor count _waypoints); _patrolPath set [count _patrolPath, _randIndex]; _waypoints = _waypoints - _randIndex; }; _currentWp = _patrolPath select _currentIndex; for "_i" from 1 to (count _patrolPath + 1) do{ if(_isNotMoving) then { _this doMove (getMarkerPos _currentWP); _isNotMoving = false; }else{ waitUntil{_isNotMoving}; }; _currentIndex = _currentIndex + 1; _currentWP = _patrolPath select _currentIndex; }; Thanks again for taking a look :D -
The scripting syntax melts my brain...
ghandolhagen replied to ghandolhagen's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
updated the first post...