Another problem thats driving me crazy

Panda

New Member
Reaction score
3
Whenever a unit is killed a "copy" of it is created in a region. It is then added to a unit group variable with an array of the level of the unit.
Later I want to move the units in the unit group to the field to fight. However I want to start with the highest level creeps which is why I grouped them by level.
The problem is that they some why don't even get moved at all!!!

This is the trigger that creates a copy of the units killed and groups them :
(I have changed it to polo2005's version since it is a lot better but it still don't work)
Code:
Creep collecting
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        ((Dying unit) is Summoned) Equal to False
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
            Then - Actions
                Unit - Create 1 (Unit-type of (Dying unit)) for Player 6 (Orange) at (Center of Team1units <gen>) facing Default building facing degrees
                Unit Group - Add (Last created unit) to Battle_unitgroups_by_lvl_team1[(11 - (Level of (Dying unit)))]
                Unit - Pause (Last created unit)
                Unit - Make (Last created unit) Invulnerable
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Killing unit) belongs to an ally of Player 7 (Green)) Equal to True
                    Then - Actions
                        Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Center of Team2units <gen>) facing Default building facing degrees
                        Unit Group - Add (Last created unit) to Battle_unitgroups_by_lvl_team2[(11 - (Level of (Dying unit)))]
                        Unit - Pause (Last created unit)
                        Unit - Make (Last created unit) Invulnerable
                    Else - Actions
                        Do nothing

And uhm this is the trigger that moved the units in the field (which it some why don't, only for lvl 10 creeps)

Code:
Creeps attack from team 1
    Events
        Time - Every 5.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in Battle_unitgroups_by_lvl_team1[(Integer A)]) Greater than 0
                    Then - Actions
                        Set Battle_unit_team1 = (Random unit from Battle_unitgroups_by_lvl_team1[(Integer A)])
                        Unit - Move Battle_unit_team1 instantly to (Center of Team1battlespawn <gen>)
                        Unit - Unpause Battle_unit_team1
                        Unit - Make Battle_unit_team1 Vulnerable
                        Unit - Order Battle_unit_team1 to Attack-Move To Team2_home
                        Skip remaining actions
                    Else - Actions

And btw, it worked before I grouped them in levels, however there I just sent a random unit from the region to the field

Help is needed !

EDIT: I have made a the attached map that polo2005 posted instead of the old one but with the same problem ...
 

Attachments

  • Wonder hero arena v 1.18.w3x
    166.4 KB · Views: 94

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
can you uppload the map or a demo map or atleast wrap code around it oO
 

Romek

Super Moderator
Reaction score
964
Code. The
code.gif
icon.
Not Spoiler...
spoiler.gif
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
not rly sure that its this but you can try =)

every condition after 9 looks like this:
Code:
(Number of units in Battle_unitgroups_by_lvl_team1[8]) Equal to 0

think it should be

Code:
(Number of units in Battle_unitgroups_by_lvl_team1[8]) Greater than 0
 

Panda

New Member
Reaction score
3
your right polo2005 it should be greater than 0. have fixed it in my map too, but it still doesn't work =(

Is it something about you can't use level of units as array integers ?
Otherwise I have no clue :(
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
Thanks for help but it still don't work =(
This is very annoying :banghead:

rly? worked for me oO 10sec

edit: off some reason it only works when the klled creep has lvl on 10, weard
 

Panda

New Member
Reaction score
3
Yes.. I have absolutely no idea of what causes the problem... wish someone would solve it :S
but uhm thanks anyways polo2005 your help is appreciated :)
 
Q

Questioneer

Guest
I'm not at a place where I check the map, but could you tell me how many units are being moved and how many are being left behind?
If it's consistent than I think I might know what the problem is.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
I'm not at a place where I check the map, but could you tell me how many units are being moved and how many are being left behind?
If it's consistent than I think I might know what the problem is.
every 5seconds
moving units: zero
left behind: all

like it should be:
moving units: 1 the one with highest lvl
left behind: all - 1 =)
 
Q

Questioneer

Guest
Code:
Unit Group - Add (Last created unit) to Battle_unitgroups_by_lvl_team1[(11 - (Level of (Dying unit)))]

Try changing [(11 - (Level of (Dying unit)))] to [(11 - (Level of (Lasted created unit)))]
Then make a second trigger using Game to print out:
Game: Last created unit + has been added to + Battle_unitgroups_by_lvl_team1[(11 - (Level of (Lasted created unit)))]

This will check if the unit really has been added to the unit group, I think the dying unit was messing with how they were being added to the unit group.
If this doesn't work I'll revisit in 2-3 hours when classes are over.
Best of luck till then.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
Code:
Unit Group - Add (Last created unit) to Battle_unitgroups_by_lvl_team1[(11 - (Level of (Dying unit)))]

Try changing [(11 - (Level of (Dying unit)))] to [(11 - (Level of (Lasted created unit)))]
Then make a second trigger using Game to print out:
Game: Last created unit + has been added to + Battle_unitgroups_by_lvl_team1[(11 - (Level of (Lasted created unit)))]

This will check if the unit really has been added to the unit group, I think the dying unit was messing with how they were being added to the unit group.
If this doesn't work I'll revisit in 2-3 hours when classes are over.
Best of luck till then.

doesn't work... have tried both ways...
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
it should be working GAH! maybe its another trigger thats messing up that trigger
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Here you go, you had your unit arrays set to 1, you needed them set to ether 0 (inf) or 10 (number of creep levels). I also made a few tweaks.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
lol was the array set to that?^^ omg hahaha so simple hahaah

btw upploaded a version with highest lvl first
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Ohh he only wanted the highist level creeps to be sent, opps lol. well then the map I posted is useless to him, all he needs to do is go into his varibles and set the arrays to 0 or highist creep level

ps. you do not want to run to many interger a's at the same time, ether make a varible array for it or use interger b, if you use multiple interger a's at the same time it can cause interger clashes which will create the same problim you were haveing lol That is what I thought was wrong at first.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top