• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJASS] Units floccuration

Status
Not open for further replies.
Level 6
Joined
Jun 19, 2010
Messages
143
In my map Zombie Tag, I have to deal with the flocculation of units quite often.
Players in Zombie Team spawn creeps by buying them in Zombie Citadel. Units are sent by buying like in Tropical Tower War, HeroLineWar or Stronghold maps but you can control them to move anywhere you want to rape the survivors. B'cuz the mobs are sent that way, I have to use set rally as to let the players place the flag at where they want the mobs come to.

JASS:
scope rally initializer Rally
    private function Rally_Cond takes nothing returns boolean
        local real x
        local real y
        if GetUnitTypeId(GetSellingUnit())=='uaod' then
            set x=GetLocationX(GetUnitRallyPoint(GetSellingUnit()))
            set y=GetLocationY(GetUnitRallyPoint(GetSellingUnit()))
            call IssuePointOrder(GetSoldUnit(),"smart",x,y)
        endif
            return false
    endfunction
    private function Rally takes nothing returns nothing
        local trigger t=CreateTrigger()
        local integer i=7
        loop
            exitwhen i>11
            call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SELL,null)
            set i=i+1
        endloop
        call TriggerAddCondition(t,Condition(function Rally_Cond))
        set t=null
    endfunction
endscope

Apart from the set rally,
Problem is when you have a lot of them on map, the mobs get stucked and any order of you to move them won't work any more.
My settings are working for all mobs: collision size = 0.00 , movement type : hover but still the flocculation of the mobs occasionally occurs in the game.
I hope to make it work smoothly, no units get stuck anyway.
How to solve this?
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
if you have many many of them it just bugs the game. I came to this too while doing(see attachment) as a request.
You still could try call SetUnitPathing(GetSoldUnit(), false), this trully turns the collision off.
If this doesnt help I dont know
(The map name is kept the same so :D)
 

Attachments

  • for you friend.w3x
    20.7 KB · Views: 34
Level 31
Joined
Jul 10, 2007
Messages
6,306
Each player has its own player thread. For every moving unit, that unit must determine the shortest path from point A to point B. There is a cap to how many units can be calculated per instant for each player. To work around this, spread the units out to multiple players. In my old wintermaul wars map, I had 6 dummy players to prevent the units from halting.
 
Level 6
Joined
Jun 19, 2010
Messages
143
The units in Zombie Players' control are fully shared to the illidans (the dead survivors). How do I make a dummy player and spread the units out?

Zombie Tag has used all 12 players slots in the map. I suggest you guys please play it and you can by then help me out.
 
Status
Not open for further replies.
Top