| 10-21-2007, 12:38 AM | #1 |
The background... In my map you control a single hero and fight many units that are spawned in waves. The goal iof the game is not to kill the units though, they are just in your way of achieving victory. The units are randomly spawned on playable map area. The difficulty increases as waves progress. *~*I want to know which to use AND why. Or if you have a better idea then suggest it AND say why it would be superior. My first question is Why should I choose to start my waves by... 1.Timed intervals eg.. -1 min into game run wave 1 -2 mins into game run wave 2 **The problem with this method is if the heros dont kill units fast enough they could be over whelmed unintentionaly. 2.Number of units are killed, -run wave1 -when 30 enemy units have died, run wave2 **The problem with this is that the heros could intentionaly avoid killing units to avoid having to deal with later waves. My second question is Why should I go about making the units pursue the heros in this way... 1.Have the acquisition range set to a high value, with map revealed for the computer. **The problem with this is there is a cap on acquisition which would make it fail for the size map im using. ( yes i know my map is huge). I also noticed a "stutterring" in their movement. 2.Select all the unit then order them to attack one of the heros. eg.. -every 10(%) seconds pick all Browns units and attack closest(#) hero. (pseudocode) **The problem there is how do I decide which hero to attack(#) and how often(%). eg.. closest hero, random hero, EDIT: Reworded questions for clarity, Hope it works. |
| 10-21-2007, 03:55 AM | #3 |
I would go with spawning them at intervals. There's nothing wrong with overwhelming players =D. It gives the game more of a fast-paced and hectic feel, which you may or may not want (I usually enjoy that). I think I would need to know the map's goal to answer the second question. What do the players have to do to win? |
| 10-21-2007, 09:10 AM | #4 |
I'll move this to Triggers & Scripts. The best solution I can think of is this: use an entirely separate computer player for all the unit spawns, and have each spawn cost food. Then, have a trigger run when <Controller of Creeps>'s food becomes less than or equal to about 10 or so. That might be what you're looking for. |
| 10-21-2007, 02:19 PM | #5 |
Wrong cateogory?I give my apologies. I should have seperated the two questions and made my post clearer. @ TaintedReality, 1.Good point, simple and explained, what I was looking for. 2.Basicly I continuously give you goals and you must complete them but at the same time stay alive. The goals vary dramaticly and keep the game interesting so there is no simple answer. @ Pyrogasm,ti[t]an[mapmaker], I dont need help with triggering (yet), im just weighing the benefits of choosing that method. AKA im trying to think of future problems before I start and realise "oh no". Thank you all for replying, and again im sorry for making things difficult. EDIT: typos |
| 10-21-2007, 10:13 PM | #6 |
Naw; 'tis OK that you posted in the wrong forum. It happens all the time. The only thing I can think of that might be a problem is that you won't be able to change the number of food the trigger activates at dynamically in game. If, in the trigger editor, you make the trigger use the event "Player 12 (Brown)'s food becomes less than or equal to 5", it will always run when he has 5 food. Of course, you could affect his effective current food by just creating a dummy unit in the corner that causes the computer to use 1 extra food and such. |
| 10-21-2007, 10:17 PM | #7 |
@ pyrogasm if i was going to do it like that i would... use a global variable "var" when a unit dies belonging to player 12 brown set var = var +1 if var = 20 then run wave 2 ------------------------------------------------------------- well after reading endless posts on this site, related and unrelated to my problem i have decided to go with timed intervals ... i think...., pyrogasm raises a good point though >< and pick all units owned by player 12 brown and attack move to the hero with the least life |
| 10-21-2007, 10:26 PM | #8 |
Not to hijack this thread or anything but... Why do units "Stutter" or stop when a large amount of them are issued an order? Or when a lot of units are moving? (BTW: is there any possible cure for this?) |
| 10-21-2007, 10:30 PM | #9 |
Yeah, its a bug with ForGroup. I think cohadar made a fix for it. Check in the "Known bugs in JASS" sticky. Edit: I really think food is the way to go on this because of this main advantage: You can have different units cost a different number of food. This means that if you had a "boss" for the wave and he had 5 minions, you could make the boss use 5 food and his minions 1 each. So the next wave would run after either 5 of his minions had died, or after he died. |
| 10-21-2007, 11:02 PM | #10 |
@ pyrogasm I could check if the unit was a minion or a boss with an if statement and change the variable that way. if unit = boss the set var = var + 5 else if unit = minion set var = var +1 I hadnt thought of diferent values for different units. Thanks for that idea =) PS: im using food for for quest progress info. all my units cost 0 food ----- Lets say player green in not playing (player 7) if I went through a regular loop and it compare lets say hero[1] to hero[7] and there is no hero[7] what is the result? EDIT: This is what I have so far, it doesnt handle missing heros yet and when units are tied for least life it picks in color order, red over blue over teal etc.. JASS:function Trig_Attack_Actions takes nothing returns nothing local real array L local integer D = 1 local integer A = 1 local integer B = 1 local integer C = 0 local unit array Hero loop exitwhen D > 10 set L[D] = GetUnitStateSwap(UNIT_STATE_LIFE, Hero[D]) set D = D+1 endloop loop exitwhen C = 9 if A == 11 then set A = 1 endif if B == 11 then set B = 1 endif if L[A] <= L[b] then set B = B + 1 set C = C +1 else set A = A + 1 set B = 1 set C = 0 endif set Hero[21] = Hero[A] endloop endfunction //=========================================================================== function InitTrig_Attack takes nothing returns nothing set gg_trg_Attack = CreateTrigger( ) call TriggerAddAction( gg_trg_Attack, function Trig_Attack_Actions ) endfunction |
