Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   Systems (http://www.wc3c.net/forumdisplay.php?f=648)
-   -   Creep Respawn System (http://www.wc3c.net/showthread.php?t=90302)

Themerion 01-01-2007 12:09 PM

Creep Respawn System
 
2 Attachment(s)
Creep Respawn System v2.6!

Updated to work with Warcraft III 1.24 and above!

Expand JASS:

Purpose

The Creep Respawn system is intended to greatly simplify the process of automatically respawning creep groups for you. A creep group is a group of creeps (1 or more) which will respawn after every unit in the group dies.

Requirements:
Features:
  • Very easy to use.
  • Respawning creeps will remember their original position, facing and acquisition range.
  • Supports randomly spawning a group from a list of pre-defined setups.
  • Has the possibility to suspend respawn if certain units are too close to the spawn point.
  • The respawn-trigger will detect unit death, changed ownership, RemoveUnit and ReplaceUnit (AutoIndex doesn't seem to function properly for this).
  • Simple setup:

    Just make a region around your pre-placed creeps, and do like this:
    In the example, Creep1<gen> is a region (JASS: rect).

    Trigger:
    Test map Init
    Collapse Events
    Time - Elapsed game time is 5.00 seconds
    Conditions
    Collapse Actions
    -------- ----------------------------------------------------- --------
    Set aRegionVariable = Creep1 <gen>
    Custom script: call CRS_CreateGroup(udg_aRegionVariable)
    --------
    -------- Now the creeps in the region Creep1 will respawn as a group. -------
    Now you might think that: "Hey, Custom Script! That's not easy at all!" Relax. You don't have to understand anything. Just copy the script and it will work :)

ArchWorm 01-06-2007 09:48 AM

This system was made 1000 times on GUI and 10000 times was optimised on JASS. I seriously doubt its usefulness.

Themerion 01-06-2007 11:02 AM

I'm not sure if I get your point. When you say "this system", do you refer to exactly this system or this kind of systems?

If you mean that there already are a lot of creep respawn systems, then my answer is simple: There are none at wc3campaigns -> Resources -> Systems.

If you mean that my system isn't useful, then that would be a subjective opinion. I have myself implemented this in a map of mine, and the creation of many respawning creeps have never been easier. Have you actually looked at the code?

Dionesiist 01-06-2007 11:16 AM

Hell, it's not that hard really...
Quote:

CSCache 14.1
I made one once that didn't need anything

Themerion 01-07-2007 10:40 AM

Ok, sorry. To be more precise, the system requires JASSHelper 0.9.x (which CSCache also is dependant on). Yes, of course I could have made it dependant on nothing! But no sane scripter would make anything without vJASS these days...

I made this decision because vJASS makes it:

* Faster than anything you could ever produce without it.
* Deadly easy to implement.

I cannot know how your system was, Diolenist, but with this system, I can set up all the automatically respawning creep spawns in my map in 1 trigger. It look like this:

Trigger:
Create Groups
Collapse Events
Map initialization
Conditions
Collapse Actions
-------- Spawn 7 random level 3 creeps --------
Set TempInt = 7
Set TempInt2 = 3
Set TempLoc = (Center of Creep1 <gen>)
Custom script: call CreepCreateGroup(udg_TempInt2,udg_TempLoc,udg_TempInt)
-------- --- --------
-------- Spawn 3 Riflemen --------
Set TempInt = 3
Set TempType = Rifleman
Set TempLoc = (Center of Creep2 <gen>)
Custom script: call CreepCreateGroup(udg_TempType,udg_TempLoc,udg_TempInt)
-------- --- --------
-------- Spawn 4 Random Creeps of Level 5 --------
Set TempInt = 4
Set TempInt2 = 5
Set TempLoc = (Center of Creep3 <gen>)
Custom script: call CreepCreateGroup(udg_TempInt2,udg_TempLoc,udg_TempInt)
-------- --- --------
Custom script: call SpawnAllNewGroups()

As I understand from your post, you have vast JASS experience, so you surely notice that the only thing that's needed is the CreepCreateGroup command which takes a level/a unit-type, the number of creeps and the location of the group.

I'll edit the first post to contain this stuff...

blu_da_noob 01-18-2007 01:54 PM

Seems pretty useful (not just your standard fare anyway). You will definitely need to add some usage and installation instructions though.

Themerion 01-23-2007 10:40 PM

Quote:

Originally Posted by blu_da_noob
You will definitely need to add some usage and installation instructions though.


Okay, I've made a try for documentation and instructions in 1.2. Response (negative or positive) would be appreciated =)

Xlightscreen 01-24-2007 03:43 AM

one question unless I missed it somewhere on the first post does this keep creeps from spawning into unmovable places like cliffs and in trees?

Themerion 01-24-2007 02:02 PM

It spawns units in an equivalent way of a normal trigger.

If you attempt to spawn them onto, for instance, a tree; then they will appear close to the tree instead of on it.

Themerion 01-28-2007 01:17 PM

As I've realised that not everybody is a scripting guru, I've decided to create and maintain two versions simultaneously. One for people using JASSHelper, and one for mortals (called CreepRespawnSystem1.3i). Hopefully this will make the system more attractive for people who generally doesn't script.

EDIT
Yeah, having 2 versions of a map is dumb. I've merged them into 1.4.

blu_da_noob 02-01-2007 02:41 PM

Ok, usage instructions seem good. Don't see any code problems. Approved.

Aray 02-02-2007 06:42 AM

Quote:

Originally Posted by Themerion
It spawns units in an equivalent way of a normal trigger.

If you attempt to spawn them onto, for instance, a tree; then they will appear close to the tree instead of on it.

He also mentioned cliffs you know. What if there is a cliff with plenty of room to spawn on but no way to get down from?

Themerion 02-02-2007 10:59 AM

I think there has been some kind of misunderstanding... This system respawns unit in a certain location. Which you decide. It doesn't respawn them randomly across the map. (Or did you mean something else?)

MoCo 01-05-2008 05:07 PM

I like it and think I'm gonna use it for a new rpg project.

Here a some small suggestions you may think about to add for a bit more flexibility:

- 2 or maybe 3 different unit types per group (so that you can create mixed groups). TempType1, TempType2 etc. Should be pretty easy to add and if you want only one unit type you just don't set TempType2 or TempType 3.

- If it's not already implented: the possibility that each unit of the group spawns at a random point within the specified region (to avoid all units being concentrated at one point) to make it look and feel more realistic.

Just suggestions, anyway good sys.

Themerion 01-06-2008 08:14 PM

Thank you for the suggestions! Sure, I'll implement the things you asked for.


All times are GMT. The time now is 03:08 AM.

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services