How to: Create a Creep Revival System

Discussion in 'Tutorial Repository' started by Tinki3, Apr 14, 2007.

  1. Nexor

    Nexor ...

    Ratings:
    +74 / 0 / -0
    I can see the problem, haha! :D

    Check the variables there is two versions of this: udg_Integer

    First one is udg_Integer and the second one is udg_Integar, with an 'A' , that's the reason.
     
  2. Argentine

    Argentine New Member

    Ratings:
    +2 / 0 / -0
    Code:
    Creep Revival System Initialization
        Events
            Map initialization
        Conditions
        Actions
            Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
                Loop - Actions
                    Set Integer = (Integer + 1)
                    Unit - Set the custom value of (Picked unit) to Integer
                    Custom script:   set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
                    Custom script:   set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
    Look at the custom script. Anyone having the error "expected integer" or "expected a name" with these custom script remember that whatever you name your variables, custom script is CASE SENSITIVE and the part where it says set udg_Creep_Y "Creep_Y" is the name of the variable. Therefor if you have a different name (like creepYaxis) yours would have to say "set Custom script: set udg_creepYaxis[udg_Integer] = GetUnitY(GetEnumUnit())"

    hope this helps with errors
     
  3. Astal

    Astal New Member

    Ratings:
    +1 / 0 / -0
    Hey im using this system and its causin crazy stuff too happen. If anyone could help id appreciate it.

     
  4. Lmfaocj

    Lmfaocj Active Member

    Ratings:
    +1 / 0 / -0
    Mmm, for some reason they are not respawning I set the bones to 200 seconds and the wait time for the resapwn is 120 game-time. help?

    never mind it works but i had to use "conversion - convert coordinates to point"
     
  5. Mythes

    Mythes Member

    Ratings:
    +7 / 0 / -0

    What are these "crazy stuff"? More details please....

    OMFG.. Didn't see his post was Feb 23, 2010 <-
    I read Jan, 23 2011.... My bad for reviving....
     
  6. pyrrrho

    pyrrrho New Member

    Ratings:
    +0 / 0 / -0
    =D Nice Trigger
    ... when I use it on my RPG map.. cant get the mobs to respaw xD

    I disabled all triggers exept this one.. still no respaw =D

    I copy the same code into a new map, make one mob works fine :))

    Any Idea.. I checked my Gameplayconstance for Flesh decay time seems all good :))
    That my Hero goes up to level 200 should not be a problem either =D

    I have 100's of Variables on my map.. maybe it interferes with some of them....


    I might have to go back to my old respaw system, which is not as great as this one but it works :))
     
  7. Darkonight

    Darkonight New Member

    Ratings:
    +2 / 0 / -0
    FINALY! This is so awesome and i love you! <3 Have been using some some ass kind of respawn trigger wile looking for this... "Unit died" "Create triggering unit at the position of triggering unit... Bleh>".
    And that one sucks... If u play it for an hour the hard creeps will spawn at the beginning.


    Alright, thanks alot man!




    PS: Love that u explained it so well... (Noob friendly((Perfect) for (Me))) :D
     
  8. YuchiRO

    YuchiRO New Member

    Ratings:
    +0 / 0 / -0

    I created trigger same with Magentix but creeps revive wrong location :( with default location. After that creeps still revive at wrong location.

    I also try with Tinki3 code but the result is the same with above.

    What should i do now ?
     
  9. vypur85

    vypur85 Hibernate

    Ratings:
    +797 / 0 / -0
    Obviously you did something wrong somewhere. You should correct it. I'm guessing there is something wrong with Map Init... We can help if can kindly you post your trigger.
     
  10. YuchiRO

    YuchiRO New Member

    Ratings:
    +0 / 0 / -0
    Here my trigger.

    trig1.jpg

    trig2.jpg

    Or

    trig3.jpg

    But creep revive not correct default location.
     
  11. vypur85

    vypur85 Hibernate

    Ratings:
    +797 / 0 / -0
    I believe Magentix uses a different method in the Map Init. His was more of a distance comparison while yours is coordinate comparison. Then again, I'm not too sure.

    Change yours to this instead:
    Code:
    Actions
        Wait 2.00 game-time seconds
        Set point = (Point(Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))]))
        Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at point facing Default building facing degrees
    
    It should work now.
    For the point variable, it's supposed to be 'Convert coordinates to point'. You're getting the unit X/Y values.
    Magentix method should be 'distance from center of map'. That's why it didn't work too well with your triggers.
     
    • Like Like x 1
  12. YuchiRO

    YuchiRO New Member

    Ratings:
    +0 / 0 / -0
    Yahooooooo, it's work like charm. Thanks in advanced.

    Do you have email or skype ? I want to add you.

    Another problem, how to make creep revive stronger after they have been revived ?

    Example: Increase hp 10%, increase damg 10%, increase armor 10% .. each time they revive.
     
  13. vypur85

    vypur85 Hibernate

    Ratings:
    +797 / 0 / -0
    Uh. I think you ought to post in the help zone to get more views and response.
     
  14. YuchiRO

    YuchiRO New Member

    Ratings:
    +0 / 0 / -0
    Why i set WAIT less than 10 second, it's working. But if i set WAIT =300 or 600 second, it's not work ?
     
  15. vypur85

    vypur85 Hibernate

    Ratings:
    +797 / 0 / -0
    Go to Terrain Editor. Then at the Advanced tab, go to Gameplay Constant. Look for 'Creep - Decay time'. Set that value to something higher than your reviving time.

    The reason it fails to revive is because once the unit is completely decayed (defaulted at 88 seconds I think), the unit will be removed completely from the game. So in your trigger, after 600 seconds, the unit no longer existed and 'Triggering unit' is no longer a valid event response.
     
    • Like Like x 1

Share This Page