Unit Spawn and Massing Help

AEK

New Member
Reaction score
0
Ok, for my map i have some triggers that arent working as intended:

Unit Spawning
I want 1 unit to be created per second when a wisp is in a region. But when i move the wisp to the region it creates only 1 unit and then no more will spawn unless i move the wisp away and back onto the region. This is my trigger.

Event:
- A Unit enters REGION <gen>

Condition:
- (Owner of (Triggering Unit)) Equal to Player 1 (Red)
- (Unit Type of (Triggering Unit)) Equal to Wisp

Action:
- Create 1 "UNIT" for (Owner of (Triggering Unit)) at (Center of REGION <gen>) facing default building facing degrees
- Wait 1.00 seconds

Massing
For this trigger i want my massing building to cast a spell (called mass mid) which causes all units owned by that player (excluding heroes and wisps) to move-attack to the middle of the map. But this trigger will only make one unit move. Also i do not know how to make it ignore heroes and wisps.

Event:
- A unit Starts the effect of an ability

Condition:
- (Ability being cast) Equal to ABILITY
- (Owner of (Triggering Unit)) Equal to Player 1 (Red)

Action:
- Order (Random Unit from (Units in (Playable map area) owned by Player 1 (Red))) to Attack-Move To (Center of REGION <gen>)


Thanks in advance for any help :D
 

Sil3nt

SUP?
Reaction score
134
For the first one u will need 3 triggers. The first will be like this

Trigger - Spawn start
Event
Unit enters Spawn region
Condition
Unit is equal to wisp
Action
Turn Trigger Spawn on
Turn trigger Stop spawn on

Trigger - spawn
Event
Time - peridodic event - Every 1.00 second of game
Action
Create 1 <unit> at region

Trigger Stop spawn
Event
Unit leaves <region>
Condition
Unit is equal to wisp
Action
Trigger Spawn off
Trigger Spawn Start on

This could be done with probably less triggers but im too lazy to open my editor and do it properly.

2nd trigger

Event - Unit starts ability
Condition
Ability being cast is equal to <ability>
Action
Unit group pick all units in region owned by owner of casting unit
Order picked unit to attack move <region>

If you still dont understand it ill redo it later on world editor, hope this helps
 

AEK

New Member
Reaction score
0
Looks reasonable, i will try them out,

Thank You!

I will come back with another post if it doesnt work or im just too tupid to make it work :p

Nope the first one didnt work and i havent tried the second yet.

The first one creates the untis before i even put the wisp on the region, then stops once if put it on and taken it off, so i think the third spawn trigger works, but theres a problem wit one of the first 2.
 

Sil3nt

SUP?
Reaction score
134
hmm i proly shoudal mentioned.
The trigger with periodic event that spawns should not be initally on (uncheck the box at the top while slecting the trigger, it should look transparent) do the same with the trigger that stops the spawning.
 

AEK

New Member
Reaction score
0
Oh yeah, that would probably help lol! I'll try out the second trigger if this oen works :D
 

AEK

New Member
Reaction score
0
Hmm the third one isnt working, because i think it needs to initially be on? because there is no way for it to turn on otherwise?

Edit: Also for some reason i added abilities to my masser (for the massing triggers) which do not show up in game but they do in the editor, i've made sure they were added to the massing building and i made sure they were in separate places on the grid. And i based the abilities off Channel.

Lol. You selected a random unit. :p

Yeah i know... Now i look back on it, that was quite obviously stupid lol.
 

AEK

New Member
Reaction score
0
Ok, so the spawner trigger is working now, all i need ot o is make it so the third trigger is turned back off after the wisp leaves because if i put the wisp back on it doent spawn!

Now for the masser problem, the stupid thing wont have the abilities i gave it!
 

Sil3nt

SUP?
Reaction score
134
oh yeh forgot about that part, as for ur massing icon im not realy sure. Maybe uploading the map would help
 

AEK

New Member
Reaction score
0
Im thinking i should maybe base the ability on a different spell? maybe war stomp or the likes as it will have no effect (no nearby enemy units etc).

I'll upload my map in a moment.

View attachment 12956
 

Sil3nt

SUP?
Reaction score
134
i think thats a good idea, i dont think i ever used channel before so i dont know how it works. Just base it off a war stomp changing the tool tips and area of effect, the animations and damage to nothing. Remember to give the unit the ability and make sure its a unit ability as well.
 

AEK

New Member
Reaction score
0
Lmao i got the masser to half work, it makes all NEUTRAL units move, instead of MY units lol. Ok i gotta see if there is anything wrong with the trigger....

Edit: Also it causes a largish lag spike that pauses the scren for half a second. I've heard of those memory leaks, would this be one of those? lol im clueless.
 

AEK

New Member
Reaction score
0
So this is my massing trigger:

Event:
- A Unit starts the effect of an ability

Condition:
- (ability being cast) equal to Mass Middle
- (Owner of (Triggering Unit)) Equal to Player 1 (Red)

Action:
- Pick every unit in (units in (playable map area) owned by player 1 (red)) and do (actions)
--- Loop - Actions
--- - Order (units (in playable map area) owned by playr 1 (red)) to attack move to (Centre of Middle <gen>)

Now how can i restrict the units to every BUT wisps and heroes?

Edit: Ok its now moving MY units, but also neutral units, and it will only move 12.
 

comparami

New Member
Reaction score
4
Then pick every wisp then order them to stop, then create another action To pick every Hero then order them to stop also.


:)
 

Sil3nt

SUP?
Reaction score
134
this is the new trigger

Code:
Massing Mid   RED 2
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Mass Middle 
    Actions
        Set Mass_tmp_group = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Not equal to Wisp) and ((((Matching unit) is A Hero) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))))
        Set Mass_tmp_point = (Center of Mid <gen>)
        Unit Group - Pick every unit in Mass_tmp_group and do (Actions)
            Loop - Actions
                Unit Group - Order Mass_tmp_group to Attack-Move To Mass_tmp_point
        Custom script:   call DestroyGroup (udg_Mass_tmp_group)
        Custom script:   call RemoveLocation (udg_Mass_tmp_point)

Variables used - Mass_tmp_group ----- Unit group
Mass_tmp_point ------- Point

With this code u dont need to make a trigger for each player. I havnt tested it but im pretty sure this will work.
The tmpgroup variable stores all units that are not heroes and are not wisp. They are then ordered to move the the point variable which is the center of the region called mid. The variables are then destroyed.
I gtg now so i wont be able to helpu anytime soon

btw i like the terrain it looks cool =D
 

AEK

New Member
Reaction score
0
EDIT: Nevermind lol
EDIT 2: Ok i'll try that
EDIT 3: Lol thanks i put heaps of effort into it :D

EDIT 4: And thanks for all your help its been awesome!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top