wc3edit.net
https://forum.wc3edit.net/

Help) I want to make the raid boss respawn ..
https://forum.wc3edit.net/deprotection-cheating-f64/help-i-want-to-make-the-raid-boss-respawn-t37903.html
Page 1 of 1

Author:  e34652 [ April 21st, 2021, 6:33 pm ]
Post subject:  Help) I want to make the raid boss respawn ..

These days, I revised a map with useful guides.(drop rate , respawn time , exp rate)
But In this map, there are many raid bosses which don't respawn.
So everytime I kill the boss I should restart the map.
It is so uncomfortable..
So I hope to learn how to add respawn timer and where I should add the code..
Help me !!!

I attached j files and the map that I revised.
Thank you for reading.

+The bosses name
Green/Bronze/Blue/Red/Black_dragon (g b b r dragons respawn after 10 mins but black dragon doesn't)
Nightmare / Naga / Ice_witch / Death_knight / Fire_lord / Four_season / Magic_god / Clovis

Author:  owner123 [ April 23rd, 2021, 11:12 pm ]
Post subject:  Re: Help) I want to make the raid boss respawn ..

First, find the Unit ID of the boss you want to respawn. To get this, extract the war3map.w3u and search for the unit, and display rawcodes, write down the one you find.

Search the war3map.j and find where the boss drops/actions/etc are handled. There are a couple ways this could be done. The first way it could be done is to assign the boss to a Unit variable when the boss is created, and then hardcode each boss function to use this variable. Or they could use a generic Unit event and check that GetUnitTypeId(GetTriggerUnit()) == 'rawcode'. Which method they use will impact how you code the respawn functionality.

Find the death event for that specific unit or unit type. This will also probably be where it drops the items, so you can search for one of the item rawcode/ID and do a search on it to find this if you want. At the very end of the death function for that unit, call a PolledWait(30) or however long you want to wait, then call CreateUnit for the type of the boss that died. For a very basic one, you can respawn the boss at the same location he died by storing the x and y coordinates in a local variable with GetUnitX(unit) and GetUnitY(unit). You also need to manage whatever triggers were linked to this boss. If it's coded generically and uses Unit IDs, then you won't need to do anything. If it uses a specific trigger created for ONLY that boss, then you need to remake those triggers again.

From here, you can get more advanced by using the original location of the boss, rather than the location where it died. You can also add a Timer and a TimerWindow for a respawn delay, but this will be significantly harder.

Author:  Bertix [ April 24th, 2021, 9:51 am ]
Post subject:  Re: Help) I want to make the raid boss respawn ..

Or just try to add JJCP cheat pack then select that black dragon and write -stop -invul to make him invulerable and paused (if he too big write -size 100 or how much you want)
After that just write -copy and you get another dragon which you can kill and get drop but if map maker did another drop system it can be buggy or not work but it almost always work

I think its much easier than adding other respawn triggers

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/