Home   Help Search Login Register  

Author Topic: I need help.....quickly  (Read 1168 times)

0 Members and 1 Guest are viewing this topic.

Chudley

  • Guest
I need help.....quickly
« on: 25 Jan 2003, 06:09:43 »
Ok, I need a script that will check if every unit in a given array knows about any enemy unit in another array.  :-\

And if so, to what extent i.e (_Unit knowsAbout _enemyUnit >0 etc...).
I have written a small script....  ???

I have two problems with it.....
 
1. It has a loop which goes through every unit, and although the lag isn't too bad on my PC - (Athlon1600,64Mb GeForce 4,512Mb RAM) - it will be horrendous on lower spec machines.  >:(

2. It doesn't work properly. Also, I just think there are smaller, less CPU heavy and more effective scripts out there. I just haven't got time to look.  :'(

So, if one of you has written a script or knows about a script which would be useful to me, could you please contact me?  ::)


Alternatively, if there are any gurus out there who can write it for me....
....here's what I need. ;)


I have 4 alarm triggers radiating from the centre of the main objective (A village.)

There are 2x 5 man patrols inside the village, when each alarm is triggered - the patrol move to pre-set waypoints. (This part is fine.)

To complete the EAST AI for this objective, I have 2x BMPS each carries 1x 5 man patrol.

Each BMP starts at a random location at least 750m from the village centre.

[This is the part I'm stuck with....:(

1a...If an enemy has been spotted, I want a BMP to move towards that position quickly and ready to fire upon any WEST units it comes upon.



2aIf it arrives at waypoint, and it knowsAbout no enemies, then return to instruction 1a. (Being alert and ready to fire at the same time.)


2bHowever, if the BMP is approaching the waypoint and it knowsAbout enemy units to a degree of 1 or greater (greater than 0, but less than 1)then it will advance upon the waypoint slowly, ready to fire.


2cHowever, if the BMP is approaching the waypoint and it knowsAbout enemy units to a degree of 2 (greater than 1, but less than 3) then it will unload the patrol and all will advance upon the waypoint slowly, ready to fire.

2dIf the knowsAbout value is equal to 3, then a more aggressive stance is required, ie unload troops quickly.....attack immediately, etc.

2dIf the value is 4, same as above, only more aggressive (ie , maybe call in backup?)




If anyone thinks they can help, or maybe point me to a similar script I would be very grateful.  8)


Any scripts used in my mission 'Paratroopers v1.3' will get due credit.
Thankyou ;D
« Last Edit: 25 Jan 2003, 06:16:30 by Chudley »

Chudley

  • Guest
Re:I need help.....quickly
« Reply #1 on: 25 Jan 2003, 06:13:26 »
Oooops  ::) , I forgot to say..... this is REALLY holding me back, so I'd like a result as soon as possible.

Thanks again guys.  ;D

Offline Terame

  • Members
  • *
  • Nice one OFPEC
    • http://fantasyscifi.com/main/ fantasy scifi sci-fi
Re:I need help.....quickly
« Reply #2 on: 18 Mar 2003, 00:47:20 »
Oooops  ::) , I forgot to say..... this is REALLY holding me back, so I'd like a result as soon as possible.

Thanks again guys.  ;D

I have a question for you while you're waiting for a gnius scripter to respond :)

I have tried to have units as paratroopers for ages with no success, how do I place Unit A as a paratrooper?

I've tried UnitA "InCargo" and grouped with a parachute which is "Flying, but no good

thanks in advance
You can travel to infinity though the endless passages of the cosmos. Even
better this belongs to you. This is your mind

major asshole

  • Guest
Re:I need help.....quickly
« Reply #3 on: 18 Mar 2003, 16:55:55 »
G'day

Try 'em as the driver not cargo
e.g.  unitA moveindriver para1

hth

L8R
« Last Edit: 18 Mar 2003, 16:58:57 by major asshole »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:I need help.....quickly
« Reply #4 on: 23 Mar 2003, 23:14:22 »
u can check if a unit knows about enemy unit in other array like that

? "unitname knowsabout _X > 0" count arrayofoderunits > 0

but i donno if u can use 2 arrays (just loop da checkin of 1 array)

1a - i think da best way wil b detection triger :P

2 a-d - use da method above

LCD OOUT


"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Terame

  • Members
  • *
  • Nice one OFPEC
    • http://fantasyscifi.com/main/ fantasy scifi sci-fi
Re:I need help.....quickly
« Reply #5 on: 24 Mar 2003, 02:33:26 »
G'day

Try 'em as the driver not cargo
e.g.  unitA moveindriver para1

hth

L8R

Almost seems like an insult to say thank you "asshole"  :-[

But seriously thanks - I'll try this today :)
You can travel to infinity though the endless passages of the cosmos. Even
better this belongs to you. This is your mind