Make Building to Spawn Units (was: Need help with 1 thing Please)

Malli

New Member
Reaction score
5
Ok now i am going to ask a BIG favour. DiFm helped me out allot with the trigger he gave me. But now I am wanting something quite complication that all you elites will only know! I don't even know if this can be done... After you read the previous scenario please could you help me with this:

The 2 teams (West side and East side), which are on separate ends of the map (obviously) will be making there way through 5 sets of gates/rooms, now the first room will be spawning 2 Crypt Fiends for each player on the opposing side, the players can upgrade there Town hall to upgrade the Crypt Fiends (Corresponding with the lvl) to give the opposite side a harder time. I have made 5 lvl's of Crypt Fiends and 5 lvl's of Town Halls. Now what I want to be able to do is, when they "Destroy" the first gate to move onto the second gate/room, I want the opponents Town Halls (Regardless of the lvl) to be replaced by a Keep lvl 1, which will now spawn my custom made Skeletons, and they lvl up with the corresponding lvl of the opposing sides Keep.

For example, East side has players 6, 7, 8, 9 and 10, they all start with one Town Hall lvl 1 which spawn two level 1 Crypt Fiends (per player) to West side (in room 1). Player 7 upgrades to Town Hall lvl 2, so the west side will be getting eight lvl 1 Crypt Fiends and two lvl 2 Crypt Fiends.... Still with me? :p. So all players 6, 7, 8, 9 and 10 carry on upgrading. <---- This I have done thanks to DiFm. But below is what I am asking :\

When West side go through to Gate/Room 2, I want it so all of the East side players Town Halls lvl (?) are replaced by Keeps level 1. The reason is because Skeletons spawn out of the Keep and I want gate/room 1 to be Crypt Fiends only and gate/room 2 to be Skeletons only then gate/room 3 to be Frost Wyrms only (which will require the Castle level 1, so when gate 2 is "Destroyed" it replaces the Keep level (?) with the Castle level 1.... for the corresponding team). The Creeps will spawn just in front of the gate and move towards the Generator (which when dies.... That team loses).

This is allot of numbers and I am questioning if it can even be done??... I will put your name in the Loading screen of the game (When its finally done) for anyone who helps me on this big request for help, and of coarse + rep :D


Original Message
<<=================================================================>>

Ok, I am creating a map (obviously) and there is a problem I have come across. Each player has there own Town Hall, and out of that town hall i am wanting a monster to automatically spawn from that building.... But the monster has to be what the building makes....

For example, Player 1 red has a Town Hall that creates Crypt Fiends lvl 1 (Custom Made), i want these to automatically spawn every 15 seconds.... Then he/I upgrades the Town Hall to a Keep which creates Crypt Fiends lvl 2 (Custom made) when He/I upgrade to a Keep I want it to create the Crypt Fiends lvl 2 every 15 seconds now instead of the lvl 1's.
I don't want the player to be able to manually create the Crypt Fiend. I don't think i can do this with regions, please correct me if I am wrong.

I am a VERY big newb with JASS so if it has to be done with JASS, please explain in detail, alsi if there needs to be any veriables please state them. Thank you in advance.

P.S Any other problems that I come across I will post in this thread.
Respect,

(*$malli$*)
 

BarzahdX

Active Member
Reaction score
18
Welcome to TheHelper.net!

I don't have much time, so I'll give you a premise to base your solution from.

If you have the spawn unit trigger created, the easiest way would be creating a variable to store the game mode, and make an if/then/else to spawn the proper level.

Example: GameMode = Level 1. Spawn trigger, every 15 secs, if GameMode = 1, make level 1 fiend. If GameMode = level 2, make level 2 fiend, etc, etc...

You would change the GameMode variable through another trigger when you upgrade your Town Hall, I'm sure others can explain it to you in detail.

_______

An alternative would be to make a separate trigger for each level of Town Hall, that could be an easier approach.
 

Malli

New Member
Reaction score
5
Hi Barzahd,

Thanks for the reply! I understand what you are saying, its still a little complicated though :\, I think it's because I am not good with variables. If anyone could explain in detail that would be appreciated.

I am happy to be with this forum.... I learning ALLOT.
Respect,

(*$malli$*)
 

DiFm

New Member
Reaction score
35
Oke Dont have WE now, but like this.

Map inititzialazing

set (unit type) Creep [1] = blood fiend lvl 1
set (unit type) Creep [2] = blood fiend lvl 2
set (unit type) Creep [3] = blood fiend lvl 3
Set (int) Creep Lvl = 1

Trigger 1
Event
Unit is researching

condition
research = Upgrade

action
Set (int) CreepLvl = (Creep Lvl + 1)

Trigger 2

Event
Every 15 sec

condition

action
For each integer Between Creeplvl - Creeplvl
Loop
Create 1 Creeplvl [Integer A] at position ........


Somethin Like that It is


There are a feww holes if you have more players but i dont have time atm to fill this in so could someone remake it for several players. I fill it in later if noone has done it
 

Malli

New Member
Reaction score
5
Hi DiFm,

I got up to:

>Condition
>Research = Upgrade

I dont know, it's maybe me, I will keep looking for it. Or is the "Upgrade" a variable?
Thanks very much for helping though. If there is an alternate just incase this doesn't work, someone please state it.
Respect,

(*$malli$*)
 

Denegoth

New Member
Reaction score
18
I think he means a condition like:

Research being researched Equal To <Your Upgrade>
 

Malli

New Member
Reaction score
5
Ok this is my work so far, I think most of this is wrong so that is why am posting a pic so you can see:



If you could please tell me where I went wrong that would be great (I think all of it).

*EDIT* sorry, pic had the same image twice.... changed it :)
Respect,

(*$malli$*)
 

NaPzt3R

You can change this now in User CP.
Reaction score
38
Matchting Player in the last trigger should be Picked Player and Target Point of Issued order should be Start Location of (Picked Player).
 

Malli

New Member
Reaction score
5
NaPzt3R I did what you said and kept the original and nothing happened -.-. when you start the game you already have the keep so I want it to automatically start sending the level 1 Crypt Fiends straight away, and then when you upgrade I want it to send the Level 2 Crypt Fiends instead of the level 1's.

This is what I had in the beggining, its no where near of what I wanted.... Nothing even happened with this trigger. So its scrapped. I just need the write trigger to make this work.



Thanks for all the help so far guys.
Respect,

(*$malli$*)
 

DiFm

New Member
Reaction score
35
Oke I have time now i made a map for you. This is MUI and Leakless i think been a while since i worked with the editor.

Edit: The reason the trigger didnt work last time was that when you created the units you made create Creep [1] when it should have been create Creep [Integer A]

Creep [1] will always be the same creep. But as this was Integer A = Creep LVL-Creep LVL which means if Creep lvl is 2 the Creep that will be created is Creep [Integer A and that is Creep Lvl [2]]


But i made a more simplified version thats also MUI and leakless and I've also tested it and it works.

hope It helps you.
 

Attachments

  • Spawning For Malli.w3x
    19.4 KB · Views: 71

Malli

New Member
Reaction score
5
Thank you very much for this DiFm!! You have helped allot, I will give you my first + Rep :). It works perfectly, I will test it with multiple players (on BNet) in the future when my map is more complete.
Thank you and Respect,

(*$malli$*)
 

Malli

New Member
Reaction score
5
I have a new problem.... :(, I edited the Original to prevent making another thread, (as it is very similar).

*EDIT 1*

Ok, I can get the Town hall to turn into a keep lvl 1 (but only for player red... need help for all allies of each team), but what I am really struggling with is makeing the Creeps Instantly move to a different region when the gate is Destroyed... Because the creeps appear in front of gate lvl 1 but when that gate is destroyed I want them to appear infront of gate 2.... I just cannot figure out the Trigger.

*EDIT 2*

I have thought of something.... Do you think i should make a variable array with the 5 regions in the each side? and then use that variable in a trigger? If so, could you help me out with the trigger aswell please :). I dont know how to upload maps but ill try... Have a look at my test if you have time. Thanks.

*EDIT 3*

Please close this thread I am going to make a new one on this specific point.
Respect,

(*$malli$*)
 

Attachments

  • Shop spawn test.w3x
    24.3 KB · Views: 455
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