Warcraft III resources & community, 2003–2006 · archived

replace spawned unit with other units

14 posts
#1

replace spawned unit with other units

Ok i got 2 triggers here...they are:

:a building is upgraded
(:town hall upgrades to castle)
:create (1) swordsmen at triggering player(s) start location
:turn off spawn foots(already existing trigger)

and the other trigger is this:

:a unit builds a new building
:building created = "knight orb"
:Create (1)Knights at triggering player(s) start location
:turn off spawn footmen(already existing trigger)
:turn off spawn swordsmen
but i want it to spawna knight ever (x) secs of course
#2
plz write in the code :D
#3
so does no one know how to do this?
#4
For ever type of unit you wanna spawn you create a periodic trigger like

Event
Every X seconds
Action
Spawn Unit For Player At Location

Then you set every trigger except the one you want to have active to inactive at beginning (right-click on the trigger in WE and choose it in the pop-up-menu)

Then you'll do a trigger like this:

:a building is upgraded
(:town hall upgrades to castle)
:turn on spawn swordman (inactive trigger)
:turn off spawn foots(already active trigger)



Another Idea is to add an boolean condition for every trigger (all trigger active at beginning):

Event
Every X seconds
Condition
Spawn This Unit = True
Action
Spawn Unit For Player At Location

with this one

:a building is upgraded
(:town hall upgrades to castle)
:set Spawn This Unit = False
:set Spawn Other Unit = True


You see that it'll require many triggers. You can shorten the amount of triggers by if/then/else-actions, but I don't wanna explain THAT all.
#5
sweet thank you, i'll give my noobish efforts a good whirl to get that trigger to work. TY
#6
Do not spam, or bump your post. When asking for help, do not expect people to write your code for you.

In short, don't be an ass.

People are very willing to help, but no one wants the forum cluttered up, and no one wants to do your work.
#7
where would i find "a building is upgraded" all i see is a unit begins upgrading , cancels upgrading, and finishes upgrading but no actual a building is upgraded
#8
Wow.

"Finishes Upgrading" is the one that does what you want.
#9
sorry Panto but how was i an ass.... :S if i was i shurly didn't mean it, and i dont think i bump i onyl did this one topic on this subject, but anyways sorry on w/e i did. :S
#10
ty panto
#11
4 the condition, where do u make the town hall upgrades to castle, is it simply town hall is equal to castle?
#12
Constructed unit equal to castle.

How many times can a ****ing person bump?
#13
I DONT GET IT! IM POSTING A REPLY IN THE SUBJECT I MADE, I'VE BEEN TALKING IN MY OWN LITTLE ROOM THINGY, SOME PPL HAVE LIKE 3 PG'S I DONT EVEN HAVE 2 SO WTF, SORRY 4 BEING GRUMPY OR JSUT PLAN CURIOUS ON HOW TO DO STUFF, I POSTED A SUBJECT AND I'VE BEEN TRYONG ON IT TO TRY TO FIND OUT HOW TO DO SUMTHING, THIS IS MAP DESCUSION SO IM REALLY REALLY CONFUSED :s
#14
I appreciate that you're frustrated. Therefore, I am not going to "warn" you for your behavior. However, here's a couple of tips.

When you have new information to add to a post, and no one has replied to that post yet, just edit your previous post and insert the new information at the end. This is to prevent the thread from continually getting "bumped" to the top of the forum.

Also, never post in all-caps. That is expressly forbidden by the site rules (which, by the way, you should read), and you would normally have been warned for doing that.

Lastly, you need to spend some time trying things out. There is way too much stuff to know about warcraft 3 for people on the forums to tell you how to do every single thing. If you're new to triggers, start playing around with a test map to see how they work. Don't come back asking for each individual line of the trigger. We're very helpful folk, and we'll *help*, but only if we feel like you've at least *tried* to do the work yourself.