pick enemy unit

velnias

New Member
Reaction score
13
now variable -enemytype- select units only from "standard units" how can i make, that units would be taken from "custom units" ??

Code:
Actions
    Set levelnumber = (levelnumber + 1)
    [B][U]Set enemytype = (Random level levelnumber creep unit-type)[/U][/B]
    For each (Integer A) from 1 to enemycount[levelnumber], do (Actions)
        Loop - Actions
            For each (Integer B) from 1 to 7, do (Actions)
                Loop - Actions
                    Unit - Create 1 enemytype for attackers at (Center of spawnstart[(Integer B)]) facing Default building facing degrees
                    Unit - Order (Last created unit) to Move To (Center of spawnmove[(Integer B)])
            Wait (Real(spawnintegral)) seconds
 

XeNiM666

I lurk for pizza
Reaction score
138
make an array:

enemytype[1] = Gnoll
enemytype[2] = Gnoll Overseer
enemytype[3] = Bandit Lord
enemytype[4] = Ogre Lord
etc...
 

velnias

New Member
Reaction score
13
my way are better because it can give opportunity to make two, three or more random units difference in Level1.
 

XeNiM666

I lurk for pizza
Reaction score
138
ohhh.. sry about that.

what is the value of the variable enemytype??? is it integer of unit-type
 

velnias

New Member
Reaction score
13
now variable -enemytype- use units only from "object editor/units/standard units" how can i make, that units would be used from "object editor/units/custom units" ??

i dont know how to tell more clearly :D
 

XeNiM666

I lurk for pizza
Reaction score
138
like i said. make an array

Code:
enemytype[1] = your custom unit
enemytype[2] = another custom unit

then:

Code:
Unit - Create 1 enemytype[Random integer from 1 to (how many custom units you have)]
 

velnias

New Member
Reaction score
13
you do not understand my question :)

Code:
Set enemytype = [B][U](Random level levelnumber creep unit-type)[/U][/B]
this one choose random units, which level is -levelnumber- only from "object editor/units/standard units".I need, that units will be taken from "object editor/units/custom units".
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
you do not understand my question :)

Code:
Set enemytype = [B][U](Random level levelnumber creep unit-type)[/U][/B]
this one choose random units, which level is -levelnumber- only from "object editor/units/standard units".I need, that units will be taken from "object editor/units/custom units".

like random unit from a unit you have made in editor?
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
why not add your custom units in a unit gropu and then create random unit from group x?
 

quraji

zap
Reaction score
144
like i said. make an array

Code:
enemytype[1] = your custom unit
enemytype[2] = another custom unit

then:

Code:
Unit - Create 1 enemytype[Random integer from 1 to (how many custom units you have)]

If I understand you, this is what you want. Only you might want to make it more like this:


Code:
customunit[1] = your custom unit
customunit[2] = another custom unit
continue....

then:
Code:
Set enemytype = customunit[Random integer from 1 to (how many custom units you have)]
 

velnias

New Member
Reaction score
13
why not add your custom units in a unit gropu and then create random unit from group x?


because in one level (for exepample "wave level 1") are opportunity to spawn "wave level 5" or others "wave levels". How player can defend side if in first level come "wave level 5" units?
in my way are condition "unit level" who dont let to choose the difference levels than are -levelnumber-.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
because in one level (for exepample "wave level 1") are opportunity to spawn "wave level 5" or others "wave levels". How player can defend side if in first level come "wave level 5" units?
in my way are condition "unit level" who dont let to choose the difference levels than are -levelnumber-.

make a group for each level?
btw making a hero survivor or something like that?
 

velnias

New Member
Reaction score
13
if i want about 50 waves so i need to make 50 unit-group...
is it possible to do what i want without other ways like creating unit-groups or something?

this is team defence
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
if i want about 50 waves so i need to make 50 unit-group...
is it possible to do what i want without other ways like creating unit-groups or something?

this is team defence


how is your map made?
do you want the creeps to spawn after you killed last created wave or after a chosen time?
 

velnias

New Member
Reaction score
13
set levels trigger:
Code:
setlevels
    Events
        Map initialization
    Conditions
    Actions
        Set spawnintegral = 1
        Set time = 35
        Set timestring = Spawn starts in:
        -------- Level 1 --------
        Set i = 1
        Set enemycount[i] = 45
        -------- Level 2 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 3 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 4 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 5 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 6 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 7 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 8 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 9 --------
        Set i = (i + 1)
        Set enemycount[i] = 45
        -------- Level 10 --------
etc..

timer trigger:
Code:
spawntimer
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
        levelnumber Less than or equal to 20
    Actions
        Countdown Timer - Create a timer window for spawntimer with title timestring
        Countdown Timer - Start spawntimer as a One-shot timer that will expire in (Real(time)) seconds
        Player Group - Pick every player in defenders and do (Actions)
            Loop - Actions
                Countdown Timer - Show (Last created timer window)

spawn trigger:
Code:
spawn
    Events
        Time - spawntimer expires
    Conditions
    Actions
        Countdown Timer - Destroy (Last created timer window)
        Set time = 10
        Set timestring = Next level in:
        Set levelnumber = (levelnumber + 1)
        Set enemytype = (Random level levelnumber creep unit-type)
        Player - Set attackers handicap to 100.00%
        Unit - Create 1 enemytype for Neutral Passive at (Center of Region 012 <gen>) facing Default building facing degrees
        Player - Set attackers handicap to (100.00 x (100.00 + (50.00 x ((Real(levelnumber)) / (Max life of (Last created unit))))))%
        Unit - Remove (Last created unit) from the game
        Game - Display to (All players) the text: (Level |cffff0000 + ((String(levelnumber)) + |r is comming!))
        For each (Integer A) from 1 to enemycount[levelnumber], do (Actions)
            Loop - Actions
                For each (Integer B) from 1 to 7, do (Actions)
                    Loop - Actions
                        Unit - Create 1 enemytype for attackers at (Center of spawnstart[(Integer B)]) facing Default building facing degrees
                        Unit - Order (Last created unit) to Move To (Center of spawnmove[(Integer B)])
                Wait (Real(spawnintegral)) seconds
        Wait until ((attackers Food used) Equal to 0), checking every 1.00 seconds
        Trigger - Run spawntimer <gen> (checking conditions)
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
think this will work...

create on of each type of creeps that you want to be spawned were ever you want
and add this trigger
Code:
add unit for random spawn for lvl
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to group_x[(Level of (Picked unit))]
        For each (Integer A) from 1 to [COLOR="Red"]that amount of waves that you use[/COLOR](, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in group_x[(Integer A)] and do (Actions)
                    Loop - Actions
                        Set y[(Level of (Picked unit))] = (Unit-type of (Random unit from group_x[(Level of (Picked unit))]))
                        Unit - Remove (Picked unit) from the game

Code:
spawn
    Events
        Time - spawntimer expires
    Conditions
    Actions
        Set levelnumber = (levelnumber + 1)
        Unit - Create 1 y[levelnumber] for Neutral Hostile at (Center of (Playable map area)) facing Default building facing degrees
        etc...

edit maybe i didnt understand your triggers oO srry for taking to much of your time if thats so oO
 

velnias

New Member
Reaction score
13
with your trigger i need to put all my created units somewhere in the map ( i dont like this :) )

anyway thanks for help :p

i think i will replace my units from "custom units category" to "standard units category" its work with my trigger operate how i want.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top