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: 457
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