View Full Version : Creep Respawn (GUI)
SkriK
04-13-2008, 11:05 PM
Creep Respawn (GUI) - Difficulty: 3/10
-------------------------
Introduction
This tutorial explains how to make units owned by a certain player to respawn at their original position after a given amount of time.
The Tutorial
-------------------------
Setup
There are a few things you'll need to set up. Let's begin with the variables.
Variables
- Open your Trigger Editor and press CTRL+B to open the variable manager.
- While there press CTRL+N to create a new variable.
- Set "Variable Type" to Integer and set "Variable Name" to Temp_Integer. Then press OK.
- Press CTRL+N again to create another variable. Set this one's variable type to Point and name it Creep_Point. In this one, you'll also check the [ ] Array field for the variable. Then press OK.
- One last time, press CTRL+N to create a new variable. Set it's type to Real and name it Respawn_Time. Then press OK.
By now, you should have these 3 variables:
http://www.hiveworkshop.com/forums/attachment.php?attachmentid=26826&stc=1&d=1208126562
The Map
Now, to respawn units you'll need some units. So go ahead and place some units on your map. Set these unit's owner to Neutral Hostile.
-------------------------
Triggers
Initialization
We'll start off with the Map Initialization trigger, which are the triggers that are run when the map has finished loading.
Map Initialization
Events
Map initialization
Conditions
Actions
Set Respawn_Time = 5.00
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set Temp_Integer = (Temp_Integer + 1)
Unit - Set the custom value of (Picked unit) to Temp_Integer
Set Creep_Point[Temp_Integer] = (Position of (Picked unit))
By doing this you stored the position for all units owned by Neutral Hostile into the variable you created which will be used to respawn the unit at that location.
Note: The amount you set for Respawn_Time is how long the next trigger will wait before respawning the unit.
The Respawn
Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
Actions
Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
Wait Respawn_Time game-time seconds
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
Actions
Wait Respawn_Time game-time seconds
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Point[(Custom value of (Triggering unit))] facing Default building facing (270.0) degrees
Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
Adding a creep to Respawn
To add creeps, that are spawned during the game's progress, to the "Respawn" trigger you'll have to make this trigger:
Add Creep to Respawn
Events
Unit - A unit enters (Playable map area)
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
Actions
Set Temp_Integer = (Temp_Integer + 1)
Unit - Set the custom value of (Triggering unit) to Temp_Integer
Set Creep_Point[Temp_Integer] = (Position of (Triggering unit))
And that's that! All finished.
In conclusion: This will make a unit owned by Neutral Hostile that dies respawn at it's original position after a set amount of time.
Footnote
This system has only been tested in a small scale and I am totally unaware of leaks, so if anyone could point them out it would be appreciated.
Please comment and criticize the content and be picky about grammar and spelling errors, i don't want it to be faulty.
-------------------------
Hope it was useful! And hope it hasn't been done before! Over and out. ~SkriK
underscore
04-14-2008, 01:18 AM
Cancel the signature and there's already a creep revival here.
SkriK
04-14-2008, 01:24 AM
Done and awww :<
PurplePoot
04-21-2008, 01:27 PM
there's already a creep revival here.Could you please provide a link? Search yields no such systems except this one.
underscore
04-22-2008, 01:13 AM
This? (http://www.hiveworkshop.com/forums/showthread.php?t=32436)
Or maybe I was wrong .... :confused:
PurplePoot
04-22-2008, 01:51 AM
No, that's for making spawns for TDs, etc, so I think this one is a first of the type.
underscore
04-22-2008, 03:55 AM
Oh... First Type
ElectricSaiyan
04-23-2008, 12:08 AM
Couldn't you just use a wait timer and then use Replace Unit - Dying Unit with Type of Dying Unit??
PurplePoot
04-28-2008, 01:09 PM
Late reply, but this replaces them where they started, not where they died.
SkriK
05-01-2008, 06:42 PM
Oooo, so it wasn't a rerun? What can i do to get it aproved?
PurplePoot
05-02-2008, 04:42 AM
I'll review this tomorrow morning, assuming I don't forget, and assuming I have nothing to do in computer engineering (Otherwise, tomorrow afternoon).
EDIT: Here we go
Respawn_Time isn't really needed, just inline it.
(Triggering Unit) is generally more stable than (Dying Unit), especially after waits. I suggest you use that.
You should store the unit type and custom value of the dying unit in locals before the wait, so that if the respawn time is longer than the decay time it still works.
PolledWait should be used (Wait x Game-Time Seconds) as it factors in Pause Game.
Perhaps add a function to add a new unit to the list of ones that respawn? If you don't know Jass, here's one that would work;
function AddUnitToRespawn takes unit whichUnit returns nothing
set udg_Temp_Integer = udg_Temp_Integer + 1
call SetUnitUserData(whichUnit,udg_Temp_Integer)
set udg_Creep_Point[udg_Temp_Integer] = GetUnitLoc(whichUnit)
endfunction
Neutral hostile units with Custom Value 0 (no respawn point) should not be attempted to revive (this will cause them to appear in the middle of the map).
SkriK
05-14-2008, 12:36 AM
I'll review this tomorrow morning, assuming I don't forget, and assuming I have nothing to do in computer engineering (Otherwise, tomorrow afternoon).
EDIT: Here we go
[1]Respawn_Time isn't really needed, just inline it.
[2](Triggering Unit) is generally more stable than (Dying Unit), especially after waits. I suggest you use that.
[3]You should store the unit type and custom value of the dying unit in locals before the wait, so that if the respawn time is longer than the decay time it still works.
[4]PolledWait should be used (Wait x Game-Time Seconds) as it factors in Pause Game.
[5]Perhaps add a function to add a new unit to the list of ones that respawn? If you don't know Jass, here's one that would work;
function AddUnitToRespawn takes unit whichUnit returns nothing
set udg_Temp_Integer = udg_Temp_Integer + 1
call SetUnitUserData(whichUnit,udg_Temp_Integer)
set udg_Creep_Point[udg_Temp_Integer] = GetUnitLoc(whichUnit)
endfunction
[6]Neutral hostile units with Custom Value 0 (no respawn point) should not be attempted to revive (this will cause them to appear in the middle of the map).
1: Sorry, but what does "Inline" mean? (Triggerwise)
2: Fixed
3: Locals? Is that variables that are cleared using custom text after being used?
4: Fixed
5: Done:
Unit - Create 1 Footman for Neutral Hostile at (The Point You Selected)) facing Default building facing (270.0) degrees
Set Temp_Integer = (Temp_Integer + 1)
Unit - Set the custom value of (Last created unit) to Temp_Integer
Set Creep_Point[Temp_Integer] = (Position of (Last created unit))
6: It is set to 1 before storing the first unit.
Will add triggers to the tut once you confirm they're correct.
PurplePoot
05-14-2008, 01:27 PM
1: Sorry, but what does "Inline" mean? (Triggerwise)Get rid of the constant and sub in its value wherever it is used (since this is only used in one, easily accessible place).
3: Locals? Is that variables that are cleared using custom text after being used?Jass only (though you can accomplish them via "Custom Script"), they are variables which pertain only to a specific instance of a specific function.
There is even a trick to make them usable in GUI.
Basically, while this will require Custom scripts for the trigger, it will fix the potential mentioned bug. You would change your death trigger to (This form also fixes said bug):
I added comments to explain what's going on
Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering Unit)) Greater than 0
Actions
Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
-------- The previous line declares a new local integer, i, which is equal to the type of the dying unit --------
Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
-------- The previous line declares a new local integer, ii, which is equal to the custom value of the dying unit --------
Wait Respawn_Time seconds
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
-------- The previous line creates a new unit for neutral hostile at the old respawn point of the old type, and sets its custom value to the value of the old unit --------
6: It is set to 1 before storing the first unit.But some (that aren't initialized with this sytem) won't have it and will bug, which would be fixed by a simple condition.
Lestat(br)
06-09-2008, 11:05 PM
A tip for the ones who wants to put a individual respawn time for each unit-type:
Instead of:
Wait Respawn_Time seconds
Put:
Wait (Real((Point-Value of (Triggering unit)))) seconds
And in the Unit Editor change the Point-Value for this unit-type.
PurplePoot
06-10-2008, 02:10 AM
Speaking of which, Wait Game-Time Seconds should be used to prevent bugs.
Also, is this going to be updated?
SkriK
06-12-2008, 12:49 AM
Yeah, i will update it. Just been a bit busy/lazy lately.
Oziris
06-17-2008, 07:37 AM
i dont know how to do the second part:
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
i cant find it....
PurplePoot
06-17-2008, 12:49 PM
Integer Comparison, then inside it, (Custom Value of Unit)
onix_noob
08-14-2008, 05:54 PM
thank you for the great trigger +rep for the good work:grin: i found a problem why maximum wait time in all trigger of this type can be around 60-100 seconds when i add wait 320 seconds trigger even don't run why this happen??
PurplePoot
08-21-2008, 10:27 PM
Fixed a few typos, and approved.
SkriK
08-21-2008, 11:15 PM
Fixed a few typos, and approved.
Great! Thank you ^^
Shampoohero
08-22-2008, 05:11 PM
Well, i did what i was supposed to do in your tutorial but when i tested it out the the spawn doubled. Ex: 1,2,4,8 etc.
nvm i got it fixed i found out what i did wrong
oXReapeRXo
09-05-2008, 09:48 AM
+rep, I needed that thanks
RiskDude
12-28-2008, 11:39 AM
a little problem here, i made everything like in tutorial and ingame the respawn time is something like Unit - A unit Dies, Action - Immediatelly Respawn :| and i made every thing like in the tut
marbib
01-11-2009, 05:21 AM
omg how do we do the "loop action "section ???????????????????
SkriK
01-11-2009, 07:14 AM
Loop??
leet.firefox
01-12-2009, 11:49 PM
omg how do we do the "loop action "section ???????????????????
Unit Group - Pick Every Unit In Unit Group And Do Multiple Actions
SkriK
01-13-2009, 03:49 PM
You need all the variables set up before doing it.
Davdav2
02-02-2009, 06:40 PM
???? I understood... NOTHING! BLARGH! Damn, i hate variables...
Kruing
02-08-2009, 12:42 PM
Hey, im having problems with the condition:
(Custom Value of (Triggering unit)) Greater than 0
So please anyone help? :)
kirtap1001
02-18-2009, 03:03 PM
Thanx It works Great! Perfect to my RPG game... :D
kirtap1001
02-18-2009, 03:09 PM
Hey, im having problems with the condition:
(Custom Value of (Triggering unit)) Greater than 0
So please anyone help? :)
GO to New Condition.
Scroll Down to "Integer Comparison".
Then Klick on "(Number of units in(Units in(Playable map Area)))"
Scroll Down to "Unit-Custom value of unit"
Then i think you can get the rest. :gg:
Serefkana
02-20-2009, 04:40 PM
Thanks for this respawn trigger, mine respawned where the creep died(not good if its pulled XD )
+rep :)
1question, what exactly is "custom value"? is that like a predefined variable all units have that is defaulted to 0?
Kruing
02-27-2009, 08:13 PM
GO to New Condition.
Scroll Down to "Integer Comparison".
Then Klick on "(Number of units in(Units in(Playable map Area)))"
Scroll Down to "Unit-Custom value of unit"
Then i think you can get the rest. :gg:
Really big thanks :grin:
TheBlooddancer
02-27-2009, 08:41 PM
You could say so.
The custom value is null to start out with, and if sat it keeps staying like that untill changed.
You cay that custom value is an integer(or real) assigned to a unit.
Slaydon
03-10-2009, 12:26 PM
Possible to make it respawn th place they are dying in?
PsychoNerdial
03-28-2009, 08:50 AM
Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering Unit)) Greater than 0
Actions
Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
-------- The previous line declares a new local integer, i, which is equal to the type of the dying unit --------
Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
-------- The previous line declares a new local integer, ii, which is equal to the custom value of the dying unit --------
Wait Respawn_Time seconds
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
-------- The previous line creates a new unit for neutral hostile at the old respawn point of the old type, and sets its custom value to the value of the old unit --------
But some (that aren't initialized with this sytem) won't have it and will bug, which would be fixed by a simple condition.
But isn't only possible to set 1 local in every trigger in GUI?
magerox
04-07-2009, 12:52 PM
Where can I find
Unit - Set the custom value of (Picked unit) to Temp_Integer
Help me please, thanks.
FriXionX
04-07-2009, 04:33 PM
Unit - Set Custom Value
Then just change the red 'Unit' to (Picked Unit) and change the 0 to Temp_Integer (Variable)
magerox
04-08-2009, 05:53 AM
Unit - Set Custom Value
Then just change the red 'Unit' to (Picked Unit) and change the 0 to Temp_Integer (Variable)
Thanks for telling me, World Editor should make all "Unit - Set" together so it can be found easily.
Asgard_Ragna
04-17-2009, 06:58 PM
But isn't only possible to set 1 local in every trigger in GUI?
Just if u use custom script to localize Global Variables...at least as far as I know.
medion555
05-04-2009, 02:55 PM
How do i get the do actions i cant get it. thx
Animoi666
05-06-2009, 06:55 AM
Thanx for the first post for the respawn system SkriK, really helped me out with my orpg map. :thumbs_up:
just a question:
is it possible to make them respawn facing the same angle as when they were placed? :confused:
ifso please post the triggers :mwahaha:
ofc +Rep is given! :cute:
Dr. Boom
05-09-2009, 09:17 AM
Seas =)
First: Ofc +rep =)
Second: But i got a problem with:
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270,ii)
Always shown up a syntax Error from Jass Helper. I looked over it some times, but I cant find any mistake. Are I'm blind or can I ignore this - because the trigger doesn't turn off.
Goffterdom
05-24-2009, 07:35 PM
Tip: for those who want to improve the respawning system :
Just add another variable "Creep_Facing" (Real, Array on).
Groupe unité - Pick every unit in (Units in (Playable map area) owned by Neutre Hostile) and do (Actions)
Boucle - Actions
-->
Set Creep_Face[Temp_Integer] = (Facing of (Picked unit))
Then change the trigger when the unit dies.
Unité - Create 1 (Unit-type of (Triggering unit)) for Neutre Hostile at Creep_Point[(Custom value of (Triggering unit))] facing Creep_Face[(Custom value of (Triggering unit))] degrees
xxALMIRxxx
06-01-2009, 04:28 PM
[QUOTE=SkriK;592607][COLOR="SandyBrown"]Creep Respawn (GUI)
-------------------------
[can you make a map with that tiggers , cuz I´m noobb and i cant make it by my own so be nice and make an map with that trigger in it :grin:
i hope you gonna help me :thumbs_up:
togera90
06-07-2009, 08:53 PM
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
there no way to do that
you cant add the "owned by neautral hostile" i dont see a way to do that
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
i suck at conditions can u tell me where to find those?
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
can you tell me how to get to those?
baseball12@epix.net
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
forget about those other comments i needed help on i figured them out because im smart...but that custom script up there -----^ isnt letting me enable my trigger any help?
and it didnt work for me anyone :[
swe.kill
06-08-2009, 02:17 PM
hey how i get the things i write to the other menu ???? i have testad evrything please help!
how i get the variables to triggers plese help :)
Bwathke
06-20-2009, 08:56 PM
Does not work at all :/ sorry to tell you...........
zarock
06-28-2009, 06:48 AM
i dont know why but i did all thatt it says in the totorail but it dosnt work at all
Zalashji
07-17-2009, 06:31 PM
Zomg? How to create that action called ''Loop Actions''.
Sorry, i'm noob at World.Editor :necry:.
Tell me or i'll kill ya :nemad:!
http://werewolves.files.wordpress.com/2009/04/american-werewolf-in-london-lifesize-2.jpg
Arthaz
07-18-2009, 10:55 PM
Great turtorial it help me with my Rpg i'm working on it was really simple to anderstand 5/5
o2bryan
07-19-2009, 08:14 AM
how to change Neutral Hostile to Player 1??
Championx1x
08-03-2009, 09:03 PM
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Point[(Custom value of (Triggering unit))] facing Default building facing (270.0) degrees. Can you help I can not find Creep_Point[(Custom value of (Triggering unit))] I found the right action I just can't find the custom value.
China-Man
08-26-2009, 04:13 PM
call SetUnitUserData(CreateUnit(Player(12) , i , GetLocationX(udg_Creep_Point[ii]) , GetLocationY(udg_Creep_Point[ii]) , 270) , ii)
At this Custom Script my jass said:
Undeclared variable udg_Creep_Point
can someone help me :?
SkriK
08-27-2009, 07:45 PM
Custom value is an integer.
Diehard@Azeroth
08-28-2009, 07:48 AM
I have a really important suggestion, store the x and y intercepts of the unit instead of using locations. Cheers, and good job on tut ^^
Oxifire
08-30-2009, 05:15 PM
in the last line of the initialization trigger, how do you get [temp_point] after the first variable?
Troynl
09-29-2009, 07:23 PM
call SetUnitUserData(CreateUnit(Player(12) , i , GetLocationX(udg_Creep_Point[ii]) , GetLocationY(udg_Creep_Point[ii]) , 270) , ii)
doesn't work for me 2.
and when i use the Standard Triggering 1
they don't respam when i kill a neutral hostle unit.
luke10050
10-03-2009, 08:37 PM
where do you get the neutral hostile part of the command line for the respawn thinggy (thanks in advance)
hapykiller999999
10-08-2009, 11:07 AM
Does here have any basic for RPG creep spawning this one not work i done as u say,not working.....
Xx Rome xX
10-18-2009, 04:38 AM
How do you add the +1 at the top, where you set the Temp_Integer? I see that in alot of these tutorials, but I can't figure out how to make it work. :cry:
luke10050
10-19-2009, 07:26 PM
it is arithmetic. so go set variable and set the other part... then click on the second part and set it to arithmetic. from there click on the first part set it as a variable (the top box) and then go back and to the next box. these next two are easy. the second box is a preset value (the only option you can choose) and then put in the third box the value (bottom box) 1
hope it solves your problems
Xx Rome xX
10-21-2009, 04:45 PM
Thanks, it looks complicated, but I will try it. :cute:
EDIT: Yeah, it worked, thanks. :smile:
Troynl
10-21-2009, 05:36 PM
i don't get it what do i have to do?
luke10050
11-03-2009, 05:58 AM
would you like a complete description or basic?
angelwarrior
11-10-2009, 05:20 PM
hi i have problem, i did everything in tutorial-except variable creep point
I set variable type to "point" then name to "Creep_Point" but in your screen under variables is:
Creep_Point point(location)arr... -None-
i have only this
Creep_Point point(location)1 -None-
i did EVERYTHING in the tutorial but it doesnt work, i have czech version of warcraft so it is a little more complicated to translate it to english but i did everything like in tut..
Please anyone help??
Troynl
11-10-2009, 06:58 PM
would you like a complete description or basic?
eeh i fear a compleat 1 is usefull :con::bored:
Bugbuster96
11-11-2009, 05:44 PM
Awesome! Simple and useful. Thank you very much. This will be great for my RPG. +Rep
P.S. Make a Demo map of this creep respawn system for the noobs (Beginers).
SECONDHEARTBEAT
11-14-2009, 09:27 PM
I've made other script to respawn :
Events
- Unit - A unit Dies
Conditions
- (Owner of (Triggering unit)) Equal to Neutral Hostile
Actions
- If (All Conditions Are True) then do (Then Actions) else do (Else Actions)
Loop Actions
- Wait 360 seconds
- Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Histile at (position of (Triggering unit)) facing Default building facing (270.0) degrees
- Unit - Set the custom value of (Last created unit) to (custom value of (Triggering unit))
It works :D Try :)
xFiReFoXx
11-17-2009, 04:45 AM
This system doesn't work for me (not talking about secondheartbeat's, but the main system..) When i kill them, i wait and wait and wait and nothing happens ._.
Balnazzar22
11-18-2009, 10:22 PM
This bugs up if the dying unit is a hero
kennyman94
12-07-2009, 04:41 AM
in jass how is there a player 12? i thought it was only player 0-11.
luke10050
12-12-2009, 09:02 PM
i will send you a copy of the completed script
(referring to troynl)
killbuzz
12-24-2009, 06:13 AM
Ok, so this is a good system and all, but I was wondering how do you make it so that if you have an enemy of the creep nearby, it wont respawn until that enemy leaves the area (including buildings) I've tried a bunch of different ways and got mixed results, sometimes warcraft would just crash and others it would just stop reviving the unit altogether if I was nearby at the end of the time limit.
Archange1
01-01-2010, 03:37 AM
I will give you some feedback on how I feel about this tutorial. (for fun).
[x] Easy to understand. (opinions may vary).
[x] Works effectively with few problems if any.
[x] Helps with the specified system.
[x] Easy to locate. (triggerwise).
[x] Requires little effort.
Results:
' 5/5 ' - Has few errors, all in all: a great tutorial.
Aslit
02-27-2010, 07:53 PM
Unidad - A unit owned by Neutral hostil Muere
Acciones
Wait 900.00 seconds
Unidad - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using La nueva falta de la unidad life and mana
kennyman94
03-05-2010, 01:28 PM
Ok, so this is a good system and all, but I was wondering how do you make it so that if you have an enemy of the creep nearby, it wont respawn until that enemy leaves the area (including buildings) I've tried a bunch of different ways and got mixed results, sometimes warcraft would just crash and others it would just stop reviving the unit altogether if I was nearby at the end of the time limit.
try using the action: Wait For Condition
chrisist
03-07-2010, 09:16 PM
wow great tut man
goog job +rep
Animoi666
04-18-2010, 10:57 AM
at first this worked all fine with my map, but now since i've made a new area and made some new custom units for neutral hostiles it messes up a little.
1. it DOES respawn all neutral hostiles that were already there...
2. it DOES NOT respawn all neutral hostiles that im adding now in mad editor....
could this be due to unit type/lvl/class/stat ?
idk what happened or why, but please help me.... :cry:
--------EDIT---------------------
i found out why >_>
the units :
"combat - death type" stat, Must be like this: "Combat - death type: Can raise, Does decay".
otherwise the unit wouldnt really die or something, causing it to bug triggerwise.
when creating custom neutral hostiles, based on skeletons or infernals or something, their standard values are put on, "Combat - death type: Can't rais, Doesn't decay"
Which is what caused it to bug with my map, I hope other people will find this usefull when finding the same problems
12sea21
04-25-2010, 12:50 AM
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
it says Error: Expected a name
And thank you Animoi
12sea21
04-29-2010, 10:22 AM
EVERY ONE ASKED THAT QUESTION! AND NO ONE SEEMED TO ANSWER!!!!!!!!!!! SO PLEASE SOMEONE!!
I was reduced to using caps!
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
MortAr
06-06-2010, 02:39 PM
Providing simple test-map will most likely answer the questions in all 5 pages.
Animalpower
06-14-2010, 04:45 PM
This is useful for my Spore project,so that can respawn creatures.
I have a cheat!
You copy the all creep respawn folders in triggers paste anywhere in it then change the owner to neutral passive,a creature like dolphin won't attack you when respawned and unit like reef shark previously passive will become hostile
both will turn owner to neutral passive!
Im sure this helped CRITTER RESPAWN FOR MORE HINTS JOIN MY PROJECT
MY MAPS ARE PROFFESIONAL.FROM CELL STAGE TO SPACE STAGE
XAlexX
06-17-2010, 01:45 PM
Hey...I'll ask something (srry if i did not read all the post--they're a lot....took 1 hr and 1/2 to read and understand the first 3 pages....)
How i make a monster respawn but in same time the newly respawned creep will drop the items i want....like Roshan in DotA
I hope you'll understand what i wrote......my english is rly bad...
Animalpower
06-18-2010, 02:48 PM
Sorry i mentioned (both will turn owner to neutral passive!) I meant neutral hostile.
After critter or creep that is neutral hostile,if it's killed you will be hostile to the creep that has previously be neutral passive and creep also will attack.If it's critter it won't attack but the player will
XAlexX
06-20-2010, 06:09 PM
:fp:Still waiting answer......:sad:
Animalpower
06-21-2010, 04:17 PM
Hey...I'll ask something (srry if i did not read all the post--they're a lot....took 1 hr and 1/2 to read and understand the first 3 pages....)
How i make a monster respawn but in same time the newly respawned creep will drop the items i want....like Roshan in DotA
I hope you'll understand what i wrote......my english is rly bad...
:fp: I wait for answers... :slp:
Haven't tried that,test on your own I need that also for the creature respawn,every time the creature dies it has meat,but it's easy to me.
I don't remember
XAlexX
06-22-2010, 07:47 AM
Haven't tried that,test on your own I need that also for the creature respawn,every time the creature dies it has meat,but it's easy to me.
I don't remember
Animalpower, I'm kinda noob at triggering so I don't know how to "test on my own"...(the only thing i know about triggering is sample creature respawn and game message adding....:sad:):croll:
I need a post with a screenshot trigger that shows me how i do that
Animalpower
06-22-2010, 05:27 PM
Animalpower, I'm kinda noob at triggering so I don't know how to "test on my own"...(the only thing i know about triggering is sample creature respawn and game message adding....:sad:):croll:
I need a post with a screenshot trigger that shows me how i do that
Im going to test later maybe tommorow.
gaby-boy
06-24-2010, 11:55 AM
This is a better Creep Respawn systeme :
Déclencheur sans titre 001
Events
Map initialization
Conditions
Actions
Set Creep_Group = (Units owned by Neutre Hostile)
Set Creep_Effects = Abilities\Spells\Items\AIre\AIreTarget.mdl
Unit Group - Pick every unit in Creep_Group and do (Actions)
Loop - Actions
Set Creep_Index[1] = (Creep_Index[1] + 1)
Set Creep_Unit[Creep_Index[1]] = (Picked unit)
Set Creep_Loc[Creep_Index[1]] = (Position of Creep_Unit[Creep_Index[1]])
Custom script: call DestroyGroup(udg_Creep_Group)
Déclencheur sans titre 002
Events
Unit - A unit owned by Neutre Hostile Meurt
Conditions
Actions
Wait 5.00 seconds
For each (Integer Creep_Index[2]) from 1 to Creep_Index[1], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dying unit) Equal To Creep_Unit[Creep_Index[2]]
Then - Actions
Unit - Create 1 (Unit-type of (Dying unit)) for Neutre Hostile at Creep_Loc[Creep_Index[2]] facing 0.00
Special Effect - Create a special effect at Creep_Loc[Creep_Index[2]] using Creep_Effects
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_Creep_Loc[udg_Creep_Index[2]] )
Set Creep_Unit[Creep_Index[2]] = (Last created unit)
Set Creep_Loc[Creep_Index[2]] = (Position of Creep_Unit[Creep_Index[2]])
Else - Actions
[X] No Leaks (I thinks)
[X] 2 Triggers
[X] With Respawn Effect:grin:
Animoi666
06-24-2010, 03:10 PM
Hey...I'll ask something (srry if i did not read all the post--they're a lot....took 1 hr and 1/2 to read and understand the first 3 pages....)
How i make a monster respawn but in same time the newly respawned creep will drop the items i want....like Roshan in DotA
I hope you'll understand what i wrote......my english is rly bad...
Event:
Unit - A Unit Dies
Conditions:
(Owner of Dying Unit)) Equal to Neutral Hostile
(Custom Value of (Dying Unit)) Greater than 0
Actions:
If (All Conditions are true) then do (Then Actions) else do (Else Actions)
If - Conditions:
(Unit type of (Dying unit)) Equal to MonsterYouWant
Then - Actions:
Item - Create (ItemYouWant) at (Position of Dying Unit)
Else - Actions:
Leave This Empty
Is this What you Wanted XAlexX? or did you also want a certain x% chance for item drops? , anyhow, repeat the "If/Then/Else" section for all different kinds item droppers.
This is a better Creep Respawn systeme :
Déclencheur sans titre 001
Events
Map initialization
Conditions
Actions
Set Creep_Group = (Units owned by Neutre Hostile)
Set Creep_Effects = Abilities\Spells\Items\AIre\AIreTarget.mdl
Unit Group - Pick every unit in Creep_Group and do (Actions)
Loop - Actions
Set Creep_Index[1] = (Creep_Index[1] + 1)
Set Creep_Unit[Creep_Index[1]] = (Picked unit)
Set Creep_Loc[Creep_Index[1]] = (Position of Creep_Unit[Creep_Index[1]])
Custom script: call DestroyGroup(udg_Creep_Group)
Déclencheur sans titre 002
Events
Unit - A unit owned by Neutre Hostile Meurt
Conditions
Actions
Wait 5.00 seconds
For each (Integer Creep_Index[2]) from 1 to Creep_Index[1], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dying unit) Equal To Creep_Unit[Creep_Index[2]]
Then - Actions
Unit - Create 1 (Unit-type of (Dying unit)) for Neutre Hostile at Creep_Loc[Creep_Index[2]] facing 0.00
Special Effect - Create a special effect at Creep_Loc[Creep_Index[2]] using Creep_Effects
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_Creep_Loc[udg_Creep_Index[2]] )
Set Creep_Unit[Creep_Index[2]] = (Last created unit)
Set Creep_Loc[Creep_Index[2]] = (Position of Creep_Unit[Creep_Index[2]])
Else - Actions
[X] No Leaks (I thinks)
[X] 2 Triggers
[X] With Respawn Effect:grin:
Gaby, This System does EXACTLY the same. except that it adds un-needed special effects, and that it uses alot of unnessecary triggers.
This would also be difficult to understand for someone who is new to Wc3 WE.
phoenixfire
07-15-2010, 06:38 PM
How do I make them respawn at the angle they were at before?
Squall_Leonheart
08-16-2010, 02:36 AM
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
it says Error: Expected a name
If you're using GUI, then just copy the entire code, without the "Custom Script:" it's that simple. :)
Example: Ctrl+C this whole coding & Ctrl+V in your Custom Script blank area... SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Hope this helps, Im not good in jass. so someone else would have to do that.
Tha Flamestorm
08-16-2010, 04:51 AM
its totaly possible to do this without triggering, just have massive delay on reincarnation and add it to all units o.O
Animoi666
08-16-2010, 07:42 PM
its totaly possible to do this without triggering, just have massive delay on reincarnation and add it to all units o.O
that way, the units wouldn't have "Died", no exp will be added to the killing unit, nor will the owner of the killing unit get gold from neutral hostile kills.
apart from that, they wont respawn at the spot they started from.
How do I make them respawn at the angle they were at before?
Read the older comments, as this has already been answered to.
Squall_Leonheart
08-18-2010, 10:11 AM
A fine trigger, except i found out, 1 thing.... u cant spawn creep at initialization with this trigger. It'll bug the system horribly, but i discovered another better method by modifying the trigger in a slight way like this:
1st, u can setup a trigger spawn, and run in on map initialization, like this:
Map initialization
Events
Map initialization
Conditions
Actions
Set Respawn_Time = 300.00
Trigger - Run Neutral Spawn <gen> (checking conditions)
setup:
Neutral Spawn
Events
Conditions
Actions
Trigger - Turn on Add Creeps to Respawn <gen>
Trigger - Turn on Respawn <gen>
Trigger - Turn on Respawning BUG KILL <gen>
-------- early spawns --------
Unit - Create 2 Bandit for Neutral Hostile at (Center of bandits7 <gen>) facing 150.00 degrees
-------- sewer --------
Unit - Create 3 Leech Hatchling for Neutral Hostile at (Center of giant leech <gen>) facing 150.00 degrees
Unit - Create 2 Rogue for Neutral Hostile at (Center of Region 140 <gen>) facing 150.00 degrees
-------- bandit's cave --------
Unit - Create 3 Bandit for Neutral Hostile at (Center of Region 187 <gen>) facing 150.00 degrees
Unit - Create 3 Bandit for Neutral Hostile at (Center of Region 188 <gen>) facing 150.00 degrees
Unit - Create 2 Brigand for Neutral Hostile at (Center of Region 182 <gen>) facing 150.00 degrees
Unit - Create 4 Brigand for Neutral Hostile at (Center of Region 181 <gen>) facing 150.00 degrees
Unit - Create 4 Brigand for Neutral Hostile at (Center of Region 175 <gen>) facing 150.00 degrees
thn:
Add Creeps to Respawn
Events
Unit - A unit enters (Playable map area)
Conditions
(Owner of (Entering unit)) Equal to Neutral Hostile
Actions
Set Temp_Integer = (Temp_Integer + 1)
Unit - Set the custom value of (Triggering unit) to Temp_Integer
Set Creep_Point[Temp_Integer] = (Position of (Triggering unit))
thn:
Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom value of (Triggering unit)) Greater than 0
Actions
Wait Respawn_Time seconds
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Point[Temp_Integer] facing 270.00 degrees
Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
finally:
Respawning BUG KILL
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom value of (Triggering unit)) Greater than 0
Actions
Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
Wait Respawn_Time seconds
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
all the trigger set to initially not on, except neutral spawn & map initialization.
thats all. n it works beautifully, credits to SkriK.
+rep
Squall_Leonheart
08-18-2010, 10:38 AM
Event:
Unit - A Unit Dies
Conditions:
(Owner of Dying Unit)) Equal to Neutral Hostile
(Custom Value of (Dying Unit)) Greater than 0
Actions:
If (All Conditions are true) then do (Then Actions) else do (Else Actions)
If - Conditions:
(Unit type of (Dying unit)) Equal to MonsterYouWant
Then - Actions:
Item - Create (ItemYouWant) at (Position of Dying Unit)
Else - Actions:
Leave This Empty
Is this What you Wanted XAlexX? or did you also want a certain x% chance for item drops? , anyhow, repeat the "If/Then/Else" section for all different kinds item droppers.
Gaby, This System does EXACTLY the same. except that it adds un-needed special effects, and that it uses alot of unnessecary triggers.
This would also be difficult to understand for someone who is new to Wc3 WE.
If you want random a set of items from the dying unit, giving them a chance to drop, you can try this:
Kill nuetral for food
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
((Triggering unit) is A Hero) Not equal to True
Actions
Set UTFOODPT = (Position of (Triggering unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 1
Then - Actions
Item - Create Raw Meat at UTFOODPT
Custom script: call RemoveLocation(udg_UTFOODPT)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 3
Then - Actions
Item - Create Raw Fish at UTFOODPT
Custom script: call RemoveLocation(udg_UTFOODPT)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 10) Equal to 5
Then - Actions
Item - Create Ration at UTFOODPT
Custom script: call RemoveLocation(udg_UTFOODPT)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Item - Create Rotten Meat at UTFOODPT
Custom script: call RemoveLocation(udg_UTFOODPT)
Else - Actions
Custom script: call RemoveLocation(udg_UTFOODPT)
always remember to remove the leaks.
mindwarper06
08-23-2010, 11:23 PM
Im not sure if anyone checks here anymore but...I cant seem to get this to work, I did everything correctly(even to the point of setting respawn time to what was used as example 5, though when I do get it to work, It will be longer), I tried bot the standard and custom script way, but neither respawns the units after they die...
Is this a flaw of the latest update breaking the coding, or what? I guess not everyone is having these problems but still...
is it interfered with by other a unit dies triggers? especiallly ones that target certain unit types?
and at the end of the custom script trigger, should player be Player(PLAYER_NEUTRAL_AGGRESSIVE) for neutral hostile, instead of player 12? which is playable and brown...
which, I have my p12 brown set to a computer anyways... I doubt that is affecting it...
EDIT:NVM found a different one and it is working...
Squall_Leonheart
08-24-2010, 07:52 AM
mine works well the 1st time, except it double, triple....spawns... untill i came up with the modifications above.
Archange1
09-04-2010, 08:04 PM
You guys keep commenting about different ways to do it... why don't you post your own tutorial? This system is easy to use, and works. Stop spending 6 hours trying to find a longer way to do it, and just get over it. I doubt many people check this anymore... but whatever. :grin:
Archange1
09-05-2010, 03:23 PM
The triggers are copied as text... They show exactly what would be shown in WE, with the option to change words. :xxd:
mindwarper06
09-16-2010, 05:53 PM
what the crap are you talking about toxic? It's a great tutorial... it shouldn't need to sho w HOW to do it with the triggers in text format... anyone can look at the text and see "trigger 1...set variable, unit- set custom value, and again set variable... each trigger says what to look for, unit is obvious set is obvious, and if you can't figure out custom script and wait, than either you need to give up now, or learn to hit the buttons on your keyboard at least... with the ability to search, and the ability to select the trigger and hit the first letter in the trigger name its not that hard...)
in fact I may not be a beginner map maker, but I still believe as long as you have a hint of intelligence you can understand it.
the portrayal is flawless, and it tells you what to do at the start, along with the effect...
i'm pretty sure my problem is that some of my other triggers interfer with how this one works, and thats why it didn't work for me.
skillzmfg3
09-16-2010, 06:20 PM
I did everything that is written i created standard trigger the non-custom one and i still cant get creep respawn, help please!
Balnazzar22
09-16-2010, 11:05 PM
Important note:
It seems the unit must have Can raise,does decay as death type else it doesn't work
Animoi666
09-20-2010, 09:52 AM
Important note:
It seems the unit must have Can raise,does decay as death type else it doesn't work
Read all comments as this has already been said.
xorkatoss
11-06-2010, 07:29 PM
dude wtf?
you make a tutorial and you don't attach a map with the triggers?
lazy people like me are just too lazy to manually create the triggers
also it's faster to just copy-paste triggers -.-
Animoi666
11-06-2010, 09:06 PM
dude wtf?
you make a tutorial and you don't attach a map with the triggers?
lazy people like me are just too lazy to manually create the triggers
also it's faster to just copy-paste triggers -.-
you learn by doing it yourself... maybe ?
Angele
11-06-2010, 10:42 PM
PLoblem didn't work Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
phoenixfire
11-06-2010, 11:01 PM
dude wtf?
you make a tutorial and you don't attach a map with the triggers?
lazy people like me are just too lazy to manually create the triggers
also it's faster to just copy-paste triggers -.-
Dont like it? Stop complainign and get your ass of this page.
Squall_Leonheart
11-07-2010, 03:27 AM
Dont like it? Stop complainign and get your ass of this page.
hey dont be rude or be too harsh...
dude wtf?
you make a tutorial and you don't attach a map with the triggers?
lazy people like me are just too lazy to manually create the triggers
also it's faster to just copy-paste triggers -.-
Triggering are best if u know them by hand, and DO it yourself... copy paste-ing is not so recommended... at the least try understand how long it takes for the creator to come up with a decent leakless trigger...
if u have no intention of making ur own trigger, then get urself of this page or even out of Hive, u just wanna copy and have not even the slightest idea of how to create such a simple trigger... so dont be rude to others who try to help others who would want to learn, experienced and make it themselves...
@Animoi666 ur great, so ignore what xorkatoss just said....
Animoi666
11-07-2010, 08:11 AM
dude wtf?
you make a tutorial and you don't attach a map with the triggers?
lazy people like me are just too lazy to manually create the triggers
also it's faster to just copy-paste triggers -.-
Dude, if you stil need this respawn system, send me your map. i'll implant nice n quick.
but in the future, make some effort for it mkay?
@Animoi666 ur great, so ignore what this fela just said....
I just got called Great... hehe ;D~
kimberker
12-11-2010, 02:26 PM
Hey i cant find (Custom Value of (Triggering unit)) Greater than 0
Squall_Leonheart
12-12-2010, 10:52 AM
Hey i cant find (Custom Value of (Triggering unit)) Greater than 0
Follow this steps:
1) make new conditions
2) select integer comparisons
3) thn choose from the integer comparison, Custom Value of unit
4) there, it's done...
edestark
02-24-2011, 05:11 AM
Omg, I'm almost with head ake, i'm new in WE and i'm having troubles to find that
Set Temp_Integer = (Temp_Integer + 1) << Where i can find this variable "Temp_Integer + 1"?? i need to create another variable named Temp_Integer + 1?
Squall_Leonheart
02-24-2011, 05:38 AM
Omg, I'm almost with head ake, i'm new in WE and i'm having troubles to find that
Set Temp_Integer = (Temp_Integer + 1) << Where i can find this variable "Temp_Integer + 1"?? i need to create another variable named Temp_Integer + 1?
set "temp_integer" is a custom variable. you need to create a custom variable from the integer variable.
1) go to triggers section. Ctrl+B to bring the variable editor up.
2) create new variables, create integer variable [name is up to u] --->
Temp_Integer, leave the "array" alone n untouched.
3) Go to triggers section again. this time create a new trigger.
4) right-click the "action section" and create new action, select "SET
VARIABLE"
5) select the "Temp_Integer" you've just made. then in the red colored
"value", change it to "Function"----> "Arithmetic"
6) under the Arithmetic section, change the 2 values to
"Temp_Integer" "+" "1"
7) there and ur done. and all custom variables are made in such ways. try
hitting a few buttons here and there in W.E...
8) there are guides on HIVEWORKSHOP as well. Check them out if u really
unsure how to make a
custom variable.
edestark
02-25-2011, 12:21 AM
set "temp_integer" is a custom variable. you need to create a custom variable from the integer variable.
1) go to triggers section. Ctrl+B to bring the variable editor up.
2) create new variables, create integer variable [name is up to u] --->
Temp_Integer, leave the "array" alone n untouched.
3) Go to triggers section again. this time create a new trigger.
4) right-click the "action section" and create new action, select "SET
VARIABLE"
5) select the "Temp_Integer" you've just made. then in the red colored
"value", change it to "Function"----> "Arithmetic"
6) under the Arithmetic section, change the 2 values to
"Temp_Integer" "+" "1"
7) there and ur done. and all custom variables are made in such ways. try
hitting a few buttons here and there in W.E...
8) there are guides on HIVEWORKSHOP as well. Check them out if u really
unsure how to make a
custom variable.
Now i made it! Thank you very much!
Squall_Leonheart
02-25-2011, 08:55 AM
glad to be of service. :)
Killer_rayven
06-03-2011, 07:44 AM
So how do you get it to have its old loot table because i was testing it out and i have most of the loot tables set for my game but they do not re spawn with there loot tables this there some one that can just tell me what to do there or some thing i just need this and i will greatful.
Squall_Leonheart
06-04-2011, 08:49 AM
So how do you get it to have its old loot table because i was testing it out and i have most of the loot tables set for my game but they do not re spawn with there loot tables this there some one that can just tell me what to do there or some thing i just need this and i will greatful.
i dont think u need a loot table. u can just use a simple trigger, to generate the loots. i've explained it in the previous comments...
Thanks for this system. It works fine!
Nike2000
07-18-2011, 08:26 AM
Sorry for noob question, but I can't figure out how to make "Custom value of (triggering unit)" Can anyone help me:S?
edit: I found, thanks for the system<3
Bribe
08-02-2011, 02:58 PM
What do you mean, "make custom value"? You mean how to replace it?
badsanta4cs
08-31-2011, 02:44 PM
hi guys..i just done a half of this tutorial and i need some help..explain me please how i make this lines
->Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
Pharaoh_
08-31-2011, 08:15 PM
hi guys..i just done a half of this tutorial and i need some help..explain me please how i make this lines
->Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom Value of (Triggering unit)) Greater than 0
The first one is a Player comparison (you can also use (Triggering player) Equal to Neutral Hostile) and the second one is an Integer comparison -> Unit - Custom value of unit.
LOTUS.VaNiTy
09-04-2011, 02:06 AM
But what if 2 or more units dies at the same time will this trigger work?
Squall_Leonheart
09-04-2011, 12:11 PM
But what if 2 or more units dies at the same time will this trigger work?
it works well... dont just comment... read the other comments & posts b4 making ur own.... i even have an example made in the previous posts to help ppl who are clueless.... although all credits goes back to the creator.
xorkatoss
09-04-2011, 10:16 PM
you learn by doing it yourself... maybe ?
i know how to make one myself but im too lazy and i still have lots of others things to do like MUI spells...
also i searched the spells section and couldn't find anything...
so can you post the map? pretty pls? :ogre_hurrhurr:
EDIT:
nvm i made one up really quick...also you leak a point when you create a unit...
and i heard that using custom values of units is not good because if another system uses them too then it will bug...
to clear the point leak when you create the unit you should save X & Y and then load it using hastables...
see the creep respawn i made to get a clearer idea...
CR Map Initialization
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set CreepRespawn_Hashtable = (Last created hashtable)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set CreepRespawn_Point = (Position of (Picked unit))
Hashtable - Save 8.00 as (Key Time) of (Key (Picked unit)) in CreepRespawn_Hashtable
Hashtable - Save (X of CreepRespawn_Point) as 1 of (Key (Picked unit)) in CreepRespawn_Hashtable
Hashtable - Save (Y of CreepRespawn_Point) as 2 of (Key (Picked unit)) in CreepRespawn_Hashtable
Custom script: call RemoveLocation(udg_CreepRespawn_Point)
CR Enter Map
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Set CreepRespawn_Point = (Position of (Triggering unit))
Hashtable - Save 8.00 as (Key Time) of (Key (Triggering unit)) in CreepRespawn_Hashtable
Hashtable - Save (X of CreepRespawn_Point) as 1 of (Key (Triggering unit)) in CreepRespawn_Hashtable
Hashtable - Save (Y of CreepRespawn_Point) as 2 of (Key (Triggering unit)) in CreepRespawn_Hashtable
Custom script: call RemoveLocation(udg_CreepRespawn_Point)
CR Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
Actions
Wait (Load (Key Time) of (Key (Triggering unit)) from CreepRespawn_Hashtable) seconds
Set CreepRespawn_Point = (Point((Load 1 of (Key (Triggering unit)) from CreepRespawn_Hashtable), (Load 2 of (Key (Triggering unit)) from CreepRespawn_Hashtable)))
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at CreepRespawn_Point facing Default building facing degrees
Custom script: call RemoveLocation(udg_CreepRespawn_Point)
at the least try understand how long it takes for the creator to come up with a decent leakless trigger.......
really? how long can it take? i did that creep respawn in less than 10 mins...
LOTUS.VaNiTy
10-18-2011, 09:33 AM
Sorry..Im just new..But thanks anyway i understand it^_^
WrathOfTheAncients
01-19-2012, 04:36 PM
I don't understand this part:
Set Temp_Integer = (Temp_Integer + 1)
"How can i get the '(Temp_Integer +1)' part? I can't find that!!:ogre_rage:"
Please help me oh my dear friends :goblin_cry: :goblin_cry:
Squall_Leonheart
01-20-2012, 04:13 AM
I don't understand this part:
Set Temp_Integer = (Temp_Integer + 1)
"How can i get the '(Temp_Integer +1)' part? I can't find that!!:ogre_rage:"
it is a custom trigger. u need to make it on ur own. press ctrl + B n u will see a new window. press edit variables, add new variables.
now label ur variable as wad u like, for this instance: Temp_Integer [this will be ur label/name of the variable u will create] now select the type of variable it belongs to, for temp_integer <--- this already tells u it is an integer, so select integer variable.
now create a new action, select set new variable options.
change the set new variable to the one u created.
u will have:
Set Temp_Integer = (something like this)
change the (something like this) to arithmetic n select ur Temp_Integer + 1
and u will have thisSet Temp_Integer = (select arithmetic from function)
then you need to change the function value of the arithmetic to Temp_Integer + 1.
in the end u get this:
Set Temp_Integer = (Temp_Integer + 1)
BonerBoo
01-25-2012, 10:30 AM
Help please, how can i make this trigger to spawn creeps for player 12 (Brown).
I tried to change, but creeps respawn only 1 time per game.
Will give +rep.
Squall_Leonheart
01-25-2012, 02:00 PM
Help please, how can i make this trigger to spawn creeps for player 12 (Brown).
I tried to change, but creeps respawn only 1 time per game.
Will give +rep.
have u set the creep death type?
i.e: unit decay, raised... or no raise no decay....
u'll have to be a lot more specific. :)
yumiyum
04-02-2012, 12:42 PM
It works. Thanks SkriK.
Adiktuz
04-03-2012, 02:29 AM
But what if 2 or more units dies at the same time will this trigger work?
--> yes, wc3 scripts run one-at-a-time...
yumiyum
04-20-2012, 10:31 AM
How to put special effect line into this trigger?
Respawn
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Neutral Hostile
(Custom value of (Triggering unit)) Greater than 0
Actions
Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
Wait Respawn_Time game-time seconds
Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Special Effect - Destroy (Last created special effect)
I did that way, but nothing happened.
Donach
04-23-2012, 08:42 PM
Is this system able to handle more that 8xxx (don't know the right number, that variable can store) units dead in single map?
If not, you have to implement variable reset :-).
Adiktuz
04-23-2012, 09:34 PM
you think there will be a map with 8000+ units? It will definitely lag if you have that many... wc3 might even crash...
Though it might have been better to update this to use hashtables... The respawn itself can handle any number of units, but the locations can only store up to 8190 coz its an array...
Donach
04-29-2012, 12:26 PM
you think there will be a map with 8000+ units? It will definitely lag if you have that many... wc3 might even crash...
Though it might have been better to update this to use hashtables... The respawn itself can handle any number of units, but the locations can only store up to 8190 coz its an array...
Well, then I wouldn't recommend using this in maps like ORPG, that can be played for very long time or long TDs.
I've created upgraded system to this one. If anyone would be wondering how it looks, just PM me.
Adiktuz
04-29-2012, 03:20 PM
As far as I'm concerned, since it doesn't leak, it shouldn't really cause lag after a long game time...
anyway, its just a tutorial for those who don't know how to make a simple creep respawn...
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.
Search Engine Optimization by
vBSEO 3.5.1 PL2