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 > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-02-2009, 10:15 AM   #16
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,154

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Troll-Brain
An hero abiliy doesnt need to be preloaded ?
AFAIK yes ...
but you will have to preload all your (multilevel) spells which are cast by dummy casters
__________________

Last edited by akolyt0r : 04-02-2009 at 10:16 AM.
akolyt0r is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-02-2009, 12:53 PM   #17
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

PreloadAbil ....

and obviously if you use a users dummy unit for this it wont leave a corpse and ppl wont allow it to fire off death event triggers - that is silly

what is even sillier is creating/destroying timers and removing units (both which I thought everyone here hated) just to get rid of your preload unit
__________________

Last edited by emjlr3 : 04-02-2009 at 12:56 PM.
emjlr3 is offline   Reply With Quote
Old 04-02-2009, 01:14 PM   #18
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Pros of leaving it alone:
1.) PreloadAbility is a pretty specific function name, changing it would be lame.
2.) The user won't need this library if they have CS in their map.
3.) CS does not seem to be be used often anymore.

Cons:
1.) If they need both CS and a library that requires this, they would have to delete this library and make things not require it.

I am leaning toward leaving it alone.
I had to add an ugly XE_ prefix to my new PreloadAbility, so I will really find it hard to let you leave it alone.

On the other hand, I could just make PreloadAbility a module like what happened to timer utils. Then I add PreloadAbility to XE_Preload so it can implement this new 'standard'.

emjlr3 is right that when using a dummy unit TimedLife is better, since you are going with the bad habit of using a peasant then maybe you are right about this. Though creating a peasant has side effects - for example what if during init some trigger picks all peasants in the map? - I am going to update XE_preload as it seems that a dummy unit is the only way to go with this. Believe it or not people still use CS, not an insignificant amount.

The alternative to using TimedLife would be to use a timer and NOT destroy it. Or use TimerUtils just for the recycling, I prefer a small timer leak. Using TimedLife is not a good solution if a normal unit is in use, imagine a peasant death event firing after map init, sounds fun...

Quote:
removing units (both which I thought everyone here hated)
There's nothing wrong about removing units, specially a private unit like this one.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-02-2009, 05:04 PM   #19
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

I will change the name to "AbilityPreload" and use ObjectMerger to create an appropriate dummy unit that can be killed with timed life.
grim001 is offline   Reply With Quote
Old 04-03-2009, 12:28 AM   #20
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Just creating the peasant will fire funny events.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-03-2009, 12:37 AM   #21
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Well, those events are unlikely to be initialised by then.

It would really be nice if we could have a standard for ability preloading. Unfortunately, if you use a regular unit there are some issues and if you use a dummy unit it has to be a part of a system like xe or CS. Still, getting a consensus on this would be nice.
__________________
Anitarf is offline   Reply With Quote
Old 04-03-2009, 04:09 AM   #22
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Quote:
Well, those events are unlikely to be initialised by then.
Not as much as you'd think.

Another library could easily run its initializer before this as long as it doesn't require it.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-03-2009, 07:32 AM   #23
Tyrande_ma3x
User
 
Tyrande_ma3x's Avatar
 
Join Date: Feb 2009
Posts: 185

Submissions (1)

Tyrande_ma3x is on a distinguished road (12)

Default

Just add a global configurable with the unit type so the user will decide which unit he should use to preload his abilities (this way he could avoid unwanted problems).

EDIT: Someone should make a script "PreloadUtils" that allows unit, item, spell, etc. preloading..

Last edited by Tyrande_ma3x : 04-03-2009 at 11:21 AM.
Tyrande_ma3x is offline   Reply With Quote
Old 04-03-2009, 01:06 PM   #24
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

OK, all of the mentioned problems have been solved, take another look.
grim001 is offline   Reply With Quote
Old 04-03-2009, 02:03 PM   #25
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

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

You know. There are plenty of scripts that create units such as footmen and are approved. I in no way think a dummy unit is necessary. Just use a footie and be done with it. In any case, this gives Vex a reason to implement "prelibraries" or whatever he ends up calling them.
__________________

Last edited by Rising_Dusk : 04-03-2009 at 02:04 PM.
Rising_Dusk is offline   Reply With Quote
Old 04-03-2009, 02:49 PM   #26
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Yeah that's right, we should do something about that footman abuse. Should start a search for 'hfoo'
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-03-2009, 03:40 PM   #27
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by Rising_Dusk
I in no way think a dummy unit is necessary.

Good, I decided not to use one. I just picked an incredibly obscure unit type instead. Anyway, the script is in its final form now.
grim001 is offline   Reply With Quote
Old 04-03-2009, 04:48 PM   #28
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

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

So why did you remove the thing that prevents people from adding abilities to the unit at runtime?
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-03-2009, 05:06 PM   #29
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

hmnn

how about locusts? Or the disease cloud?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 04-03-2009, 05:09 PM   #30
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

Quote:
Originally Posted by Rising_Dusk
So why did you remove the thing that prevents people from adding abilities to the unit at runtime?

That got deleted by accident, fixing it

Quote:
Originally Posted by Vexorian
how about locusts?

Already using it
grim001 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 12:04 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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