HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I need help for Trigger and variable

10-01-2003, 10:24 AM#1
Silversuns
I would like to know how can I give order on units when they arent in the map ... like in a td but constantly. I mean I have trigger like

Event
Time - Every 2 second of the game
Condition

Action
Units - create 1 unit for player 12 at location ...
...

and i want to give it an order when I create it in the location, but enter region doesnt work.

what can I do for that???
I have other question about leaderboard, How it work ?
thx to answer me.
10-01-2003, 10:42 AM#2
HEZZA
Giving orders to units that arnet on map... havent a clue but could it be

condition Unit equal to last created unit
perhaps
10-01-2003, 10:47 AM#3
Zwan
Action- Unit-Order last created unit group to attack-move to <region>
10-01-2003, 11:14 AM#4
Silversuns
ok i think about last created units but i forget to tell i have 6 different path they will go.
and in each way they create the trigger i talk about before.
and if i use last created units they will go all at the same way ... somthing i dont want.

I want to control 6 differents path in same time but i dunno how ?
can you help me?:( :bgrun:
10-01-2003, 11:15 AM#5
Silversuns
How to create units Group?
how this work exactly?
10-01-2003, 11:52 AM#6
Silversuns
I want to give an order to the units where i create it and the 6 way may be independant in the same time. To not mix the trigger.
Any can help me about that?????plz
thx.

:bangH: 0_o emote_confused :bgrun: .
10-01-2003, 11:54 AM#7
Saethori
You want them to go different directions?

How about assigning all the units to unit groups, then order them to go to a specific region name with string data, like 'Destination' + 'Random Number from 1 to 6'

..I don't know if this will work...
10-01-2003, 12:19 PM#8
Silversuns
hmmm, I think i may use units groups.
I have 6 differents region,
I create it from 6 differents regions
They wont go in random.

Can i do a unit group on a specific player and a specific region????
Like 6 units groups and a lot of different level.
10-01-2003, 12:49 PM#9
tufy
Ok, let's see. You have 6 unit groups being made (let's call the areas "sectors 1-6"). Now you want the first group to go from point A to point B and then to point C, while the second group group from D to E and then to F (and so on). All you have to do is make a Unit Group Array (go to variables, create a new variable, name it, say, TravelingUnitsArray, and tick the "array" command). Make all required regions (where units are created and where they have to go to). Now go to the Trigger Editor and do this:

Events:

Every 2 seconds

Conditions:

/

Actions:

For each integer A from 1-6 do:
Create (number) (your unit) at (starting location) for (required player)
Add unit to unit group: (Last created unit) to (TravelingUnitsArray(IntegerA))
If (integerA)=1 then (Order last created unit to attack move to sectorB) else (DoNothing)
If (IntegerA)=2 then (Order last created unit to attack move to sectorE) else (DoNothing)
.
.
.

Now you have to create a second trigger:

Event:

Unit Enters Region

Condition

Region=SectorB
Unit belongs to TravelingUnitsArray(1)

Action:

Order triggering unit to attack move to SectorC

Etc, etc. Hope this helps. Oh, when the unit enters last region, either remove/kill it or take it out of the unit group. That helps a lot.
10-01-2003, 12:51 PM#10
chemo
u could give each group mana.... like 10,20,30,40,50,60 this way they know which path they would chose.. just a helpgull thought ;D
10-03-2003, 09:25 AM#11
Silversuns
ok ...
but tufy can you be more explicit on the trigger action, cos i try to take the good trigger but im not sure what is the good one ...
can you tell about each good one plz
thx.
10-03-2003, 10:16 AM#12
Silversuns
The way is something like that

1 2 3 4 5 6
! ! ! ! ! !
!__! !__! !__!
7! 8! 9!
!__.__!__.__!
10! 11 !12
! !
! !
13!____15____!14

They spawn to 1,2,3,4,5,6 and the 1 and 2 go to 7 and the 3 and 4 go to 8, the 5 and 6 go to 9.
the 7 go to 10, the 8 go to 11 and the 9 go to 12.<
the 10 go to 13 and the 12 go to 14, the 11 split in 2 (like 3 and 4) and follow the 10 and 12 way.
the 13 and 14 go to 15.
can you give me the explicit way,I want they follow there respective pathern. Some monsters spawn for a laps of time and when expired a new units will spawn and other and other ...

Can you give me the explicit trigger i may use to it work without bugging anywhere and they follow the good way.
thx to help me ...
I hope you can figure out.
10-03-2003, 10:45 AM#13
Silversuns
oh soryy it didnt appear like what i think i attach a little image.
10-03-2003, 01:37 PM#14
tufy
Ok, let's see:

Events:

Every 1 second of game time

Conditions: /

Actions:

- Create 1 Footman at random point in (Area1)
- Add (last created unit) to unit group (SpawnedUnitArray(1))
- Order (last created unit) to attack move to (random location in (Area7)
- Create 1 Footman at random point in (Area2)
- Add (last created unit) to unit group (SpawnedUnitArray(2))
- Order (last created unit) to attack move to (random location in (Area7)
- Create 1 Footman at random point in (Area3)
- Add (last created unit) to unit group (SpawnedUnitArray(3))
- Order (last created unit) to attack move to (random location in (Area8)
- Create 1 Footman at random point in (Area4)
- Add (last created unit) to unit group (SpawnedUnitArray(4))
- Order (last created unit) to attack move to (random location in (Area8)
.
.
.

*****

Second trigger:

Events:

Unit enters region (Generic unit event)

Conditions: Unit belongs to unit group (SpawnedUnitArray(1))
Region=Area7

Actions:

Order (Entering unit) to (attack-move) to (Area 10)

(Do same for each unit group).
10-04-2003, 03:56 AM#15
Silversuns
Cool, I think it work.:ggani:
Thx for the help but now i got a new problems ...

I try to make a dialog box, like you can choose the difficulty of your map and was a voting system in same time and i want it appear in a leaderboard...
What should i do for that ??