• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Creeps spawn by Hero level

Status
Not open for further replies.
Level 1
Joined
Feb 12, 2010
Messages
3
Sr's \o

I noticed once in map "HeroCraft" a trigger that all creeps map began lvl1 and depending on the level of the heros were creeps up your level also, for example:
Heros Level 1 \ The Creeps on the Map Level 1
Heros Take 3 \ Creeps on the Map Level 3 to Level 5
Heros Level 5 \ Creeps on the Map Level 5 to Level 7
and thus substantially
so I wanted to know how to make this trigger ...

if someone help me be grateful:)

Sorry for my bad English, but do not speak the language = \
I was reflecting on google. XD
 
Level 5
Joined
May 31, 2009
Messages
122
This should work:

Trigger for the periodic spawn
  • Event
    • Time - Every (x seconds of game time)
  • Actions
    • If - (spawnlevel) is equal to 1
    • Then
      • Unit - Create 1 (Random Level 1 creep unit-type) for Neutral Hostile in random point of playable map area
    • Else
      • if - (spawn level) is equal to 2
      • Then
        • Unit - Create 1 (Random Level 3 creep unit-type) for Neutral Hostile in random point of playable map area
      • Else
        • if - (spawn level) is equal to 3
        • Then
          • Unit - Create 1 (Random Level 6 creep unit-type) for Neutral Hostile in random point of playable map area
Trigger for changing the spawn levels (spawnlevel is an integer type variable)
  • Event
    • Unit - A unit levels up
  • Actions
    • If - (Hero level of (leveling unit) is equal to 3
    • Then
      • Set - spawnlevel = 2
    • Else
      • If - (Hero level of (leveling unit) is equal to 5
      • Then
        • Set - spawnlevel = 3
Try editing the map to take the trigger from it. If this doesn't help tell me and I'll give you the triggers (I don't have them at this moment).

lol??

Are you trying to be helpful or sarcastic?
 
Level 1
Joined
Feb 12, 2010
Messages
3
DeadZero---
I Speak Portuguese =)

-----
VestriDeus

I go test this trigger
Thank you both.

Edit------------
VestriDeus

would do it all the time passing?
rather than with the level of heros?
Example
10 Minutes Creeps Level 1
20 Minutes Creeps Level 2
30 Minutes Creeps Level 3

and if possible that the creeps are born in random species.
 
Last edited:
Level 5
Joined
May 31, 2009
Messages
122
DeadZero---
I Speak Portuguese =)

-----
VestriDeus

I go test this trigger
Thank you both.

Edit------------
VestriDeus

would do it all the time passing?
rather than with the level of heros?
Example
10 Minutes Creeps Level 1
20 Minutes Creeps Level 2
30 Minutes Creeps Level 3

and if possible that the creeps are born in random species.

The creeps will be born as random species, just with that level. To spawn multiple random different creeps, do that trigger but change this:


Trigger for the periodic spawn
  • Event
    • Time - Every (x seconds of game time)
  • Actions
    • If - (spawnlevel) is equal to 1
    • Then
      • For each integer from (1 to x) do (Actions)
        • Unit - Create 1 (Random Level 1 creep unit-type) for Neutral Hostile in random point of playable map area
    • Else
      • if - (spawn level) is equal to 2
      • Then
        • For each integer from (1 to x) do (Actions)
          • Unit - Create 1 (Random Level 3 creep unit-type) for Neutral Hostile in random point of playable map area
      • Else
        • if - (spawn level) is equal to 3
        • Then
          • For each integer from (1 to x) do (Actions)
            • Unit - Create 1 (Random Level 4 creep unit-type) for Neutral Hostile in random point of playable map area
where x under the for action is the number of creeps you want to spawn

And this is for the leveling periodically
  • Event
    • Time - Time elapsed is 600.00 seconds
  • Actions
    • Set - spawnlevel = 2
  • Event
    • Time - Time elapsed is 1200.00 seconds
  • Actions
    • Set - spawnlevel = 3

etc. etc. etc.

gl with your map!
 
Level 1
Joined
Feb 12, 2010
Messages
3
VestriDeus
You could make a trigger for me?
I tried to do as you showed there, but found no option in the editor brings me to a result like yours.

I have tried:
if / then / else
and
if / then / else multiple function
but I could not = \
 
Level 5
Joined
May 31, 2009
Messages
122
VestriDeus
You could make a trigger for me?
I tried to do as you showed there, but found no option in the editor brings me to a result like yours.

I have tried:
if / then / else
and
if / then / else multiple function
but I could not = \

K, you need to choose If/Then/Else multiple functions

Then under the "If - conditions", right click and choose "add new condition", and then choose "Integer comparison". You need to create a variable called "spawnlevel", and make sure it is an integer.

For the "then-actions", right click and choose "new action", and choose "For -each integer from (a-x)" (something like that), and modify then numbers to the amount of creeps you want

Then for the "Else - Actions", right click and choose "If/then/else multiple functions" again; rinse and repeat.


gl on your map!
 
Level 3
Joined
Feb 23, 2010
Messages
73
ok ok, I guess I will just wrap this up and make a working trigger to copy.

You must make the Global variables:
1: "UnitGroup_Heroes" as a Unit Group
2: "Avg_HeroLevel" as an Integer
3: "Spawn_Level" as an integer
  • Events
    • Time - Every 2.00 seconds of the game
  • Conditions
  • Actions
    • Set UnitGroup_Heroes = (units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroup_Heroes and do (Actions)
      • Loop - Actions
        • If (All conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Picked unit) is a Hero) Equal to False
          • Then - Actions
            • Unit Group - Remove (picked unit) from UnitGroup_Heroes
            • Set Avg_HeroLevel = (Avg_HeroLevel + (Hero Level of (Picked unit)))
          • Else - Actions
            • Do Nothing
    • Set Avg_HeroLevel = (Avg_HeroLevel / (Number of units in UnitGroup_Heroes))
    • Set (Spawn_Level) = Avg_HeroLevel
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Spawn_Level Equal to 1
      • Then - Actions
        • Unit - Create 1 (Random level 1 creep unit-type) for Neutral Hostile at (Center of (CreepSpawnRegion)) Facing default building facing degrees
      • Else - Actions
        • Do Nothing
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Spawn_Level Equal to 2
      • Then - Actions
        • Unit - Create 1 (Random level 2 creep unit-type) for Neutral Hostile at (Center of (CreepSpawnRegion)) Facing default building facing degrees
      • Else - Actions
        • Do Nothing
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Spawn_Level Equal to 3
      • Then - Actions
        • Unit - Create 1 (Random level 3 creep unit-type) for Neutral Hostile at (Center of (CreepSpawnRegion)) Facing default building facing degrees
      • Else - Actions
        • Do Nothing
this is just a basic trigger that will work by averaging all your heroe's levels to spawn creeps for the team. If you only want it to affect 1 hero, then you can simply set Spawn_Level = Hero level of (Your_Hero)

It is written properly so you know if you've done it correctly.
This is almost exactly how it will appear in the world editor.

any questions? just reply this thread
 
Status
Not open for further replies.
Top