Home   Help Search Login Register  

Author Topic: waypoint problem ?bug? (behaviour-safe)  (Read 3144 times)

0 Members and 1 Guest are viewing this topic.

Offline dematti

  • Members
  • *
waypoint problem ?bug? (behaviour-safe)
« on: 14 May 2007, 18:38:28 »
hi,

I'm making this mission where soldiers patrol a town wich they have to defend soon as the enemy's arrive.
I set up cycle waypoints so the blufor keeps patrolling the town without end.
to let them patrol in a realistic way I use behaviour "safe" (only waypoint in wich they walk (except careless))

So heres the big problem; soon as a shot goes off near the location of a patrol they just stop moving, lie down and hold position. Even after hours they dont get up and proceed with the patrol (ive tried it)
Off course, this mission has become a complete disaster just because of this.

Help would be verry welcome, i've spent a lot of hours creating this mission.

thanks very much


Offline smoke52

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #1 on: 14 May 2007, 20:18:39 »
I read in another post that you can break the cycle waypoint. I added it to my mission but I haven't tested it yet. To do this just make a trigger activated by whoever, type "SWITCH", then syncronize the trigger with your cycle waypoints.

You can also make more waypoints after the cycle, so when it breaks the cycle they will go to the next you make. for example:

1. move
2. move
3. cycle
4. move
5. guard

Another thing you could do is add to the trigger's on act field a small script with something like

_guards = [guard1,guard2,guard3];

_guards setCombatMode "RED"
_guards setBehaviour "COMBAT";

or whatever you feel necessary. im sure someone with better knowledge of the editor could help cause im still new myself :)
« Last Edit: 14 May 2007, 20:25:08 by smoke52 »

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #2 on: 14 May 2007, 21:03:26 »
thx smoke

thats nice never thought of it :)  I can sure use it on some of the patrols.
Need some help on the scripting stuff though, I got no experience in any of that :confused:
I was thinking more of a way to lower their weapons while on "combat" behaviour, which will make them walking, right?  :yes:
i'll trie it out anyway

Offline smoke52

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #3 on: 14 May 2007, 23:31:31 »
yeah i know what you mean and i would like to know as well!

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #4 on: 14 May 2007, 23:46:02 »
as a player you can shoose to raise and lower weapon (lowering will make you walk)
default key= r
maybe we can do it with the AI soldiers also? (then they will also walk while on combat behaviour)
something in their init or waypoints maybe?

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #5 on: 15 May 2007, 19:06:04 »
The following text is from the ArmA Action Reference List on the Biki:

Code: [Select]
WEAPONINHAND / WEAPONONBACK

unitName action ["WEAPONINHAND",<target unit>]
unitName action ["WEAPONONBACK",<target unit>]

Soldier 'unitName' does nothing, 'target unit' moves his weapon from/to the safety
position (gun held across chest pointing at the ground). Change is persistent with
player, but AI units will change back to suit their current behaviour mode. AI
generally keep their rifles safe unless moving or targeting.

Example: SoldierOne action ["WEAPONONBACK", SoldierTwo]

Also keep in mind that you can use the commands setWaypointBehaviour  and setWaypointCombatMode to alter any given waypoint. Remember that a group's waypoint 0 is where they are placed in the editor, so for your waypoints start counting at one.

Let's say you want all your waypoints to change from "SAFE" to "COMBAT". Let's say you have 5 editor-placed waypoints for group myGrp. You could place a trigger in your map with the condition you want(detected by East, repeatedly) and in the On Activation put:
Code: [Select]
{[myGrp, _x] setWaypointBehaviour "COMBAT"} forEach [1, 2, 3, 4, 5]
In the On Deactivation put something similar to switch them back:
Code: [Select]
{[myGrp, _x] setWaypointBehaviour "SAFE"} forEach [1, 2, 3, 4, 5]
This is untested, but it should work....  :whistle:

« Last Edit: 15 May 2007, 19:16:59 by Mr.Peanut »
urp!

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #6 on: 16 May 2007, 00:15:47 »
{[myGrp, _x]  #setWaypointBehaviour "COMBAT"} forEach [1, 2, 3, 4, 5]
error type any, expected string

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #7 on: 16 May 2007, 03:26:34 »
You have to set the name of your group of guards to myGrp, or something else. So make sure in the init field for the leader of your guards:
Code: [Select]
myGrp = group this
« Last Edit: 16 May 2007, 21:30:35 by Mr.Peanut »
urp!

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #8 on: 16 May 2007, 19:11:31 »
ok got the code running (no error messages)
but soon as gunshots fire near them still lie down, hold position while they should be continuously patrolling
they dont even look for cover they just stay in formation and lie still.
i wonder why this hasnt annoyed anyone before, to me it ruins a big part of what i like in this game
« Last Edit: 16 May 2007, 19:34:24 by dematti »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #9 on: 16 May 2007, 21:40:24 »
Well, I don't know what to say. What is the combat mode set to on your waypoints? I suppose you could disable the move and targeting and then turn them back on.

In the detection trigger On Deactivation change to:
Code: [Select]
{_x disableAI "AUTOTARGET" ;_x disableAI "MOVE"} forEach units myGrp ; {_x enableAI "AUTOTARGET" ;_x enableAI "MOVE"} forEach units myGrp ; {[myGrp, _x] setWaypointBehaviour "SAFE"} forEach [1, 2, 3, 4, 5] ;
I am going out on a limb here. The code above is correct, but I do not know if it will give the desired result.

« Last Edit: 16 May 2007, 21:41:57 by Mr.Peanut »
urp!

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #10 on: 16 May 2007, 23:02:23 »
never mind mr.peanut thanks for the help anyway
tried the code and some others in many different ways, see some changes but still they dont move
I think you should try, its fast just give group some waypoints on safe and fire into the air when near them
you'll see its VERY annoying. It means you cant let soldiers walk because you are never sure they get to their last WP.
A simple bullet or 5 flies overhead and the patrol just stops (when on "safe")
Maybe there is no solution, maybe its a bug i dont know
help is off course still welcome altough i"m not counting on a solution anymore (after almost 4evenings of trying and trying)
I even had a nightmare about the code snippets :D
see ya

Offline dematti

  • Members
  • *
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #11 on: 17 May 2007, 00:01:58 »
ok got a breakthrough i think
we got a bug im pretty sure
if you place a group in editor: first waypoint combat, 2nd safe
more then half of the squad stays at the end of the first waypoint, only some of them will actually go to the 2nd.
They cant go from combat mode to safe mode, half will stay stuck.
can someone report this or something?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #12 on: 17 May 2007, 00:27:16 »
Certainly there is a bug there, in fact two, and quite important ones.
This is how a group in safe mode behaves:
If they detect shooting nearby they switch to combat and will lie down holding position until they detect AN ENEMY causing the shots. Then they'll engange and when clear, they'll proceed with next waypoint. And doesnt matter the behaviour set in next waypoint, they'll never return to safe.

And now comes a funny test, add a blufor group with some waypoints (set SAFE in all of them), place the player near them, also blufor. When game starts, fire at the ground in front of the leader, all will lie down and will keep there forever trying to locate the enemy causing the shots, they'll not move.

Now repeat the test, but place an OPFOR soldier near them and at their back. The opfor soldier will fire, the blufor ones will return fire killing it AND this time the group will resume its waypoint plan, but in AWARE mode.

Offline rhysduk

  • Former Staff
  • ****
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #13 on: 17 May 2007, 00:35:44 »
dematti,

First of welcome to OFPEC. :good:

In order to try and keep the forums shiny and tidy, we encourage members to not double post.
You can Click the MODIFY button and modify your previous post.

Rhys
Reviewed Missions Board: Please Read the User's Guide before posting!

Pride and Joy 1 (HW100-T)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: waypoint problem ?bug? (behaviour-safe)
« Reply #14 on: 17 May 2007, 01:59:39 »
Looks like a bug in the FSM. Anybody have the time to zip a demo and report the bug to BIS? Is the bug independant of the units' skill?
urp!