Home   Help Search Login Register  

Author Topic: movin' now  (Read 1281 times)

0 Members and 1 Guest are viewing this topic.

headshot_snipe

  • Guest
movin' now
« on: 06 Jun 2003, 23:09:22 »
I made a random mission, where when a helo is at a certain place a group of baddies move to a gamelogic, i just named every one in that group and used the domove command, its very bad editing to use everysingle name, so i just want to know how to make a group move to a certain place without waypoints. any ideas?

tnx  8)

Kaliyuga

  • Guest
Re:movin' now
« Reply #1 on: 06 Jun 2003, 23:54:27 »
as long as they are indeed grouped.... you can put this in the init of the group leader....

g=group this

and then use

g domove x


 I'm fairly sure though that if the dudes are grouped together simply telling the leader to move somewhere will suffice.... as everyone else would maintain formation with him .....



 

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:movin' now
« Reply #2 on: 07 Jun 2003, 00:30:37 »
U could use the commandmove command, which will make the leader order the group to move to x

Knut Erik

  • Guest
Re:movin' now
« Reply #3 on: 07 Jun 2003, 01:37:28 »
There is a MOVE command.

(Leader Grp1) move [x,y,z]

Does it suit your needs  :-\  ::) :P

headshot_snipe

  • Guest
Re:movin' now
« Reply #4 on: 07 Jun 2003, 14:43:30 »
Tnx all, it works more or less better,

another question, i don't think its possible but could you have a curved waypoint?

Example: You have a big field surounded by a forest, the field looks like a circle, i just want the AI (leader of group who is in the forest) to order his men to flank the goodguys in the middle of the field from the right or left without his men entering the field.

                           '''''''''''''''''''''''''''''''''''''''
flanking position'                                '    flanking position
                        '                                  '
   forest           '            good guys       '        forest
                       '                                     '
                         '                                 '
                           '                             '      
                              ''''''''''''''''''''''''''''''''

                                      group leader (badguys)

the diagram ins't verygood but i hope you get the idea  :P

 if thats the curved waypoint isn't possible, can i insert a trigger and the specified units cannot enter the area of that trigger?




Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:movin' now
« Reply #5 on: 07 Jun 2003, 15:22:32 »
"curved waypoint" doesn't make sense, a waypoint is, well, a point.

It sounds like you what you really want is for an AI group to split in two with each half moving to a different postition.    You can get the parts to rejoin after the action if you like.

Remember, the AI don't have brains or free will .... if you want them to go somewhere all you have to do is tell them to go there.  ;D
Plenty of reviewed ArmA missions for you to play

deaddog

  • Guest
Re:movin' now
« Reply #6 on: 07 Jun 2003, 15:51:50 »
That is easier done with two groups.  The problem with using the domove command to order individual units around is that they always want to rejoin with the leader.  If you order one unit to go to a specific place, as soon as he gets there he will head back towards the leader.  Unless you use the dostop command when he gets there.

You are going to have to script a flanking maneuver.

headshot_snipe

  • Guest
Re:movin' now
« Reply #7 on: 07 Jun 2003, 16:17:08 »
tnx for the reply macguba,

Quote
It sounds like you what you really want is for an AI group to split in two with each half moving to a different postition.    You can get the parts to rejoin after the action if you like.
 

yes, thats what i want to do, but i don't want them to go anywhere inside the circular field. Is there smthing to stop them from going in a certain radius? and whats the command to make them rejoin their group?

tnx

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:movin' now
« Reply #8 on: 07 Jun 2003, 19:55:14 »
[loon1,loon2,loon3] join grpNull
 - gets them out of the original group

[loon2,loon3] join loon3
 - gets them into their own group

[loon1,loon2,loon3] join origGroup
 - gets them home


Actually stopping them going into a trigger is difficult, but you could create a trigger that made them leave the trigger area.    Place marker outside the trigger area, a place that the loons could use as a rally point.    In the trigger

Activation:  West present or whatever      Repeatedly
On Activation:     "_x doMove getMarkerPos {marker1}" forEach thislist

syntax not guaranteed.   Set up two triggers in the treeline of the field, one for each of the two subgroups.
Plenty of reviewed ArmA missions for you to play

headshot_snipe

  • Guest
Re:movin' now
« Reply #9 on: 07 Jun 2003, 21:03:56 »
tnx a lot macguba,

1 -          I have another question  :P, how do you check if a unit is moving? because i wanted to know (going a bit off topic) so that i could use that in my crouch script: once a guy stops running or moving, he crouches.

2 -           and also, if i have a "?" in my script, will the script repeat that line until it becomes true?

example:

?not(moving unit1) = goto"whateva"  - will this line repeat its self until it becomes true?
#whateva
unit1 setbehaviour"combat"
unit1 setunitpos"up"
unit1 switchmove"crouch"

tnx
« Last Edit: 07 Jun 2003, 21:04:47 by headshot_snipe »

Kaliyuga

  • Guest
Re:movin' now
« Reply #10 on: 07 Jun 2003, 21:21:15 »
how do you check if a unit is moving?

there is the speed command


Speed
 
Description :
Returns the speed of the unit.
 
Syntax :
speed unitName

unitName is the name of the unit to return the speed
 
Returns :
Returns the speed of the unit.
 
Example :
SpeedOfUnit = speed MyTank
 

so you could make a condition where when the player's speed is less than 1 (0?)
then your crouch script was called up ....


I've never used this command in conjunction with an infantry unit.. so I'm not sure if it will work with infantry ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:movin' now
« Reply #11 on: 08 Jun 2003, 01:35:32 »
Lines beginning with ? are executed only once, when it is their turn.    If they are within a loop they are executed as many times as the loop loops.

What you are talking about is a line starting with @

@condition

means "wait at this line until the condition is true".   Checking "Scripting Topics in the command reference for more inforamation.
Plenty of reviewed ArmA missions for you to play

deaddog

  • Guest
Re:movin' now
« Reply #12 on: 08 Jun 2003, 05:50:03 »
Quote
I've never used this command in conjunction with an infantry unit.. so I'm not sure if it will work with infantry

It does work for infantry.  I think a typical soldier runs full speed about 17 Kmh or about 10mph.

Just remember, the speed command reports kilometers per hour.

headshot_snipe

  • Guest
Re:movin' now
« Reply #13 on: 09 Jun 2003, 08:12:51 »
tnx for all your replies.

When i wrote my crouch script it showed up an error
here is my script:

Code: [Select]
_guy = _this select 0

#loop
@speedOfguy = 0 : goto"crouch"

#crouch
guy setbehaviour"COMBAT"
guy setunitpos"UP"
guy switchmove"crouch"

goto"loop"

there is something wrong with the speed line i wrote, the game said it didn't know the operator of this command, any ideas how to fix it?

tnx
« Last Edit: 09 Jun 2003, 08:13:14 by headshot_snipe »

Kaliyuga

  • Guest
Re:movin' now
« Reply #14 on: 09 Jun 2003, 09:35:03 »
 I'm not the best at scripting either.. but here's what I think the line should look like:



@speed _guy < 1: goto "crouch"