• 🏆 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!

Upgrading Spawning via Upgrades

Status
Not open for further replies.
Level 5
Joined
Apr 20, 2008
Messages
150
I'm finally getting back to my Murloc Rush map, and decided on a spawning system based off Footman Frenzy, where certain upgrades give you even more units that appear at your base. I figured the event was going to be:

-Event
Unit- A unit owned by (Player) Finishes an upgrade
-Condition
-Action
Trigger- Activate (Unit-Spawn Trigger)
Trigger- Deactivate (Previous Upgrade of Trigger)

What is the easiest condition that I could use for disern the Upgrade and what level of upgrade? For example, My tank Upgrade goes from Lvl. 1- Steam Wreakers to Lvl. 2- Steam Tanks, then can be upgraded to Lvl. 3- Advanced Steam Tanks with the same upgrade.
 

Wow, what a usefull post.

Anyway, here's what your asking

Well I think this will tell you the type of the upgrade:
  • Increase Spawn Rate
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Increase Spawn Rate
    • Actions
      • Set Player_UnitsSpawned[(Player number of (Owner of (Triggering unit)))] = (Player_UnitsSpawned[(Player number of (Owner of (Triggering unit)))] + 1)
And this will tell you the level:
  • (Current research level of Increase Spawn Rate for Player 1 (Red)) Equal to 1
:grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin::grin:
 
Level 5
Joined
Apr 20, 2008
Messages
150
Ok, Trigger is now:

-Events
Unit- A unit owned by (Player) Finishes an upgrade
-Conditions
(Researched Tech-Type) Equal to Lvl 1 Tank
(Current Research Level of Lvl 1 Tank for Player 1 Equal to 1
-Actions
Trigger- Turn on Steam Wreckers Red (The trigger that causes the spawn)

For some reason, no works >.>
 
Level 7
Joined
Oct 13, 2008
Messages
300
Decided to test it out, and worked quite well, if this is what you meant. You can copy this trigger if you longer need it.
 

Attachments

  • FootmenFrenzyAutospawn.w3m
    16.9 KB · Views: 52
Level 5
Joined
Apr 20, 2008
Messages
150
>.> That's one way I could have done it, yeah. I'll do a small test later to see which would be better for my map. And thank you all for your help.

EDIT:
Ok, I did as Airandius suggested, and for some reason, it is still not working how I would like it on my game >.> What could I be doing wrong?

Acti Steam Wrecker Red
-Events
>Unit- A unit owned by player 1 finishes an upgrade
-Conditions
--And-All Conditions are True
---Conditions
>Researched tech type = to Lvl 1 Tank
>Current Research level of Lvl 1 Tank = to 1
-Actions
>Trigger- Turn on Steam Wreckers Red
 
Last edited by a moderator:
Level 7
Joined
Oct 13, 2008
Messages
300
Wellz i made different trigger for Tech type change, but you don't need to use same autotrain method.
 

Attachments

  • FootmenFrenzyAutospawn.w3x
    17.3 KB · Views: 52
Level 5
Joined
Apr 20, 2008
Messages
150
*Facepalm* Fine distinction, I hates it. Well, let's see if it works now...

EDIT! It works! Hahaha!

Now to look at spawn types besides Muloc rushing and Tanks...
 
Level 5
Joined
May 20, 2008
Messages
184
But what about differen't races? Like say the player chooses to be orc like in footman wars,
and changes the building to the orc building, how can I make it so that only orcs are spawned?
 
Level 4
Joined
Oct 15, 2008
Messages
77
same as before, just make sure in your condition that you check to see which building u just switched to. and in your action be sure to turn off the spawn trigger for the units u were spawning before u switched to the other race.
 
Level 4
Joined
Oct 15, 2008
Messages
77
alright, well theres a few ways u can spawn units via upgrades. some are very complicated. some are simple. the more simple ones are not that great in quality because your map wont run good. they will work. but if u dont understand quite what your doing it will be a head ache.

one very simple way and decently effective is to make a trigger like this for every building u have

  • Spawn Footmen
    • Events
      • Time - Every 8.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (((Region centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Tier 0))) Equal to True) then do (Unit - Create 1 Footman for (Picked player) at ((Picked player) start location) facing Default building facing degrees) else do (Do nothing)
      • -------- tier 0 humans -> Footman --------
basically every 8 seconds of game time, for each player, it detects if they have that specific building on the map, if that building is there then it will spawn a unit. but like i said it will "work". what u wanna do is just go through and change (Unit - Create 1 Footman for (Picked player) at ((Picked player) start location) to what ever u want to spawn for (Random unit from (Units owned by (Picked player) of type Tier 0)))....the very last part of that bold is "TIER 0" that is the building u want to change.
 
Status
Not open for further replies.
Top