wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-16-2006, 04:27 PM   #1
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default Creep Respawn System

Does exactly what it says, it isn't too complicated or anything. I might add a few more things at a later date but for now it's simple and gets the job done.


Hope it helps someone
Attached Images
File Type: jpg creep respawn img.JPG (8.7 KB, 883 views)
Attached Files
File Type: w3m Creep Respawning.w3m (16.7 KB, 808 views)
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-16-2006, 05:00 PM   #2
Whitehorn
SPOON!
 
Whitehorn's Avatar


Respected User
 
Join Date: Sep 1983
Posts: 4,899

Submissions (114)

Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)

Default

So, it does nothing?
__________________
My Wargame

Be excellent to each other.
Whitehorn is offline   Reply With Quote
Old 01-16-2006, 05:24 PM   #3
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default

No, it respawns dead creeps in their original position and is flexible enough to deal with all creeps that appear on the map when the map begins (that is, up to 8192 of them)

It's also very short and very easy to implement.
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Old 01-16-2006, 05:45 PM   #4
Whitehorn
SPOON!
 
Whitehorn's Avatar


Respected User
 
Join Date: Sep 1983
Posts: 4,899

Submissions (114)

Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)

Default

It was a hint to say that in your first post :)
__________________
My Wargame

Be excellent to each other.
Whitehorn is offline   Reply With Quote
Old 01-16-2006, 05:53 PM   #5
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

I checked your system:

It has memory leaks, that you will need to fix:

In the JASS trigger, you need to set the p and g local variables to null at the end of the function, to prevent those simple leaks.

Trigger:
For each (Integer A) from 1 to (Number of units in (Units owned by Neutral Hostile)), do (Actions)

Units owned by neutral hostile returns a unit group that will leak each time, the trigger executes. Please fix.

Also, most likely it will cause problems if you have too many units (and this can happen with just about 500 units or something like this) because of thread crashes. I would suggest you to use the units custom values to save their numbers, that way you could avoid having a limit at all, and prevent thread crashes.

This is, like you said, very simple, and would thefore fit the samples section better than systems, but if it shall be there, it needs very detailed commenting, so it can be used, not only as a system, but also to learn from.

Last thing: Please level up the Hero in another trigger that is not a part of the actual system, some people might not know how to remove that line and will thereby get problems when implementing.
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Old 01-16-2006, 06:30 PM   #6
emjlr3
Rehabbing
 
emjlr3's Avatar
 
Join Date: Jun 2005
Posts: 1,386

Submissions (14)

emjlr3 is a jewel in the rough (151)emjlr3 is a jewel in the rough (151)

Mapping Contest First Place

Send a message via AIM to emjlr3 Send a message via MSN to emjlr3
Default

there is an easier way of doing this, and better may I add, check the dota template
emjlr3 is offline   Reply With Quote
Old 01-17-2006, 02:23 AM   #7
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default

Whitehorn: I said what it did in the title, then later realized that I probably didn't make it clear enough but before I could update the post you posted ;)

Blade.dk : Whoa. Thanks a lot. That custom value thing is genuis... I'll get right on it :D

emjlr3: Hm. Im surprised it could be easier since this isn't more then 5 lines (well maybe a little more) but I'll check it out.
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Old 01-17-2006, 09:44 PM   #8
Jacek
Banned
 
Join Date: Dec 2004
Posts: 1,095

Submissions (1)

Jacek is a jewel in the rough (164)Jacek is a jewel in the rough (164)

Send a message via MSN to Jacek
Default

What this stuff does?
Jacek is offline   Reply With Quote
Old 01-17-2006, 11:09 PM   #9
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default

It respawns creeps simply and easily.

By the way, here's the upgraded creep system with Blade.dk's suggestions, it's much nicer now (not much difference will be noticed when you use it, except there should be no memory leaks and that it can deal with as many units as WC3's graphic engine can handle )

By the way, thanks for all the suggestions and stuff so far.
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Old 01-18-2006, 10:29 AM   #10
Blade.dk
.
 
Blade.dk's Avatar


Respected User
 
Join Date: May 2005
Posts: 1,990

Submissions (15)

Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)Blade.dk is a glorious beacon of light (418)

Approved Map: Azeroth's Arcane ArenaSpell session 01 winner

Send a message via MSN to Blade.dk
Default

Thanks for fixing it, approved (I also updated the attachment in the first post so the new one is there, to make things easier).

By the way

Collapse JASS:
    set eachUnit = 0 //gets rid of memory leaks, don't need to set p to null because it already is null
                //I THINK this gets rid of the leak but wouldn't guarentee it, I can't set it to null because I get a bug so I did the next best thing

You don't have to said that to null at all, and it isn't possible as you said. Integers doesn't need to be set to null, they doesn't leak.

The group variable leaks though, the group itself is destroyed, but better add this line "set g = null", to fix that leak, even though it is small :).
__________________
Spell Making Course: Part 1: Making a simple stomp spell.
I wonder if I'll ever finish part 2.
Blade.dk is offline   Reply With Quote
Old 01-19-2006, 05:21 PM   #11
Jacek
Banned
 
Join Date: Dec 2004
Posts: 1,095

Submissions (1)

Jacek is a jewel in the rough (164)Jacek is a jewel in the rough (164)

Send a message via MSN to Jacek
Default

I prefer to revive creeps with Reincarnation.
Jacek is offline   Reply With Quote
Old 01-22-2006, 09:09 AM   #12
Das Jank
User
 
Das Jank's Avatar
 
Join Date: Feb 2003
Posts: 283

Das Jank has little to show at this moment (4)

Send a message via AIM to Das Jank
Default

Reincarnation is worthless though becuase if the creep chases after someone then it will respawn where it dies, johnfn's script makes it so that the creep respawns at the original place you put it on the map, not to mention you wont have to add reincarnation to every creep you want to place on the map.

Huge props Johnfn, im sure ill be using this is the future.
__________________
To Do List: (Ha!)
Not fail out of college because of WC3. (60% completed)
Das Jank is offline   Reply With Quote
Old 02-06-2006, 11:42 PM   #13
Murder1833
User
 
Murder1833's Avatar
 
Join Date: Dec 2005
Posts: 152

Murder1833 has little to show at this moment (7)

Send a message via AIM to Murder1833 Send a message via MSN to Murder1833
Default

I tried implamenting it, but when I save, it disables the triggers due to "Expected a variable name"

Line 257
and
Line 258

Last edited by Murder1833 : 02-06-2006 at 11:45 PM.
Murder1833 is offline   Reply With Quote
Old 02-07-2006, 09:55 PM   #14
Freakazoid
I love you all.
 
Freakazoid's Avatar
 
Join Date: May 2003
Posts: 1,915

Submissions (14)

Freakazoid is a jewel in the rough (159)Freakazoid is a jewel in the rough (159)

Default

I'll post my system from SoV,..
__________________
Freakazoid is offline   Reply With Quote
Old 02-08-2006, 01:59 AM   #15
Linera
Banned
 
Linera's Avatar
 
Join Date: Oct 2004
Posts: 851

Linera seems to be the reincarnation of TerranUp16 (-62)Linera seems to be the reincarnation of TerranUp16 (-62)Linera seems to be the reincarnation of TerranUp16 (-62)

Send a message via MSN to Linera
Default

Nice, I'd use it but my RPG can't use it due to the way its made.

In my RPG each mob is a hero, and each mob has a different respawn time.
Plus when it respawns it randomly picks a level between 2 numbers for that mob, like one mob maybe between lvls 1-5 while another is 50-60.
Linera is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:32 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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