Home   Help Search Login Register  

Author Topic: making an air patrol  (Read 461 times)

0 Members and 1 Guest are viewing this topic.

Offline penfolde

  • Members
  • *
  • chaos, disorder and mayhem....my work is done!
making an air patrol
« on: 23 Feb 2005, 05:55:52 »
Ello,

I've given up trying to make the plains take from the ground and stop then crashing, so i'm moving onto my next problem.

I want the airplains move between 6 logic points on the make and i have altered a patroling script i found on this site.  
The plains stay in the air ok,  but they will not move onto the next point on the map.

This is the script

Code: [Select]
_Ldr=_this select 0
_ob1=_this select 1
_ob2=_this select 2
_ob3=_this select 3
_ob4=_this select 4
_ob5=_this select 5
_ob6=_this select 6
_behaviour=_this select 7

_pt1=getpos _ob1
_pt2=getpos _ob2
_pt3=getpos _ob3
_pt4=getpos _ob4
_pt5=getpos _ob5
_pt6=getpos _ob6

_grp= Group _Ldr
_grp setbehaviour _behaviour

#Loop
#Update1
~4
_Ldr move _pt1
?(_Ldr distance _ob1) <= 100: goto "Update2"
goto "Update1"

#Update2
~4
_Ldr move _pt2
?(_Ldr distance _ob2) <= 100: goto "Update3"
goto "Update2"

#Update3
~4
_Ldr move _pt3
?(_Ldr distance _ob3) <= 100: goto "Update4"
goto "Update3"

#Update4
~4
_Ldr move _pt4
?(_Ldr distance _ob4) <= 100: goto "Update5"
goto "Update4"

#Update5
~4
_Ldr move _pt5
?(_Ldr distance _ob5) <= 100: goto "Update6"
goto "Update5"

#Update6
~4
_Ldr move _pt6
?(_Ldr distance _ob4) <= 100: goto "Loop"
goto "Update6"



and the init of the air craft i put  = air1 flyinheight 90; [this, g1, g2, g3, g4, g5, g6, "AWARE"] exec "patrol.sqs".

The problem is the plane just keeps flying around the first logic point.
Is there a good reason for this?   or dose some have a good airpatrol script i could have and mod?

Pen
« Last Edit: 23 Feb 2005, 05:56:18 by penfolde »

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:making an air patrol
« Reply #1 on: 23 Feb 2005, 07:27:20 »
uhh, why dont you just use waypoints?

Offline Blanco

  • Former Staff
  • ****
Re:making an air patrol
« Reply #2 on: 23 Feb 2005, 08:27:19 »
yes, waypoints would be better...

Anyway...

Your gamelogics are placed on sealevel I suppose, so when your plane is flying more the 100m high your distance conditions will never met.
Flyinheight 90... yeah 100 and 90 is pretty close...
Put your gamelogics in the air via setpos and... maybe it will work...
Another thing I see now...

You are using a move command with your leader?
Move is for groups, no?
I think that has to be Domove

But I also recommend a few move wp with one cycle wp
 
« Last Edit: 23 Feb 2005, 08:32:53 by Blanco »
Search or search or search before you ask.

Offline penfolde

  • Members
  • *
  • chaos, disorder and mayhem....my work is done!
Re:making an air patrol
« Reply #3 on: 23 Feb 2005, 15:45:06 »
ello,

no just creating him, hes just meant to fly from one point and the a nuther.  Hes not going to be controlled any players.  Hes ment to fly around and when he see a target he ment to engage.
Not sure how to use setpos, willl have a little play with that, any give me an example?

Pen

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Plenty of reviewed ArmA missions for you to play

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:making an air patrol
« Reply #5 on: 23 Feb 2005, 16:11:39 »
there is an example of pretty much every command in the comref, more lengthily known as the Command Reference, more lovingly known as the Mission Editor's Bible.

go and look in it. do it now. off you go.

it's here. you know you want to.

gwon, scoot ;)
« Last Edit: 23 Feb 2005, 16:11:57 by bedges »