| 03-08-2008, 08:12 AM | #1 |
I'm making an AoS map with neutrals and I'm not really sure how i would have groups of different creeps respawning one or two minutes after a previous group of creeps dying. Can anyone post a sample trigger that i can modify and learn from ? Thanks, - ThonGod |
| 03-08-2008, 08:35 AM | #2 |
Try this tutorial. http://wc3campaigns.net/showthread.php?t=97706 Just store some units in a unit pool and detect when the crep group is dead, then make some random units from the pool. |
| 03-10-2008, 03:40 AM | #3 |
Thanks, ill muck around with that since i dont really know much about JASS =] +rep And is there a simple way with GUI ? - ThonGod |
| 03-10-2008, 03:49 AM | #4 |
no, learn jass, its really worth it |
| 03-10-2008, 07:46 AM | #5 |
It is either easier with GUI, or impossible. Just add each unit to a unit group (in an array) then detect when the number of units in that array is 0, and then spawn a new group after that. To know if a group in the array is being used already just check to see if number of units in array is 0, but if they are neutral units then you already have a set number anyway. I can give you a trigger if you want, but once you start making it it should just flow. |
| 03-11-2008, 10:36 PM | #7 |
Thanks for the code =D --------------------------- Gorman can you post your triggers too ? =) --------------------------- What are you making here? : Trigger: Set TempInt = 1
![]() Set TempPoint = (Random point in CrSpawnLoc[TempInt])
![]() Unit - Create 1 CreepType[TempInt] for Neutral Hostile at TempPoint facing Default building facing degrees
![]() Unit Group - Add (Last created unit) to Creeps[TempInt]CreepType[1] ? -------------------------- And then below it you have a Trigger: Set CreepType[1] = Thunder Lizard-------------------------- TempInt is an integer, TempPoint is a point, CreepType is a unit array (with how ever many creep types i want ?) Is that all for your variables? --------------------------- I would also like to know why yourTempInt seems to always be one ? Kinda confusing i tihnk ? ===Possibly edits when i get home from where ever im going=== - ThonGod |
| 03-12-2008, 02:18 AM | #8 |
you missed array CrSpawnLoc |
| 03-12-2008, 08:26 AM | #9 |
Thanks Secretarts for that =] -------------------------- Trigger: Set TempPoint = (Random point in CrSpawnLoc[TempInt])Thats Location one because its seems to always be set as one? Man im confused =] - ThonGod |
| 03-12-2008, 01:51 PM | #10 |
We have a system located in our database called the Creep Respawn System. I have a funny feeling it could be something you're looking for. It's in jass, but I can nearly guarantee it is more modular than anything you're using. (And therefore far more useful) |
| 03-13-2008, 11:24 AM | #11 |
I dont really seem to be able to use it because of all his variables and locs and is probably the reasons why it has lots of "expected line " or seomthing and i cant open it in single player O_o - ThonGod |
| 03-13-2008, 03:50 PM | #12 |
It requires vJass, that's why. Download grimoire here. It's very easy to use, though, all you do is create a region and run a single line of custom code. It's all elaborated in the first post in that topic. |
| 03-16-2008, 12:40 AM | #14 |
Thanks Furion! Its in my map and tested and it works perfectly! +rep when i can :D ----------------------------------- Would i do something similar to randomly select and create one of twelve special units at a certain location? And have them removed from the twelve when one dies? And keeps on repeating until all twelve are dead ? And having some other random crazy unit be created in the middle of the map ? ----------------------------------- - ThonGod - EDIT: What does " double free of location in "Trig_Camp_Elven_Actions" mean ? It appeared while i was testing the map once . |
| 03-31-2008, 02:47 AM | #15 | ||||
Glad I could help, dude. Here are the answers to your other questions. Quote:
I would do something like this: Trigger: Untitled Trigger 001![]() Conditions![]() Actions![]() ![]() Unit Group - Add Unit1 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit2 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit3 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit4 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit5 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit6 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit7 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit8 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit9 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit10 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit11 to SpawnTypeGroup![]() ![]() Unit Group - Add Unit12 to SpawnTypeGroupIn this one, each unit is a unit you put on the map (they can be invisible or hidden or whatever) that represents one of the 12 unit types you want to be placeable. And then this: Trigger: Note: That goes in between the Set TempPoint = Wherever and the Unit Group - Add (Last Created Unit) lines of the trigger I posted in my last post. Quote:
I would remove it after it spawns like I do above, but you could do it when it dies, if you want. Quote:
If you only add one unit initially instead of the three I gave in the Thunder Lizards example, it will behave exactly like you want. Now, trying to guess what you meant here, but if you wanted to create a random boss unit at the center of the map after all 12 are dead, you would have a BossTypeGroup, and you alter my trigger from the previous example to look like this: Trigger: Note: you would have to set up a BossTypeGroup like I did for SpawnTypeGroup. Quote:
I think it says you are having a problem with a trigger of yours called Camp Elven Actions. I don't know what double free of location means. |
