How to: Create a Creep Revival System

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.
 

Argentine

New Member
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
 

Astal

New Member
Hey im using this system and its causin crazy stuff too happen. If anyone could help id appreciate it.

I think its because of a leak but i really dont know. One area of my map, creeps spawn uncontrollably.

Ive been using this same trigger in different maps and always had problems with it. If anyone gets a chance could you look over it and see if it looks ok?

These are my triggers.

Trigger:
  • 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())


Trigger:
  • Revive Creeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CreepRespawnTime Greater than 0.00
        • Then - Actions
          • Wait CreepRespawnTime game-time seconds
          • Unit - Create 1 (Random level CreepLevel creep unit-type) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing (Random angle) degrees
          • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
        • Else - Actions
          • Wait 30.00 seconds
          • Unit - Create 1 (Random level CreepLevel creep unit-type) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing (Random angle) degrees
          • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
 

Lmfaocj

Active Member
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"
 

Mythes

Member
Hey im using this system and its causin crazy stuff too happen. If anyone could help id appreciate it.

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....
 

pyrrrho

New Member
=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 :))
 

Darkonight

New Member
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
 

YuchiRO

New Member
Add a point variable array named tempPoint

Can then be made leakless like this:

Code:
Revive Creeps 1 by 1
    Events
        Unit - A unit Dies
    Conditions
        ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
    Actions
        Wait 5.00 game-time seconds
        Set tempPoint[1] = (Center of (Entire map))
        Set tempPoint[2] = tempPoint[1] offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])
        Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at tempPoint[2] facing (Random angle) degrees
        Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
        Custom Script: call RemoveLocation(udg_tempPoint[1])
        Custom Script: call RemoveLocation(udg_tempPoint[2])
Assuming Center of Entire map doesn't leak and you'd want the trigger leakless

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 ?
 

vypur85

Hibernate
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 ?
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.
 

vypur85

Hibernate
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.
 

YuchiRO

New Member
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.
 

vypur85

Hibernate
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.
Uh. I think you ought to post in the help zone to get more views and response.
 

vypur85

Hibernate
Why i set WAIT less than 10 second, it's working. But if i set WAIT =300 or 600 second, it's not work ?
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.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    They aren't cutting my responsibilities or interjecting in my management abilities or anything, it's just stupid shit that comes up. And they don't exactly have people lining up for my job, there's not that many people applying for the positions I hire
  • Varine Varine:
    Eh, whatever. Thanks for listening guys
  • jonas jonas:
    Sure :) Let us know how it ends
  • Varine Varine:
    All of these things will end happily, they're just stressful. And I still lack many good friends that I can go to, and the ones I can are preoccupied with similar things. Thus general chit chat, cuz for some reason TH and Ghan and Tom all actively keep it up.
  • Varine Varine:
    Just gotta keep Miss Mazie up through the week until her shock wears off and she realizes that she still has family all around her, and bossman will do whatever he's going to do and I'll respond appropriately when it happens. Thank you all for the support, I do very much appreciate everyone being here for me through the years
    +3
  • vypur85 vypur85:
    Best of luck Varine!
  • vypur85 vypur85:
    I just gotten myself an offer to work in China. The pay quadruples my current one. Damn.... Not really ready to start a new life there in China.
  • The Helper The Helper:
    I have heard that they pay pretty good to English teachers in China - you would be an expat
  • jonas jonas:
    Cool, what kind of job?
  • Accname Accname:
    I would be careful with jobs in China. They can be hit and miss depending on where in China you go. Places like hong kong / Shengzen / Beijing can be neat. Other places not so much.
  • Accname Accname:
    I would recommend searching for some first person experiences for the city you got the offer in. Especially now when the political situation in China is deteriorating.
  • jonas jonas:
    Accname, long time no see
  • jonas jonas:
    What have you been up to
  • tom_mai78101 tom_mai78101:
    Hey Accname, welcome back.
  • Accname Accname:
    Not much. Working in the Renewable Energy Sector as an IT Consultant. Its okay, but I think I preferred working at the university. It was more relaxed and you met all kinds of crazy people there.
  • vypur85 vypur85:
    I gotten a teaching position for Biology in a college in Wuhan (yes, there)... I suppose it should be fine there (I hope). Many of my ex colleagues are teaching in China as well currently (none in Wuhan though)
  • vypur85 vypur85:
    And I signed the contract already. I guess there's no turning back....
  • jonas jonas:
    @Accname how many hours do you work? I heard in some sectors IT consultants rack up insane hours
  • jonas jonas:
    @vypur85 sounds nice, have fun : )
  • Accname Accname:
    I am supposed to work 40 hrs a week, but I can work more if I like and I will be paid for those hours (as long as I don't go too far, there are laws and company policies, etc)
  • Accname Accname:
    In practice its basically work as much as you like, as long as the job gets done in time.
  • jonas jonas:
    Haha, my job is like that as well... that usually means I have a few 70-80 hours weeks a year, and lots of 20 hours weeks...
  • jonas jonas:
    a few weeks ago, one of my friends basically said "jonas, I received an invitation to submit something to conference X but I'm too lazy to do it and also the conference isn't advanced enough for my high level of research*, why don't you write something? Oh by the way, the deadline is in two weeks. Enjoy!" so I got two 80 hour weeks out of that kind offer. (*of course he didn't say those parts, but it's a better story this way)
  • jonas jonas:
    now I'll have next week off to make up for overtime :p and I'll play some good old gothic 2
  • The Helper The Helper:
    Hope you are enjoying that gothic 2~

    Staff online

    • Ghan
      Administrator - Servers are fun

    Members online

    Affiliates

    Hive Workshop NUON Dome
    Top