RazorX
Member-
Content Count
123 -
Joined
-
Last visited
-
Medals
Everything posted by RazorX
-
Marker to reveal way point
RazorX replied to katipo66's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If you have set both the placement and completion radius to 1000 then good luck in effects. It's a bit of simple scripting: use getPos to get the desired unit's position then use addWaypoint to create a waypoint in the selected location -
AI Driving, how to park exactly on a specified location
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I see, but aren't unitCapture and unitPlay available only for OA? I have basic ArmA2 only. The problem is that I have parking places set by markers, they are set near each other and I want to make parking maneuvre look realistic (no setPos!) and (the most imprtant) be precise. -
AI Driving, how to park exactly on a specified location
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah, I'm now using setPos with unitReady, but I don't want that -
doWatch is the same as commandWatch, but without radio message. So it's high-level. Beside that, I didn't notice any other differences.
-
lookAt is a low-level command
-
Is there a way the change the terrain textures during the mission via scripting?
-
I've already tried that, it didn't work. Don't know why. v 1.07 each time I was using waituntil, the script crashed or didn't really wait so I used SQS
-
Shame, shame, shame that nobody had posted it earlier... So, what are we looking at? I have a group of civilians, and I want each member of a group to go somewhere and stay there. I want to create plenty of units, so only 144 groups which I can create do not satisfy me. I placed the units in 1 group. By using doMove, commandMove etc. the units will reach the location and after that return to formation, I don't want that. solution? simple SQS script _unit doMove _position _unit enableAI "MOVE" @ unitready _unit || !(alive _unit) _unit disableAI "MOVE" No hard-thinking, as simple. What were we thinking of? Shame... But, disabling the movement AI requires much more scripting if we want to make the units do something more than just moving around. I'm now testing if this solution has any limitations, bugs, issues, eg. leader behaviour etc
-
The issue still unsolved. Can anyone assist, please?
-
I've been facing some technical issues lately. It's all about spawning civilians. More details here: http://forums.bistudio.com/showthread.php?t=94108 I would be grateful if anyone could help EDIT: Issue solved, everything works perfect now, work in progress
-
Add a function similar to "doMove" but preventing units to regroup
-
stop doesn't work either. It seems that the unit never gets 'ready', after reaching it's destination (doMove), still regroups and then stops. Any idea how to fix it? ---------- Post added at 05:52 PM ---------- Previous post was at 05:11 PM ---------- All right! This works. Simple example: I've placed a unit and added "pacan = group this" to the init line. then a simple repeatable trigger with activation "Radio Alpha" and activation: "[pacan] exec "spawn_civilian.sqs"". (You can exec the script however you want to, I did it this way) and a "spawn_civilian.sqs" script _team = _this select 0 _select = call compile loadFile "random_civ.sqf" _unit = _team createUnit [_select, getmarkerpos "spawn1", [], 0, "NONE"] _unit domove getpos player exit The "random_civ.sqf" is my function that returns a random unit's class, in my case - civilians: _num = floor random 5; _civ = switch (_num) do { case 0: {"Doctor"}; case 1: {"Functionary1"}; case 2: {"Assistant"}; case 3: {"Priest"}; case 4: {"Policeman"}; }; _civ What is vital? The team leader, which has been placed on the map must have a waypoint "dismissed" placed on himself. And the leader MUST NOT die. if a team leader dies and the group is empty, spawning a unit in this group may cause that it will try to regroup to the group's previous (but dead) leader, or if the spawned unit detects that the leader is dead, it will do absolutely nothing (ignores domove commands). So what I did, is that I added to the leader's init line "this allowDamage false" and placed it somewhere where nobody will bother him (you can also place it on a ship and send way far out of a mission's area). The example script spawns a unit at a position of marker called "spawn1" and makes the AI to go to the players position. You will notice that, when it reaches it's target, the unit will stop and it doesn't need any other commands like "stop" or "disableAI" (I may be wrong, but I haven't experienced any bugs yet). You can now script any actions you want to the spawned units. Cheers :) EDIT: Bugs found.... Other spawned units regroup to the first spawned unit even if the leader exists. Trying to fix it.... Hold on...
-
Player's behaviour "Aware" and "Safe". Override?
RazorX posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I noticed that, when the player has only a secondary weapon (ie pistol), the player can't be switched to "safe" behaviour, he can't hide his weapon. Is there a way to override it? Even if I set in the init field: player setBehaviour "safe" the unit will draw his weapon anyway. But what's funny is that the AI can hide it's weapon when switched to "safe" mode. Bug? -
Unit controlled by player cannot hide his weapon if he has only secondary weapon (i.e. pistol). Even if {this setbehaviour "safe"} is set in the init field, the unit always draws it's weapon. I've noticed that AI controlled units don't have this issue and they hide their weapons properly. Any chances of fixing that? Thanks a lot
-
Tried that either. Doesn't work with UnitReady. Units still regroup
-
Units will always fall back to formation after using commands such as DoMove, CommandMove, Move. I'm trying to solve that issue too. In VBS2 there is a function similar to DoMove but prevents units from falling back into formation. The only solution which I can see is to spawn a group, combine every AI with the DoMove command with UnitReady and DisableAI "Move" EDIT: The solution above does not work
-
Is there a way to block the road from AI?
RazorX posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I want to prevent the AI from driving a certain road (close the road for traffic in other words), but I don't want to place any objects like barricades etc (cuz the AI will smash into it anyway). Can do it in an easy way or do I have to make some brainfrying scripting? -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Can anyone help? -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah, that's what I tried to use, but I need to do some radical modifications -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
A'ight, I have it, but the problem is, that vehicles drive randomly through the neighbouring fields, I want them to stay on the roads and find a detour by themselves. I'll try to implement that... -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
sure I am -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
they're based on a position of a dead unit. It is a script, where when a body is detected near the road or on it, the police closes the road for traffic, because it's a crime scene. I've already written a script that places road barriers on the road segments adjecent to the body. But the AI can still drive through that section. I want to temporarily close it for traffic. -
I just wanted to say "Thanks"
RazorX replied to keimosabe's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I would really appreciate if you all could spam somewhere else -
NOOB: Help please!
RazorX replied to xMobiusTyrx's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
?!(alive target) : endMission "END1"; where "target" is the name of a killed person You must place this code in the "init.sqs" file or as a trigger or as a script. -
Is there a way to block the road from AI?
RazorX replied to RazorX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
For me it is vital not to create any objects on the road. I just want the AI to calculate route excluding the specified road segments. I don't know if I should mess with the AI or with the road segments' properties or creating detours using waypoints. I would like to avoid the last solution mentioned, but if it's the only one, well, I'll take it...