HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

OMG!! Help me to finish my map PLZ!!...

01-27-2004, 06:28 AM#1
The_Inquisitor3
well.. this is kinda frustraiting... only 1 trigger left to finish my big proyect and cant do it... :@

ok this is the problem... look the picture below... thats the map... the players of the team 2 will start in diferent places while team 1 will start toggetter... ok.. this is the deal, its a AOS map, so units will spawn from each team base... team 2 will spawn stronger units to destroy the first 2 guard post (red points) i need to do a trigger to force the computer to TRAIN the units.... i mean in the barracks... the team 1 have some elfs/humans production buildings... and i need to they just keep training random units avaliables forever... but thats not the all problem... the stuff is that the only working/producing buildings will be the first guard post in the path of the team 2.... WHEN the guard post is destroyed, the next (the next on the path) will start the production with stronger units.. (diferente barracks and ancients)


any 1 think a easy - non lagger way????
01-27-2004, 01:06 PM#2
EvilZug
Why not justy make a spot next to the barracks?... and make it look like they spawn them and give the units to like (Player brown) oh whatever...? and make them go to a specific spot? itd be easier
01-27-2004, 07:43 PM#3
The_Inquisitor3
ok... i have my own spawn system but... too many triggers "a unit enters in a region" will cause lag or not?????
01-27-2004, 09:08 PM#4
Newhydra
Quote:
The problem I am facing now is getting the units to keep moving if the attack command they have is interrupted... you'll see what I mean. It'a not as simple at doing a periodic event because each unit on the computer side has a different path to take and is not specically labeled... can't really explain it but if you try you'll see.


It is almost that easy.
Step 1: Assign each unit created a unique custom value between 0 and around 8000

Step 2: Create an array of regions

Step 3: When you order a unit to move somewhere do two things

Step 3a: Destroy the region contained in array[customValue(unit being ordered)]

Step 3b: Set array[custom value(unit being ordered)] = the location you want the unit to move/attack to

Step 4: Periodic event that orders a unit to move to the location contained in array[custom value of unit being looked at]
01-27-2004, 09:14 PM#5
The_Inquisitor3
i like that idea... can u give me an example PLZ!!! emote_sweat
01-27-2004, 09:52 PM#6
AllPainful
Heres an example of what Newhydra was talking about (its just an example and its NOT exact, but you'll get the idea):

say you have 2 paths, path 1 and path 2, each path has 4 waypoints

So, you create a region at each of the points allong each path.

Then you put all the regions in an array (for this example its called RallyPts), Like so

Set RallyPts[1] = Path1Relay1 <gen>
Set RallyPts[2] = Path1Relay2 <gen>
Set RallyPts[3] = Path1Relay3 <gen>
Set RallyPts[4] = Path1Relay4 <gen>
Set RallyPts[5] = Path2Relay1 <gen>
Set RallyPts[6] = Path2Relay2 <gen>
Set RallyPts[7] = Path2Relay3 <gen>
Set RallyPts[8] = Path2Relay4 <gen>

Now your triggers would look like this:
Code:
SpawnPath1
Event
  What ever
Conditions
Actions
  Create 1 (blahblah) unit at Path1Start <gen>
  Set custom value of last created unit = 1
  Order last created unit to attack-move to RallyPts[custom value(last created unit)] 

SpawnPath2
Event
  What ever
Conditions
Actions
  Create 1 (blahblah) unit at Path2Start <gen>
  Set custom value of last created unit = 5
  Order last created unit to attack-move to RallyPts[custom value(last created unit)] 

MoveToNext
Event
  Unit Enters Path1Relay1 <gen>
  Unit Enters Path1Relay2 <gen>
  Unit Enters Path1Relay3 <gen>
  Unit Enters Path2Relay1 <gen>
  Unit Enters Path2Relay2 <gen>
  Unit Enters Path2Relay3 <gen>
Conditions
  Unit belongs to player (who ever)
Action
  Set (custom value of (entering unit)) = (custom value of (entering unit)) + 1
  Order (entering unit) to attack move to RallyPts[custom value(picked unit)] 


PeriodicalTostopStick
Event
  Every 30 second gametime
Conditions
Actions
  Pick every unit in playable map area
    If
      Conditions
         Picked unit is owned by player (who ever)
      Then
         Order (picked unit) to attack move to RallyPts[custom value(picked unit)] 
      Else
         Do nothing
01-27-2004, 10:02 PM#7
The_Inquisitor3
ok thanks.. i will save the regions in the variables... when a guard post is destroyed, the point will change... that way i dont have to use "a unit enters in a region" and i will have reduced lag!

THANKS!!

just 1 more question... "pick last created unit" will only pick the LAST created unit all all the last created units??

like

Create 5 peons

action

Pick las created unit and Kill picked unit


that will kill 1 peon or all 5 of them?????
01-27-2004, 10:09 PM#8
xxxSpikexxx
periodic events cause the biggest lag ... and if it effects all units on the map every 30 second you can be sure that its gonne lag ...

i got a less effective but less laggy way:
u just make the units move from the start to the first waypoint ... entering the waypoint makes it attack move to the next 1 ...
if you make the waypoint so big that they cant be passed without entering it should work:

when a units gets stunned it stops moving... i saw it often: after stunning units return to where they got the order ...

it will move back ... BUT once it crosses one of the way points it continues the way to the front ...

"units enters region" is by far less lagcausing than "periodic event"

and if i got it right your problem was asswell changing the unit type trained after a special condition is completed.
just make a unit-type variable: unitTrained (or something)
and then us periodic event : order (whatever) to train a (unitTrained)
is that what u meaned?
01-27-2004, 10:17 PM#9
The_Inquisitor3
i have the "spawn" lag under controll.. dont worry.... training units may cause more lag cuz there is like 20 diferente production structures.. im reserching a low lag trigger, i just need to avoid "enters in a region" becuse i already have too much of those
01-28-2004, 12:22 AM#10
Newhydra
No, that's not an example of what I was talking about allpainful...but it's close.

When you create the first unit give it the custom value 1
The next one created gets the custom value 2
etc

Then, when you order any unit to move/attack somewhere, store the location you ordered them to go to in an array, using their custom value as the index.

This does not relate to inquisitor's question, and is directed to nathanmx.
01-28-2004, 03:02 AM#11
The_Inquisitor3
im using the main idea... just with a small diferences...
01-28-2004, 04:12 AM#12
Narwanza
Unit Enters region will not necessarily create lag. What will create lag however, is telling them to move to the Center of another region. What you need to do is create a temppoint, and order the unit to move the the temppoint. You need to create a temppoint for each region and set it equal to the center of the region at init. This way, you only get the Center of a region once for each region, as opposed to a new center each time an order is issued. The event itself will not cause noticable lag at all. Believe me, I have made a TD that is basically the anti-lag TD and i have like 35 unit enters region events, but no lag from memory leaks, because I use temppoints. Actuallly I use a modified version of what I said, I only have 1 temppoint, but it is set to the center of the next region at every region, and then removed from memory when its purpose is done. This also gets rid of having 35 variable points that take up room.

I am the Anti-Lag =)
01-28-2004, 09:04 AM#13
Dead-Inside
It's intresting how people sometimes know so little but still can pack such a convising punch. Either way, entering a region does not cause lag, it's what you do in your actions that does. Periodic Events do cause lagg, especilly if you use a lot of them. The laggyness is usually because slow computers can not handle it, unlike the Super Hardcore Gamers which have the latest latest. If you get a game with Hardcore Gamers, then you can run a map with a lot of periodic events. If you have a slow comp, it will lagg, not only for the slow comp, but it drags the rest down aswell, sort of a game-clock freezer.

AllPainful, I really like yah, just so you know. You're skilled, and when you answer, you answer with the best solution (As you see it) and thurally. Keep it up :). *Nominates you for a medal*

I say listen to Narwanza.

Regards
Dead-Inside