respawn trigger help

lulzersauce

New Member
Reaction score
0
I'm sure this is a constantly recurring thing around here, so I'm sorry to be posting a new one.

I'm making an RPG just to play around on by myself, maybe with a friend, not online or anything like that. and I'm having some trouble with making creeps respawn.

After trying once before, and giving up because I couldn't get this trigger to work, I scrapped the map, so I don't have a trigger to show you to see what's wrong with it.

Basically, what I want is for once a creep dies, for it to respawn. but whenever I did it, for example if the creep were supposed to respawn after 10 seconds, it would. but then after another 10 seconds, another one would spawn, and that would happen forever. the trigger wouldn't just create one, after the triggering unit died it would just keep spawning a new one every 10 seconds :(

so can anyone show me a simple die/respawn trigger?

also, is there any way to make it be a small chance at being a differet creep? like 90% chance to be a gnoll.. and 10% chance to be a golem for example? thanks in advance
 

Vaius

New Member
Reaction score
19
This should work.

Trigger:
  • Sample Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Sample_UnitType_1
    • Actions
      • Set Respawn_Point = (Position of (Dying unit))
      • Wait 10.00 seconds
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer A) Less than or equal to 9
            • Then - Actions
              • Unit - Create 1 Sample_UnitType_1 for Neutral Hostile at Respawn_Point facing Default building facing degrees
            • Else - Actions
              • Unit - Create 1 Sample_UnitType_2 for Neutral Hostile at Respawn_Point facing Default building facing degrees


EDIT: For clarification, the Integer A Loop is for 90% chance of spawning Sample Unit 1, and 10% chance of spawning Sample Unit 2.
 

Squirel

New Member
Reaction score
13
That integer loop will actually create 9 Sample_Unit_1's and 1 Sample_Unit_2...
If you want it to work properly (10% chance of unit 2, 90% chance of unit 1), you want an if then with the condition "Radom Integer between 1 and 10 is Greater Than 9"
 

LordXavier

TH.net Regular
Reaction score
16
Here, download Ryoko Heroes, Creeps, and Items.w3x, has a very effective and MUI system for reviving creeps and heroes. It also has a trigger that combines item charges (if you have a potion of lesser healing with one charge and you pick another one up with 2 charges it makes it so you end up with one in you inventory with 3 charges, rather than 2, 1 with 1 charge and 1 with 2 charges)
 

Squirel

New Member
Reaction score
13
You know what else has a good creep respawn (and item system) is the Orc Campaign that you have with WCIII. You might look at that (I mean the TFT campaign with Rexxar and all that. It is basically a RPG).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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