some of the players drops when neutral hostiles appeared

JFA

Active Member
Reaction score
0
Some of the players disconnecting when the Neutral Hostile appeared

* Same players dropping everytime
* Players are dropping when one or more neutral hostile unit spawn or one of the non-neutral unit owner changes as Neutral Hostile

anyone have an idea about that?

and let me show you to my new neutral creep spawn trigger


Code:
library NCSpawn initializer Init
 
globals
    public constant real NEUTRAL_SPAWN_TIME = 60.00
 
 
 
 
    public hashtable Hash = InitHashtable()
    camp array Camps
    private integer CampCount = 0
endglobals
 
struct camp
    integer array types[4]
    integer array counts[4]
    integer typeCount
endstruct
 
 
 
function GetRectId takes rect r returns integer
    local integer i = 1
    loop
        if udg_CreepSpawnRegions[i] == r or udg_CreepSpawnCenterRegions[i] == r then
            return i
        endif
        set i = i + 1
        exitwhen i == 14
    endloop
    return 0
endfunction
 
function ReturnNCSpawnSmall takes nothing returns nothing
    //local integer id = GetHandleId(LoadRectHandle(Hash, GetHandleId(GetTriggeringRegion()), 0))
    local real x
    local real y
 
 
    //set x = GetRectCenterX(LoadRectHandle(Hash, id, 0))
    //set y = GetRectCenterY(LoadRectHandle(Hash, id, 0))
    //call IssuePointOrder(GetTriggerUnit(), "move", x, y)
    local integer id = GetHandleId(GetTriggeringRegion())
 
    if LoadRectHandle(Hash, id, 0) == LoadRectHandle(Hash, GetHandleId(GetTriggerUnit()), 0) then
        // creep kendi spawn regionundan cikmis ise
     
        // center regionun kayitli oldugu id'yi bul
        set id = GetHandleId(LoadRectHandle(Hash, id, 0))
        set x = GetRectCenterX(LoadRectHandle(Hash, id, 0))
        set y = GetRectCenterY(LoadRectHandle(Hash, id, 0))
        call IssuePointOrder(GetTriggerUnit(), "move", x, y)
    endif
endfunction
 
function ReturnNCSpawnBarat takes nothing returns nothing
    local integer id = GetHandleId(LoadRectHandle(Hash, GetHandleId(GetTriggeringRegion()), 0))
    local real x = GetRectCenterX(LoadRectHandle(Hash, id, 0))
    local real y = GetRectCenterY(LoadRectHandle(Hash, id, 0))
    call SetUnitPosition(GetTriggerUnit(), x, y)
    call IssueImmediateOrder(GetTriggerUnit(), "stop")
endfunction
 
function ReturnNCSpawn takes nothing returns nothing
    local integer id = GetHandleId(LoadRectHandle(Hash, GetHandleId(GetTriggeringRegion()), 0))
    call IssuePointOrder(GetTriggerUnit(), "move", GetRectCenterX(LoadRectHandle(Hash, id, 0)), GetRectCenterY(LoadRectHandle(Hash, id, 0)))
endfunction
 
function LeaveNCSpawn takes rect r returns nothing
    local region re = CreateRegion()
    call RegionAddRect(re, r)
    call TriggerRegisterLeaveRegion(gg_trg_NC_Spawn_Leave_Region, re, null)
    // region points to bigger rect
    call SaveRectHandle(Hash, GetHandleId(re), 0, r)
    // bigger rect points to center rect
    call SaveRectHandle(Hash, GetHandleId(r), 0, udg_CreepSpawnCenterRegions[GetRectId(r)])
    set re = null
endfunction
 
function RegisterCreepCamp takes integer id1, integer id2, integer id3, integer count1, integer count2, integer count3 returns nothing
    local integer array ids
    local integer array counts
    local integer i = 1
    local unit u
    local boolean b = false
    set Camps[CampCount] = camp.create()
    set Camps[CampCount].typeCount = 0
     
    if id1 != 0 and count1 != 0 then
        set ids[1] = id1
        set counts[1] = count1
        set b = true
    endif
    if id2 != 0 and count2 != 0 then
        set ids[2] = id2
        set counts[2] = count2
        set b = true
    endif
    if id3 != 0 and count3 != 0 then
        set ids[3] = id3
        set counts[3] = count3
        set b = true
    endif
     
    loop
        if ids[i] != 0 then
            set Camps[CampCount].types[i] = ids[i]
            set Camps[CampCount].counts[i] = counts[i]
            set Camps[CampCount].typeCount = Camps[CampCount].typeCount + 1
        endif
        set i = i + 1
        exitwhen i == 4
    endloop
 
    if b then
        set CampCount = CampCount + 1
    else
        call Camps[CampCount].destroy()
    endif
 
endfunction
 
private function Enum takes nothing returns boolean
    if GetWidgetLife(GetFilterUnit()) > 0 and GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) then
        return true
    endif
    return false
endfunction
 
function PeriodicNeutralSpawn takes nothing returns nothing
    local integer i = 0
    local integer j = 0
    local integer k = 0
    local integer rnd
    // loop for region
    loop
        set i = i + 1
        call GroupEnumUnitsInRect(bj_lastCreatedGroup, udg_CreepSpawnCenterRegions[i], Condition(function Enum))
        if FirstOfGroup(bj_lastCreatedGroup) == null then
            // randomize for camp
            set rnd = GetRandomInt(0, CampCount - 1)
            // loop for types
            loop
                set j = j + 1
                // loop for count
                loop
                    exitwhen k >= Camps[rnd].counts[j]
                    set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), Camps[rnd].types[j], GetRectCenterX(udg_CreepSpawnCenterRegions[i]), GetRectCenterY(udg_CreepSpawnCenterRegions[i]), 0)
                    call SaveRectHandle(Hash, GetHandleId(bj_lastCreatedUnit), 0, udg_CreepSpawnRegions[i])
                    set k = k + 1
                 
                endloop
                set k = 0
                exitwhen j >= Camps[rnd].typeCount
            endloop
            set j = 0
        endif
        exitwhen i >= udg_CreepSpawnRegionCount
    endloop
endfunction
 
public function Display takes nothing returns nothing
    local integer i = 0
    local integer j = 1
    call BJDebugMsg("Camp Count:"+I2S(CampCount))
    loop
        call BJDebugMsg("Creep type count of camp "+I2S(i + 1)+"="+I2S(Camps[i].typeCount))
        loop
            call BJDebugMsg(I2S(j+1)+"st type of camp "+I2S(i + 1)+"="+GetObjectName(Camps[i].types[j]))
            set j = j + 1
            exitwhen j >= Camps[i].typeCount
        endloop
        set i = i + 1
        exitwhen i >= CampCount
    endloop
endfunction
 
private function Init takes nothing returns nothing
 
 
endfunction
 
 
endlibrary

Code:
NC Spawn Ayarlar
    Events
        Map initialization
    Conditions
    Actions
        -------- Spawn olabilecek creep camp çeşitleri --------
        -------- Kullanış şekli şöyle: --------
        -------- call RegisterNCCamp(creepÇeşidi1, creepÇeşidi2, creepÇeşidi3, çıkacakCreepSayısı1, çıkacakCreepSayısı2, çıkacakCreepSayısı3) --------
        Custom script:  call RegisterCreepCamp('h02I', 0, 0, 3, 0, 0)
        Custom script:  call RegisterCreepCamp('h04H', 'h02V', 0, 2, 1, 0)
        Custom script:  call RegisterCreepCamp('e00R', 0, 0, 1, 0, 0)
        Custom script:  call RegisterCreepCamp('h04G', 'h04I', 0, 2, 1, 0)
        -------- Regionlar --------
        -------- Kücük creeplerin regionları --------
        Set CreepSpawnRegions[1] = NcUstCheck1 <gen>
        Set CreepSpawnCenterRegions[1] = NcUst1 <gen>
        Set CreepSpawnRegions[2] = NcUstCheck2 <gen>
        Set CreepSpawnCenterRegions[2] = NcUst2 <gen>
        Set CreepSpawnRegions[3] = NcUstCheck3 <gen>
        Set CreepSpawnCenterRegions[3] = NcUst3 <gen>
        Set CreepSpawnRegions[4] = NcUstCheck4 <gen>
        Set CreepSpawnCenterRegions[4] = NcUst4 <gen>
        Set CreepSpawnRegions[5] = NcAltCheck1 <gen>
        Set CreepSpawnCenterRegions[5] = NcAlt1 <gen>
        Set CreepSpawnRegions[6] = NcAltCheck2 <gen>
        Set CreepSpawnCenterRegions[6] = NcAlt2 <gen>
        Set CreepSpawnRegions[7] = NcAltCheck3 <gen>
        Set CreepSpawnCenterRegions[7] = NcAlt3 <gen>
        Set CreepSpawnRegions[8] = NcAltCheck4 <gen>
        Set CreepSpawnCenterRegions[8] = NcAlt4 <gen>
        -------- DiÄŸer regionlar --------
        Set CreepSpawnRegions[9] = NCBuyukUst <gen>
        Set CreepSpawnCenterRegions[9] = NCUstBuyukSpawn <gen>
        Set CreepSpawnRegions[10] = NCBuyukAlt <gen>
        Set CreepSpawnCenterRegions[10] = NCAltBuyukSpawn <gen>
        Set CreepSpawnRegions[11] = BaratSolBolge <gen>
        Set CreepSpawnCenterRegions[11] = BaratSolCenter <gen>
        Set CreepSpawnRegions[12] = BaratSagBolge <gen>
        Set CreepSpawnCenterRegions[12] = BaratSagCenter <gen>
        Set CreepSpawnRegions[13] = SpiritArea <gen>
        Set CreepSpawnCenterRegions[13] = SpiritCenter <gen>
        -------- Küçük spawn region sayısı --------
        Set CreepSpawnRegionCount = 8
        -------- Kücük creepler regiondan cikmasn --------
        For each (Integer A) from 1 to CreepSpawnRegionCount, do (Actions)
            Loop - Actions
                Custom script:  call LeaveNCSpawn(udg_CreepSpawnRegions[bj_forLoopAIndex])
        -------- Büyük creepler regiondan cikmasn --------
        Custom script:  call LeaveNCSpawn(gg_rct_NCBuyukUst)
        Custom script:  call LeaveNCSpawn(gg_rct_NCBuyukAlt)
        -------- Barat regiondan cikmasin --------
        Custom script:  call LeaveNCSpawn(gg_rct_BaratSolBolge)
        Custom script:  call LeaveNCSpawn(gg_rct_BaratSagBolge)
        -------- Spirit regiondan cikmasın --------
        Custom script:  call LeaveNCSpawn(gg_rct_SpiritArea)

Code:
NC Spawn Leave Region
    Events
    Conditions
        (Owner of (Triggering unit)) Equal to Neutral Hostile
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Unit-type of (Triggering unit)) Equal to Baratrum the Teabringer (neutral)
                        (Unit-type of (Triggering unit)) Equal to Spirit
                        (Custom value of (Triggering unit)) Equal to 5
                        (Custom value of (Triggering unit)) Equal to 10
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Unit-type of (Triggering unit)) Equal to Baratrum the Teabringer (neutral)
                    Then - Actions
                        -------- Barat --------
                        Set TempPoint = (Position of (Triggering unit))
                        Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
                        Custom script:  call RemoveLocation(udg_TempPoint)
                        Custom script:  call ReturnNCSpawnBarat()
                    Else - Actions
                        -------- Ghost --------
                        -------- Buyuk Creepler Ust --------
                        -------- Buyuk Creepler Alt --------
                        Custom script:  call ReturnNCSpawn()
            Else - Actions
                -------- Kucuk Creepler --------
                Custom script:  call ReturnNCSpawnSmall()
Code:
NeutralCreepRespawnsBuyuk
    Events
        Time - Every 120.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 NCBuyukUst <gen>)) Equal to 0
            Then - Actions
                Unit - Create 1 Ogre Magi (neutral) for Neutral Hostile at (Center of NCUstBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 5
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukUst)
                Unit - Create 1 Ogre Lord (neutral) for Neutral Hostile at (Center of NCUstBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 5
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukUst)
                Unit - Create 1 Troll Warlord (neutral) for Neutral Hostile at (Center of NCUstBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 5
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukUst)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in (Units in NCBuyukAlt <gen>)) Equal to 0
            Then - Actions
                Unit - Create 1 Ogre Magi (neutral) for Neutral Hostile at (Center of NCAltBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 10
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukAlt)
                Unit - Create 1 Ogre Lord (neutral) for Neutral Hostile at (Center of NCAltBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 10
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukAlt)
                Unit - Create 1 Troll Warlord (neutral) for Neutral Hostile at (Center of NCAltBuyukSpawn <gen>) facing Default building facing degrees
                Unit - Set the custom value of (Last created unit) to 10
                Custom script:  call SaveRectHandle(NCSpawn_Hash, GetHandleId(bj_lastCreatedUnit), 0, gg_rct_NCBuyukAlt)
            Else - Actions

Actually i don't think it's about the triggers because it doesn't matter neutral hostile created with trigger or already in the map. If i'll place them on the map, players drops immediately and still i can't any solution

Here is the important note

* Players will drop even the ALL triggers turned off or deleted
* Everytime the same players drops
* If the player drops from the game, he drops when he joined any dota game
 

JFA

Active Member
Reaction score
0
i've checked ALL OF THE TOPICS about disconecting but i haven't found anything useful for me...
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
With how many players was this tested?
Did it happen to ALL players or only a few?
Do you use any custom models / sounds?
 

JFA

Active Member
Reaction score
0
Yes now let me tell about something

my map tested on the bnet
ALWAYS same players are dropping
i have a many custom models and sounds but i'm sure it's not about that because it's started when i'm released new version and i think it's not about triggers

problem is Neutral Hostile units. Everytime the SAME players drops when ANY Neutral Hostile units entered the game

and here is the BEST PART. This players drops from the DOTA when the Neutral Creeps have arrived!
 

JFA

Active Member
Reaction score
0
we've tried that and not solved :)
I'M ABSOLUTELY SURE PROBLEM IS NOT TRIGGER PROBLEM but i need to find out why. Users from hiveworkshop doesn't find the reason maybe thehelper users can find the problem
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I dont think anybody can help you with that, at least not with the little information provided.
It does not matter how much CAPSLOCK YOU USE without more info we cant tell you anything.
 

JFA

Active Member
Reaction score
0
Players dropping when neutral creeps is in the map even all of the triggers turned off but what kind of information i can gave? i'll explain anything if you ask
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top