Creep respawn

  • Thread starter Thread starter l2ankor
  • Start date Start date
L

l2ankor

Guest
I havnt been able to figure out a good way to consistantly respawn creeps. The best that ive been able to come up with only respawns the creeps once. PLZ HELP ME:eek:
 
make a unit table and include trhe creps u want to respawn.
ive never used one and i have no idea how u would turn it on or place the creeps but i know it involves a unit table.
 
Well, you can do it with a simple trigger.

Code:
Events - A Unit Dies

Conditions : (Unit-type of (Dying Unit)) Equal To (The units you want to revive)

Actions : Create 1 (Unit-type of (Dying Unit)) for (Owner of (Dying Unit)) at (Location of (Dying Unit)) Facing default building facing degrees.
That trigger should work if you specify the correct units.
 
That's not quite correct.

Code:
Events:
    [Unit - Player-owned unit event]
    A unit owned by neutral hostile dies
Conditions:
Actions:
    Wait 120 seconds
    If
        [Boolean Comparison]
        ((dying unit) is fogged to (owner of (dying unit)) equal to true
    Then
        [Unit - Create unit facing angle]
        Create 1 (unit-type of (dying unit)) at (position of (dying unit)) facing (random angle)
    Else
        [Trigger - Run trigger (checking conditions)]
        Run (this trigger) (checking conditions)
 
For a somewhat more sophisticated way of doing things:

Code:
Init
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Set RespawnRegions[1] = Respawn 1 <gen>
        Set RespawnRegions[2] = Respawn 2 <gen>
        Set RespawnRegions[3] = Respawn 3 <gen>
        Set RespawnRegions[4] = Respawn 4 <gen>
        Set Counter = 1
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Set GroupStart[(Integer A)] = Counter
                Unit Group - Pick every unit in (Units in RespawnRegions[(Integer A)]) and do (Actions)
                    Loop - Actions
                        Unit - Set the custom value of (Picked unit) to (Integer A)
                        Unit Group - Add (Picked unit) to SpawnGroups[(Integer A)]
                        Set Graveyard[Counter] = (Unit-type of (Picked unit))
                        Set Counter = (Counter + 1)
                Set GroupEnd[(Integer A)] = (Counter - 1)


Death
    Events
        Unit - A unit owned by Neutral Hostile Dies
    Conditions
        ((Triggering unit) is in SpawnGroups[(Custom value of (Triggering unit))]) Equal to True
    Actions
        Unit Group - Remove (Triggering unit) from SpawnGroups[(Custom value of (Triggering unit))]
        If ((SpawnGroups[(Custom value of (Triggering unit))] is empty) Equal to False) then do (Skip remaining actions) else do (Do nothing)
        Countdown Timer - Start RespawnTimers[(Custom value of (Triggering unit))] as a One-shot timer that will expire in (Random real number between 20.00 and 50.00) seconds


Respawn1
    Events
        Time - RespawnTimers[1] expires
    Conditions
    Actions
        Wait until (RespawnInProgress Equal to False), checking every 2.00 seconds
        Set RespawnIndex = 1
        Trigger - Run Respawn <gen> (ignoring conditions)


Respawn2
    Events
        Time - RespawnTimers[2] expires
    Conditions
    Actions
        Wait until (RespawnInProgress Equal to False), checking every 2.00 seconds
        Set RespawnIndex = 2
        Trigger - Run Respawn <gen> (ignoring conditions)


Respawn3
    Events
        Time - RespawnTimers[3] expires
    Conditions
    Actions
        Wait until (RespawnInProgress Equal to False), checking every 2.00 seconds
        Set RespawnIndex = 3
        Trigger - Run Respawn <gen> (ignoring conditions)


Respawn4
    Events
        Time - RespawnTimers[4] expires
    Conditions
    Actions
        Wait until (RespawnInProgress Equal to False), checking every 2.00 seconds
        Set RespawnIndex = 4
        Trigger - Run Respawn <gen> (ignoring conditions)


Respawn
    Events
    Conditions
    Actions
        Set RespawnInProgress = True
        Set RespawnRegion = RespawnRegions[RespawnIndex]
        Wait until (((Center of RespawnRegion) is visible to Player 1 (Red)) Equal to False), checking every 3.00 seconds
        For each (Integer A) from GroupStart[RespawnIndex] to GroupEnd[RespawnIndex], do (Actions)
            Loop - Actions
                Unit - Create 1 Graveyard[(Integer A)] for Neutral Hostile at (Random point in RespawnRegion) facing (Center of RespawnRegion)
                Unit - Set the custom value of (Last created unit) to RespawnIndex
                Unit Group - Add (Last created unit) to SpawnGroups[RespawnIndex]
        Set RespawnInProgress = False


This will wait until an entire group is dead before respawning it.
A group being defined by all units within a region (4 in my example)


Of course, it needs a whole set of variables...

Code:
RespawnInProgress	Boolean
Counter			Integer
RespawnIndex		Integer
GroupEnd		Integer Array[4]
GroupStart		Integer Array[4]
RespawnRegion		Region
RespawnRegions		Region Array[4]
RespawnTimers		Timer Array[4]
SpawnGroups		Unit Group Array[4]
Graveyard		Unit-Type Array[100] (must be large enough to hold every Creep within the wanted regions)


That said, it works rather nicely :)


HTH
AceHart
 
hey ace i tried ur triggers and when ever the camp respawns wc3 shots down??!! wtf is up with that??
check out my map if u dont beleive me
 

Attachments

Congratulations, you created an endless loop :)

The timer-is-expired triggers 1 to 4 don't run "respawn 1" at the end, but simply "respawn"...

The name of the "respawn" trigger is misspelled as "respawm".

The create unit trigger in respawn is supposed to use "create unit facing point" not "angle".


Yours
AceHart

P.S.: I have crashed maps before, but, so far, never with a trigger I posted here :)
 
Congratulations, you created an endless loop :)

The timer-is-expired triggers 1 to 4 don't run "respawn 1" at the end, but simply "respawn"...

The name of the "respawn" trigger is misspelled as "respawm".

The create unit trigger in respawn is supposed to use "create unit facing point" not "angle".


Yours
AceHart

P.S.: I have crashed maps before, but, so far, never with a trigger I posted here :)
 
your the man dude!!!
thx alot for helping me out, it works great now :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top