• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Neutral Units Comming Back

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
When I create neutral units and order them to walk somewhere, they just come back to base after walking a few steps! Is there any way to fix it?

My current trigger:

JASS:
   local unit tempunit
    local real x = GetRectCenterX(gg_rct_TeamA_Down)
    local real y = GetRectCenterY(gg_rct_TeamA_Down)
    local real x2 = GetRectCenterX(gg_rct_1)
    local real y2 = GetRectCenterX(gg_rct_1)
    local integer i = 0
    
//=================== TeamA Down ===================
    if ( Trig_Creep_Spawn_FuncTAD() ) then
        set tempunit = CreateUnit(Player(bj_PLAYER_NEUTRAL_VICTIM), 'h01Y', x, y, 270)
        call IssuePointOrder(tempunit, "attack", x2, y2)
        call BJDebugMsg(GetUnitName(tempunit))
        call SetUnitColor(tempunit, PLAYER_COLOR_RED)
        call RemoveGuardPosition(tempunit)
        call SetUnitCreepGuard(tempunit,true)
        set tempunit = CreateUnit(Player(bj_PLAYER_NEUTRAL_VICTIM), 'h01Y', x, y, 270)
        call IssuePointOrder(tempunit, "attack", x2, y2)
        call SetUnitColor(tempunit, PLAYER_COLOR_RED)
        call RemoveGuardPosition(tempunit)
        call SetUnitCreepGuard(tempunit,false)
        call SetUnitUserData(tempunit, 1)
        loop
            set tempunit = CreateUnit(Player(bj_PLAYER_NEUTRAL_VICTIM), 'h01X', x, y, 270)
            call IssuePointOrder(tempunit, "attack", x2, y2)
            call SetUnitColor(tempunit, PLAYER_COLOR_RED)
            set tempunit = CreateUnit(Player(bj_PLAYER_NEUTRAL_VICTIM), 'h01X', x, y, 270)
            call IssuePointOrder(tempunit, "attack", x2, y2)
            call SetUnitColor(tempunit, PLAYER_COLOR_RED)
            call SetUnitUserData(tempunit, 1)
            set i = i + 1
        exitwhen (i == 3)
        endloop
    else
    endif

The
call SetUnitCreepGuard(tempunit,true)
call SetUnitCreepGuard(tempunit,false)
was just a test to see if it does something, nothing happened at all...
 
Level 12
Joined
Mar 23, 2008
Messages
942
Make the units player 12 (brown) or something, instead of a neutral player.

I believe that fixes the problem.
I can't.

There is just two ways to solve it:

- Make the neutral act like a player, without the stupid AI, no guard position or fleeing from towers
- Give the units to a player but makes it unable to benefit from it, no bounty for buildings or units killed by it, and no control. (I think that is easier with a ward unit)

I would appreciate any help in any of the solutions. ^^
 
Level 12
Joined
Mar 23, 2008
Messages
942
Well, I've seen it done before, but it needed alot of game constant changing that I can't remeber. Look around here, I do believe theres a thread that discribes it
Uhm, the main problem is that there is creep camps.
Changing the game play constants make neutral hostile a little... too much hostile... (neutral base rush!)
 
Status
Not open for further replies.
Top