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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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