HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Creep Waypoints PLZ HELP!!!

06-12-2003, 03:27 PM#1
Japsejan
I am making a dota type map where creeps spawn and are ordered to move in diffenrent directions. So i started out using the:

Unit Order [last created unit] Attack-Move to "a region"

trigger after it spawns...when he enters that region i use the:

Unit Enters "region"

event to order him to move to next region... like waypoints...

but the problems is that when the creep is being attacked on its way to the "region"(he is supposed to move to) he forgets the previous order and returns to the spawn point if i survives the attack...

anybody got any idea of how i can fix this problem?

any help would be appriciated!!
06-12-2003, 04:08 PM#2
ChrydGod
First of all don't use Neutral Hostile as owner of the creeps.

Second, use this trigger action when the game begins :

AI - Ignore the guard position of all *Player Owning the creeps* units.


Regards
06-12-2003, 06:37 PM#3
Japsejan
first of all thx for replying...

the creeps owner has always been player 1.

i tried what you said both using "map initialization" and "every 5 sec of game time" as events..

"map initialization" had no function but "every 5 sec of game time" did do something.. it caused the creeps to just stop when their attack is over... they didnt continue with their main order, to attack-move to "a region".. therefore i must ask again... i want the creeps to not forget their main order.. does anyone know how...

PS: i have heard talks about maybe use "for loop integer a" or something.. and maybe an ai script... i am not a script-lord so if anyone has time plz give an exaple of how i can get creeps to move to specific regions and remember those orders...
06-12-2003, 06:54 PM#4
Neo_Genesis
You can use the units mana to tell them which regions they have been to and which regions they shoud go to.

First make sure all units have an inate mana of 0 and regen mana never

second make a list of all regions unist can move to

when unit owned by player x enters region
unit move and attack to region = list of all regions[unitsmana]
set units mana = region number

Thats what worked for me.
06-12-2003, 07:17 PM#5
Japsejan
well sry but some of the creeps i use needs mana... :gsmile:

even so i didnt fully understand what you were trying to explain.. or maybe i am just too tired...

anyway i am still stuck with the same problem... :bangH:


another thing.. why cant i choose a region variable in the
"Unit enters region" event.. only regions are avaliable and it says that i have no varibles of this type even if i have a region variable...
06-12-2003, 08:53 PM#6
Neo_Genesis
Since you are using mana not sure what other verable you could use that is on a unit but here is (I hope) a better explanation of the above

Lets say you have 12 regions (names and number of regions are irrelavent) but lets just say they are R1 R2 R3 R4 ... R12

Create a new array varible (again name is irrelavent) called RegionArray

Fill it with R1 - R12

Write 2 types of triggers the first one is (in phydo code)

Trigger ONE (fires when a unit enters a region)
EVENT
Unit Enter This Region

CONDITION
Unit is owned by player (computer)

ACTION
Make unit move and attack to R2
Set units mana equal to 2

Trigger TWO (Fires every 2 or 5 or 10 seconds)
EVENT
Periodic Timer 5

CONDITION
Has no order (opptional)
Unit is owned by player (computer)

ACTION
Make unit move and attack to RegionArray[Units Mana]

In short this will keep units from forgeting where they were going

But for this to work units must have 0 mana and not regen mana
The other option is dual Arrays, one that keeps a list of unit objects and one that keeps a list of regions they should go to.

But that can get a bit messy
06-13-2003, 06:13 AM#7
Japsejan
i think i now understand what you meant.. i will give it a try when i come home...

but to explain my situation detailed, here is how i plan the unit-spawning-waypoint (or something) system to look like:

first there are two different unit types who spawns.. the first type is necromancers (which is the one using mana) who spawns every 40-45 sec of the game at a set region (here: SpwnNecro). Three necromancers spawn and each are going (at least are supposed to go) three different directions, lets say one to the north, the other east and last one south.

the other unit type, which is skeleton warriors, spawns also as frequently as the necromancers (every 40-45 sec). these use however three regions, one region for each direction (here: SpwnSkeletonNorth, SpwnSkeletonEast and SpwnSkeletonSouth).
In each of these regions there are supposed to spawn waves of four skeletons at a time.

so a little overview: every 40-45 sec it spawns three necromancers and 12 skeletons which are set to divide into three groups of one necromancer and four skeletons, each group heading in one direction (either north, south or east). these groups follows a path laid down by regions as waypoints.

along their path they will be attacked by similar partols heading towards them. after a fierce battle the surviving units either take on a new battle with incoming patrols or return to their spawning point.

But If the units have passed one waypoint, then it will not return because it will be ordered back into battle (by the last passed waypoint using the " A Unit Enters 'region' " event-trigger) before reaching its spawnpoint.

i could filled the map with regions (functioning like a waypoint) but this will get messy.. i know there is many other ways to do this...

i hope anyone understand what i am trying to do and can help me to prevent the units to forget their initial task to follow the waypoints all the way....

anyway thx Neo_genesis from trying to help me...
06-13-2003, 06:33 AM#8
Krakou
You can replace the mana check with a point value check. Point value is unused.