• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Respawn Creeps in region for Quest

Status
Not open for further replies.
Level 2
Joined
Oct 16, 2004
Messages
16
I'm trying to figure out how to make all the creeps in a specific region respawn (Assuming they're dead) when a quest is initiated.

Like if theres a quest in a specific region, but the player has already been to that area and killed everything there before recieving the quest. I wouldn't want the quest area to just be completely barren when they return.

Thanks!
 
Level 2
Joined
Oct 16, 2004
Messages
16
That clarified the setup for me, but I'm still having a little trouble with the actual revive trigger.

I don't want the units to just respawn on their own every few minutes. Just when the quest is initialized. But I'm still not sure how to do that without just creating a bunch of doubles if of the units if they haven't been killed yet.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
respawn

I think there are 2 ways to solve this problem:

1. You use a trigger similar to:

Event Unit dies

If Number of Units in "region you want to have" = 0

Create that and that unit in "region you want to have"

2.

Make an integer and special units which only appear in the region for the quest.

Trigger:

Event Unit dies

If Unit type of triggering unit = "the special unit type you created"

Action set "integer" = "integer" plus 1

If "iteger" = "number of creeps in that area

Action create unit...

OR 3.

Event Unit dies...

If unit type = "special unit"

create...unit

OR 4.

Event Unit dies...

pick every unit in "region" and do

if picked unit = triggering unit

create unit...




You should use all this ideas with a "wait" or a timer...

I hope that helped you.. IF NOT pm me and send me the trigger you have already and I go through it and solve your problem...

Azazel
 
Level 3
Joined
Feb 13, 2008
Messages
65
It seems that people are over complicating this; here is what I would do:

  • Events -
    • Time - Every 30.00 seconds of game time
  • Conditions -
  • Actions -
    • If - Conditions
      • (Number of units in (Units in (YourRegion) matching (((Matching Unit) belongs to an enemy of Player 1 (Red)) Equal to True)) Equal to 0
    • Then - Actions
      • Unit - Create 1 UnitYouWant for PlayerYouWant at (Random Point in (Your Region)) facing Default Building facing degrees.
    • Else - Actions
Basically, what this does is this:

Every 30 seconds, it checks a region (The region which you will have to place around the area where these quest units are) to see how many enemy units are there. (Keep in mind that player red might not be the one you want the "belongs to an enemy of player" condition to go against, so change that accordingly).

Then, if it records that the number of enemies in that region are 0, it will spawn 1 (Repeat this action trigger however many times you need) at a random point within that region. (If you want the units to spawn at fixed points, you can physically add those regions.

Just seems so much simpler
 
Level 8
Joined
May 25, 2008
Messages
125
It seems that people are over complicating this; here is what I would do:

  • Events -
    • Time - Every 30.00 seconds of game time
  • Conditions -
  • Actions -
    • If - Conditions
      • (Number of units in (Units in (YourRegion) matching (((Matching Unit) belongs to an enemy of Player 1 (Red)) Equal to True)) Equal to 0
    • Then - Actions
      • Unit - Create 1 UnitYouWant for PlayerYouWant at (Random Point in (Your Region)) facing Default Building facing degrees.
    • Else - Actions
Basically, what this does is this:

Every 30 seconds, it checks a region (The region which you will have to place around the area where these quest units are) to see how many enemy units are there. (Keep in mind that player red might not be the one you want the "belongs to an enemy of player" condition to go against, so change that accordingly).

Then, if it records that the number of enemies in that region are 0, it will spawn 1 (Repeat this action trigger however many times you need) at a random point within that region. (If you want the units to spawn at fixed points, you can physically add those regions.

Just seems so much simpler

yes but i think checking 8 hero sieges and 10 hero sieges will solve ur problem easier just check their respawn trigger and see how they do it..
 
Status
Not open for further replies.
Top