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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top