| Triggering the creeps | |
|
|
Author | Message |
---|
onejube Nooblet
Posts : 28 Join date : 2010-02-14 Age : 31 Location : Perth
| Subject: Triggering the creeps Wed Feb 17, 2010 12:51 pm | |
| Hey Glorn, what was the trigger you used to; Respawn more creeps after killing the ones in a certain area i.e Farming? - Code:
-
Level 1a Events Time - Every 5.00 seconds of game time Conditions Actions Wait 10.00 seconds If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions And - All (Conditions) are true Conditions (Number of units in (Units in Region 014 <gen>)) Equal to 0 Then - Actions Set Point[8] = (Random point in Region 014 <gen>) Unit - Create 1 Level1Creeps[(Random integer number between 1 and 14)] for Neutral Hostile at Point[8] facing Default building facing degrees Set Point[8] = (Random point in Region 014 <gen>) Unit - Create 1 Level1Creeps[(Random integer number between 1 and 14)] for Neutral Hostile at Point[8] facing Default building facing degrees Set Point[8] = (Random point in Region 014 <gen>) Unit - Create 1 Level1Creeps[(Random integer number between 1 and 14)] for Neutral Hostile at Point[8] facing Default building facing degrees Set Point[8] = (Random point in Region 014 <gen>) Else - Actions Custom script: call RemoveLocation( udg_Point[8] ) Thats what i got. How can this be improved? I know that seems fine but if they chase you out of that region at the wrong time more will spawn. Can you help with a trigger like, unit dies wait 10 sec replace with random unit at position of dying unit? | |
|
| |
Glorn2 Ohh Captain our Captain
Posts : 3721 Join date : 2009-07-03 Age : 35 Location : Guilford, NY
| Subject: Re: Triggering the creeps Wed Feb 17, 2010 1:17 pm | |
| - Code:
-
Normal Spawn Events Time - Every 24.00 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in (Units in Spawn Bottom Left 1 <gen> owned by Neutral Hostile)) Less than 3 Then - Actions Unit - Create 1 (Random level AvgFinder creep unit-type) for Neutral Hostile at (Random point in Spawn Bottom Left 1 <gen>) facing Default building facing degrees Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in (Units in Spawn Bottom Left 3 Area <gen> owned by Neutral Hostile)) Less than 5 Then - Actions Unit - Create 1 (Random level AvgFinder creep unit-type) for Neutral Hostile at (Random point in Spawn Bottom Left 3 <gen>) facing Default building facing degrees Else - Actions
I have a region that is my spawn region; then I have a much larger region over that, to make sure if a unit chases you; it will still be counted when considering whether new units should spawn or not. Of course, you can also set various limits to the amount of creeps you want to be able to spawn in a given location. With mine; units that summon can still summon more units without a problem; but once there is that limit; no more are created. If I wanted to be a little more precise; I would add a condition: "(Units in region (owned by neutral hostile not equal to (is a summoned unit equal to true))) less than 5 | |
|
| |
onejube Nooblet
Posts : 28 Join date : 2010-02-14 Age : 31 Location : Perth
| Subject: Re: Triggering the creeps Wed Feb 17, 2010 9:25 pm | |
| OH very nice, Thanks alot for that, ill probably be asking alot more question on this website because my maps has so many flaws. | |
|
| |
onejube Nooblet
Posts : 28 Join date : 2010-02-14 Age : 31 Location : Perth
| Subject: Re: Triggering the creeps Sun Feb 21, 2010 1:32 am | |
| Hey glorn do you have a old cha unprotected map that i could refer to to help me? It would prevent me from asking more question on this site | |
|
| |
Glorn2 Ohh Captain our Captain
Posts : 3721 Join date : 2009-07-03 Age : 35 Location : Guilford, NY
| Subject: Re: Triggering the creeps Sun Feb 21, 2010 2:40 am | |
| uhh, yeah, i can give you an old edit. however, a lot of the base coding is in deprotected JASS; so is REALLY difficult to understand... Like, I dont even really understand it. For other help, I suggest www.thehelper.net search for what you need help with, and there is already a post with the answer. I cant count how many times they have helped me out in a pickle. | |
|
| |
onejube Nooblet
Posts : 28 Join date : 2010-02-14 Age : 31 Location : Perth
| Subject: Re: Triggering the creeps Sun Feb 21, 2010 3:23 am | |
| Yeah i usually go on there, infact i would have if you hadnt replied so fast the first few times. Any open GUI version that you woulnt mind sharing?
I might have to learn JASS everyone tell me how good it is in terms of efficiency. | |
|
| |
Glorn2 Ohh Captain our Captain
Posts : 3721 Join date : 2009-07-03 Age : 35 Location : Guilford, NY
| Subject: Re: Triggering the creeps Sun Feb 21, 2010 1:19 pm | |
| well, the old map is only about... 1/3 JASS. My new map isnt done; and no offense, but im not willing to share it yet. For anything that you cant get from the old edit; i can help you with though. I still use a JASS system to do the skill selection; simply because of how long it would take to re-write the same thing in GUI, and baka-ranger's system really doesnt seem too good for CHA. | |
|
| |
onejube Nooblet
Posts : 28 Join date : 2010-02-14 Age : 31 Location : Perth
| Subject: Re: Triggering the creeps Mon Feb 22, 2010 10:55 am | |
| fair enough ill start learning JASS straight away | |
|
| |
Sponsored content
| Subject: Re: Triggering the creeps | |
| |
|
| |
| Triggering the creeps | |
|