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



Reply
 
Thread Tools Search this Thread
Old 06-07-2006, 08:31 PM   #1
Tim.
Missing You All at Wc3c
 
Tim.'s Avatar


Site Owner
 
Join Date: Jul 2003
Posts: 4,474

Submissions (18)

Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)

Approved Map: PiratesSpell making session 3 winner

Default Spell Session 4: Tremor

NOTE: You have been redirected in order for our attachments to be made available to you. This will only last two minutes; these measures where taken to avoid hotlinking and bandwidth theft.
To avoid these restrictions Log in or Register

Click image for larger version

Name:	Tremor1.png
Views:	2531
Size:	17.7 KB
ID:	7242Tremor (JESP)

Description: The Desert Lord returns to his true form, the sand itself. He then manipulates the sand and minerals to his advantage, damaging and stunning all units in his path. For the finale a giant stone hand forms, then crushes all units in the nearby area. Any time the Desert Lord hits a unit, the unit is knocked into the air, damaged and then stunned. Both damage amounts and stun duration increase with level.

Screenshots:

Click image for larger version

Name:	Tremor2.JPG
Views:	1448
Size:	89.2 KB
ID:	7243Click image for larger version

Name:	Tremor3.JPG
Views:	1587
Size:	108.3 KB
ID:	7244Click image for larger version

Name:	Tremor4.JPG
Views:	1597
Size:	96.0 KB
ID:	7245

Download: Spell Contest 4 - Tim 3.2.w3x (50.7 kb)

Notes: This was my entry for Spell Session 4, and it came in third place. The spell is meant to go with a model such as this one, in order to match the sandy theme of the spell. The Reveneant model used here is only an example. Also, the spell meets the JESP Standard, is much easier to configure than my former spell, and is completely customizable. Even includes a Variable Stun system! (Thanks to blu_da_noob for the original system.)
__________________
"oO and if anyone called Tim. trys to make an account then kick there butts." -Mavus, moderator of the GTW forums


Avast! Seen Pirates? Get it here!
Tim. is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-07-2006, 10:10 PM   #2
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

A very nice spell, approved.

There are, however, some things that can be improved in your future spells:

You could make your configuration functions constant, that should make them run a bit faster.

Using the same function for all returns of the same type seems silly. The if statements slows it down, and if they were not there, the functions would be replaced with the actual values in an optimized map.

Collapse JASS:
function TremorTim_Cache takes nothing returns gamecache
    return TremorTim_Gamecache()
endfunction

This seems really pointless, a configuration function directly returning the return value of another configuration function in the same spell?

Using TriggerSleepActions with animations is really bad idea. You do not need to use a timer and another function there, but polling a timer (look at the function PolledWait's code) would give you a more beautiful result.

I don't really like that you use the same timer expiration function with a ton of if statements. Each if statement and declared variable that you do not use, is making the spell slower (even though it is not much).
I suggest you to seperate it, you can always just restart the timer and make it run another function, without having to reattach things.
Example:

Collapse JASS:
function ThirdTimerFunction takes nothing returns nothing
    local timer t = GetExpiredTimer()
    //actions actions actions actions
    if <condition if this part of the spell is over> then
        call DestroyTimer(t)
    endif
    set t = null
endfunction

function SecondTimerFunction takes nothing returns nothing
    local timer t = GetExpiredTimer()
    //actions actions actions actions
    if <condition if this part of the spell is over> then
        call TimerStart(t, 0.04, true, function ThirdTimerFunction)
    endif
    set t = null
endfunction

function FirstTimerFunction takes nothing returns nothing
    local timer t = GetExpiredTimer()
    //actions actions actions actions
    if <condition if this part of the spell is over> then
        call TimerStart(t, 0.04, true, function SecondTimerFunction)
    endif
    set t = null
endfunction
__________________
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 06-08-2006, 12:48 AM   #3
Tim.
Missing You All at Wc3c
 
Tim.'s Avatar


Site Owner
 
Join Date: Jul 2003
Posts: 4,474

Submissions (18)

Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)Tim. is a name known to all (502)

Approved Map: PiratesSpell making session 3 winner

Default

Quote:
Originally Posted by Blade.dk
You could make your configuration functions constant, that should make them run a bit faster.

Ouch, can't believe I forgot to add that in the end. Will fix.

Quote:
Originally Posted by Blade.dk
Using the same function for all returns of the same type seems silly.

Oh alright, I figured it was better like that :P I won't do it in the future.

Quote:
Originally Posted by Blade.dk
Collapse JASS:
function TremorTim_Cache takes nothing returns gamecache
    return TremorTim_Gamecache()
endfunction

This seems really pointless, a configuration function directly returning the return value of another configuration function in the same spell?

That's left over from a test I was running, forgot to remove it I guess. I'll fix that.

Quote:
Originally Posted by Blade.dk
Using TriggerSleepActions with animations is really bad idea.

Will do in the future, thanks.

Quote:
Originally Posted by Blade.dk
I don't really like that you use the same timer expiration function with a ton of if statements.

Like before, I assumed it was the best way. Won't do so again.
__________________
"oO and if anyone called Tim. trys to make an account then kick there butts." -Mavus, moderator of the GTW forums


Avast! Seen Pirates? Get it here!
Tim. is offline   Reply With Quote
Old 06-08-2006, 07:19 AM   #4
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

Well, depending on what is important for you, your method can be better than mine.

If you want to save a few bytes in the spell's size, then your method is best, but if you want it to be more efficient, then dropping the extra if statements and using seperate functions is best.
__________________
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 06-09-2006, 04:27 PM   #5
erwtenpeller
*****istrator
 
erwtenpeller's Avatar


Art Director
 
Join Date: Nov 2003
Posts: 8,759

Submissions (35)

erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)erwtenpeller has a brilliant future (922)

Skinning Contest 7 ~ Were-AnimalsConcept art session 3 - Dungeon

Default

GIANT HAND, LOL

pwns.
__________________
erwtenpeller is offline   Reply With Quote
Old 07-23-2006, 03:19 PM   #6
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

you know, it is not a JESP spell if the JESP manifest is not included in the map. The spell itself is awesome, or is it the model what is awesome, I don't know
__________________
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 08-08-2007, 10:55 AM   #7
Pyritie
Doesn't come here often
 
Pyritie's Avatar
 
Join Date: Jan 2007
Posts: 451

Submissions (9)

Pyritie will become famous soon enough (47)Pyritie will become famous soon enough (47)

Send a message via MSN to Pyritie
Default

How'd you make the unit's animation go backwards?

And don't yell at me about bumping. This is a resource. It's okay.
Pyritie is offline   Reply With Quote
Old 08-08-2007, 11:34 AM   #8
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's an open source map, how about you open it and look for yourself?
__________________
My Wargame

Be excellent to each other.
Whitehorn is offline   Reply With Quote
Old 08-08-2007, 02:09 PM   #9
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Open source != readable source
__________________
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 08-08-2007, 11:26 PM   #10
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

Vexorian == pedantic
__________________
My Wargame

Be excellent to each other.
Whitehorn is offline   Reply With Quote
Old 08-09-2007, 08:18 AM   #11
Rising_Dusk
Obscurity, the Art


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

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

Quote:
How'd you make the unit's animation go backwards?
call SetUnitTimeScale(MyUnit, -1.0) Negative animation speed reverses the animation.
You need to capture the animation in the last frames though, otherwise it won't work.
(That means don't let the animation finish)
__________________
Rising_Dusk is offline   Reply With Quote
Old 08-09-2007, 08:21 AM   #12
MaD[Lion]
MaD Da ViNci
 
MaD[Lion]'s Avatar


Respected User
 
Join Date: Apr 2003
Posts: 1,699

Submissions (10)

MaD[Lion] is a jewel in the rough (225)MaD[Lion] is a jewel in the rough (225)MaD[Lion] is a jewel in the rough (225)MaD[Lion] is a jewel in the rough (225)

Default

Quote:
Originally Posted by pyritie
How'd you make the unit's animation go backwards?

And don't yell at me about bumping. This is a resource. It's okay.

1. Play animation "death"
2. Set animation speed = 0
3. Abdakadabra....whatever
4. Set animation speed = -1

Enjoy the show
__________________
Current Projects:
MaDOS (outdated)System for object movements & effects - NEW VERSION IS UNDER W.I.P
Cinematic SystemSystem for making better cinematics and with fancy effects
Timing SystemTiming system that simulates the usage of PolledWait just with 0.01 accuracy
MaD[Lion] is offline   Reply With Quote
Old 08-09-2007, 01:15 PM   #13
Pyritie
Doesn't come here often
 
Pyritie's Avatar
 
Join Date: Jan 2007
Posts: 451

Submissions (9)

Pyritie will become famous soon enough (47)Pyritie will become famous soon enough (47)

Send a message via MSN to Pyritie
Default

Okay, thanks.
Pyritie is offline   Reply With Quote
Old 07-14-2008, 03:27 AM   #14
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 189

Dark_Dragon has little to show at this moment (9)

Default

Rely amazing, one of best spells I ever sow 5/5
Dark_Dragon is offline   Reply With Quote
Old 07-29-2008, 12:14 PM   #15
Titanhex
User
 
Join Date: Jul 2008
Posts: 34

Titanhex has little to show at this moment (5)

Default

An amazing spell for sure. However, I can't find the Map Script that I'm suppose to copy the Return Bug functions from. Could someone tell me where the Map Script is? All I've gotten so far is that I can export it.

Also when I save, 50 compiled errors arise dealing with udg and cannot convert null to integer.

Last edited by Titanhex : 07-29-2008 at 12:24 PM.
Titanhex 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 03:46 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