How to: Create a Creep Revival System

Nexor

...
Reaction score
74
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
Reaction score
2
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
Reaction score
1
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
Reaction score
1
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
Reaction score
7
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
Reaction score
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 :))
 

Darkonight

New Member
Reaction score
2
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
Reaction score
0
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
Reaction score
803
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.
 

YuchiRO

New Member
Reaction score
0
Here my trigger.

trig1.jpg


trig2.jpg


Or

trig3.jpg


But creep revive not correct default location.
 

vypur85

Hibernate
Reaction score
803
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
Reaction score
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.
 

vypur85

Hibernate
Reaction score
803
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.
 

YuchiRO

New Member
Reaction score
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 ?
 

vypur85

Hibernate
Reaction score
803
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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top