• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Zerg Larvae trigger help

Status
Not open for further replies.
Level 2
Joined
Aug 20, 2011
Messages
8
hello its been a long time since i opened my account in hive.


I need help with a trigger about creating a Zerg Hatchery. i know little about triggers and I've also checked out others like this. but, the only thing i found similar to what i want is Emperian's Egg Sack System.
difference is, it spawns on a region and the "Hatch-lings" spawns on a destructible egg


can someone alter this for me? like, change the region and make the "eggs" randomly spawn near at the hatchery, and replace the destructible eggs into dummy larvae units. i would be most grateful.

no jass pls... just raw gui trigger.
 
Level 2
Joined
Aug 20, 2011
Messages
8
yes, i've seen this thread before. this is where i found the Egg Sack System. i wanted to change it, but i dont have the knowledge.
 
Level 3
Joined
Oct 1, 2018
Messages
63
I would create a unit looking like that egg doodad and add an expiration timer to it. I dont know, what event matches with an expirating unit, maybe its "a unit dies".
So you would need a trigger, checking if the dieing unit is a unit type of that egg unit and than create the unit that shall hatch.


You can maybe start timers with arrays (index of egg dummy unit) if there isnt a matching event for expirating units.
Hope you know what i mean, my english isnt perfect yet.

Edit:
Forget that with the dieing unit event, i just realized you dont want the unit hatchet when the egg is killed. Sucks 2 be me. xD

Anyway you need an condition, that checks if the egg unit is alife before creating the hatch unit.

Edit 2nd:

Try out this map, i keept the triggers short & simple 2 understand. (i guess)

Here i have 2 hatcherys that create whisps.
when the whisps are still alive, when the timer runs out a footman will take its place.
 

Attachments

  • EggSystem.w3x
    9.4 KB · Views: 116
Last edited:
Level 2
Joined
Aug 20, 2011
Messages
8
quite helpful but do the wisp/larvae have a spawn limit? if not, can you show me a trigger that does so. also, im getting ideas from this. need to experiment some abilities.

edit: i wont be taking the footman trigger. since it will turn the larvae/wisp into "Soldier unit" rather than a unit that i want. only the spawning.


edit: can i also build multiple "hatcheries"? like 2 of em in the map? while they're spawning simultaneously? MY hatcheries if im being specific (player red's)

edit: created 2nd hatchery(player red's) other hatchery spawning is disabled. while the 2nd hatchery is taking all the credits.
 
Last edited:
Level 3
Joined
Oct 1, 2018
Messages
63
quite helpful but do the wisp/larvae have a spawn limit? if not, can you show me a trigger that does so. also, im getting ideas from this. need to experiment some abilities.

edit: i wont be taking the footman trigger. since it will turn the larvae/wisp into "Soldier unit" rather than a unit that i want. only the spawning.


edit: can i also build multiple "hatcheries"? like 2 of em in the map? while they're spawning simultaneously? MY hatcheries if im being specific (player red's)

edit: created 2nd hatchery(player red's) other hatchery spawning is disabled. while the 2nd hatchery is taking all the credits.


take a look to the Time elapsed trigger.

  • Time Elapsed
    • Ereignisse
      • Zeit - Elapsed game time is 0.00 seconds
    • Bedingungen
    • Aktionen
      • Einheit - Create 1 Hof for Spieler 1 (Rot) at (Center of Area P1 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
      • Set U_HatcheryP1 = (Last created unit)
      • Einheit - Create 1 Hof for Spieler 2 (Blau) at (Center of Area P2 <gen>) facing Vorgabe für Gebäude-Ausrichtung degrees
      • Set U_HatcheryP2 = (Last created unit)
Here you can see that i saved the hatchery in a unit variable.
first step would be to give that variable an array of lets say 99 in the variable window.
I dont think explaining an variable as a bottel suits each type very well. lets say a unit stored within unit(array) is one of those units that have a sticker.
This sticker is the array or number.
seperatly to that, make 2 integer (I_StickerP1) variables for both players. this integers you will juse as the arrays (stickers)

  • Ereignisse
    • Einheit - A unit Vollendet den Bau
You need a trigger with this event, to check if an hatchery was build.
next step is to check, if the right unit type was build and wich players unit that is.
if the condition is true, set the integer I_StickerP1 = I_Stecker + 1, and set the unit variable U_HatcheryP1[I_StickerP1] = Constructed Structure.

If this is too dificult right now i recommand you to read and test some tutorials. I have started with tower defense tutorial and i can highly recommand this type of game to learn triggering.
You learn nearly everything you need to create custome games from TD's becouse they are very complex. since i cant give you a german TD tutorial i dont have an specific tip right now.

Dont be mad at me. If i havent tried to build a map from an tutorial i wouldnt understand anything of this crap today.
Best choice is a step by step tutorial and it may take up to 2 days till you finally get it work.
If you actually manage that, you will feel like a god becouse you can do nearly EVERYTHING with the Trigger Editor. ;-)
 
Last edited:
Level 2
Joined
Aug 20, 2011
Messages
8
im not mad. im still new to triggering, my fault for not understanding variable stuff. also, i edited the map you gave me. i want you to check it out. not nearly as i wanted. but its progress. i just want multiple hatcheries to create larvaes of their own. still havent removed the footmen trigger.
 

Attachments

  • EggSystem.w3x
    9.9 KB · Views: 121
Level 3
Joined
Oct 1, 2018
Messages
63
Take a look at this picture:

Var.JPG

I have marked the 'X' symbol with paint. Here you can create and edit variables.
U_HatcheryP1 and U_HatxcheryP2 need Arrays. Also create Integer variables for indexing. Read my post above again and try out.

To change the Footman unit simply click on that function and change it.
 
Status
Not open for further replies.
Top