Results 1 to 3 of 3
http://idgs.in/280490
  1. #1

    Join Date
    May 2009
    Location
    Indonesia
    Posts
    193
    Points
    317.90
    Thanks: 23 / 4 / 4

    Default Creep Revival System

    Huff, setelah mencoba2 akhirnya bs juga dicoba gan :
    Code:
    Revive
        Events
            Unit - A unit Dies
        Conditions
            ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
        Actions
            Custom script:   local string udg_CreepType
            Custom script:   local location udg_CreepPoss
            Custom script:   set udg_CreepType = UnitId2StringBJ(GetUnitTypeId(GetDyingUnit()))
            Custom script:   set udg_CreepPoss = GetUnitLoc(GetDyingUnit())
            Set CreepPoss = (Position of (Dying unit))
            Wait 10.00 game-time seconds
            Unit - Create 1 (Unit-type(CreepType)) for Neutral Hostile at CreepPoss facing (Random angle) degrees
            Set CreepType = <Empty String>
            Custom script:   call RemoveLocation(udg_CreepPoss)
    Untuk yang tinggal copas :

    buat 2 variable :

    Code:
    NAMA VARIABLE        JENIS
    
    CreepPoss            Point
    CreepType            String
    Code:
    function Trig_Revive_Func006001 takes nothing returns boolean
        return ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) )
    endfunction
    
    function Trig_Revive_Func006002 takes nothing returns boolean
        return ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_SUMMONED) != true )
    endfunction
    
    function Trig_Revive_Conditions takes nothing returns boolean
        if ( not GetBooleanAnd( Trig_Revive_Func006001(), Trig_Revive_Func006002() ) ) then
            return false
        endif
        return true
    endfunction
    
    function Trig_Revive_Actions takes nothing returns nothing
        local string udg_CreepType
        local location udg_CreepPoss
        set udg_CreepType = UnitId2StringBJ(GetUnitTypeId(GetDyingUnit()))
        set udg_CreepPoss = GetUnitLoc(GetDyingUnit())
        set udg_CreepPoss = GetUnitLoc(GetDyingUnit())
        call PolledWait( 10.00 )
        call CreateNUnitsAtLoc( 1, String2UnitIdBJ(udg_CreepType), Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_CreepPoss, GetRandomDirectionDeg() )
        set udg_CreepType = ""
        call RemoveLocation(udg_CreepPoss)
    endfunction
    
    //===========================================================================
    function InitTrig_Revive takes nothing returns nothing
        set gg_trg_Revive = CreateTrigger(  )
        call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive, EVENT_PLAYER_UNIT_DEATH )
        call TriggerAddCondition( gg_trg_Revive, Condition( function Trig_Revive_Conditions ) )
        call TriggerAddAction( gg_trg_Revive, function Trig_Revive_Actions )
    endfunction

  2. Hot Ad
  3. #2
    Rain's Avatar
    Join Date
    Dec 2006
    Location
    Everywhere Everyplaces
    Posts
    2,602
    Points
    13,969.78
    Thanks: 94 / 203 / 180

    Default

    ini bukannya di hiveworkshop sama di wc3 udah ada?. kk gulahula bisa bantuin aq buat leaderboard(scoreboard) buat map aos gak?,liat threadnya di thread sebelum ini.
    Last edited by Rain; 02-04-10 at 12:35.

  4. #3

    Join Date
    Feb 2010
    Posts
    54
    Points
    74.30
    Thanks: 1 / 3 / 2

    Default

    klo gw mah kaya gini versi MUInya, yang situ kan versi JASS, gw ma kagak ngerti sedikitpun tentang JASS
    Code:
    Revive Init
        Events
            Map Initialization
        Conditions
        Actions
            Set TempGroup=Units in (Playable Map Area) Matching (Matching unit equal to neutral hostile)
            Pick every units in TempGroup and do actions
                 Set CreepLoop=CreepLoop + 1
                 Set CreepPoint[CreepLoop]=Position of Picked Unit
                 Change Picked Unit custom value to CreepLoop
                 Add Picked Unit - Dies to Revive Creep
    call DestroyGroup(udg_TempGroup)

    +
    Code:
    Revive Add
        Events
            A unit enters Playable Map Area
        Conditions
            Triggering unit equal to Neutral Hostile
            Custom value of triggering unit less than CreepLoop
        Actions
             Set CreepLoop=CreepLoop + 1
             Set CreepPoint[CreepLoop]=Position of Picked Unit
             Change Triggering Unit custom value to CreepLoop
             Add Triggering Unit - Dies to ReviveCreep
    +
    Code:
    Revive Creep
        Events
            (Eventnya udah dimasukin dari 2 trigger di atas)
        Conditions
        Actions
             Wait 30 game-time seconds
             Create 1 Unit Type of Triggering Unit at CreepPoint[Custom Value of Triggering Unit] facing random angle
             degrees
             Change Last Created Unit custom value to Custom value of Triggering Unit
             Create special effect at CreepPoint[Custom Value of Triggering Unit] using "blablabla"
             Destroy last created special effect
    Gitu sih, cuman banyak memori yang tersimpan
    Tapi kayanya lebih simple yang dijelasin TS deh ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •