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



Reply
 
Thread Tools Search this Thread
Old 11-11-2007, 03:02 AM   #1
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default Black Hole

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

Zoom (requires log in)
B l a c k H o l e
Download
Blackhole.w3x
Requested by darkwulfv and spawned from the Spell Request thread.
Requires cohadar's ABC System to be used.
Thread
Spell Request Thread
The hero tears a hole in the fabric of space, creating a black hole that sucks enemy units within a X AOE radius. Enemy units who stray too near and get within Y units near the black hole will get sucked in. After Z seconds, the black hole collapses and explodes, dealing XX damage in a YY AOE radius and knocking them backwards. Units sucked in the hole will also get damaged and be thrown out of the void it was sucked into.
Written by
Malf
Attached Images
File Type: jpg BTNBlackHole.JPG (1.4 KB, 2610 views)
Attached Files
File Type: w3x Black Hole.w3x (86.5 KB, 1103 views)

Last edited by Malf : 11-29-2007 at 03:15 AM.
Malf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-11-2007, 09:59 AM   #2
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

ive seen 2 black hole spells already, and tried to import in my map, but they affect structures which i dont want to affect, i tried configuring them but still affect the structures

i hope this doesnt affect structures

is this a system?
__________________
waaaks is offline   Reply With Quote
Old 11-11-2007, 11:01 AM   #3
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

If you've configured them then it might be a problem with those spells.

This is a normal spell, doesn't follow the JESP standard since I was too lazy to add the JESP manifest.
The spell itself is 100% configurable though.

Btw, I'm noypi as well =
__________________

Last edited by Malf : 11-11-2007 at 11:03 AM.
Malf is offline   Reply With Quote
Old 11-11-2007, 11:06 AM   #4
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Always post the spell code.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 11-11-2007, 02:21 PM   #5
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,269

Submissions (17)

moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

I've done a quick review, and this is what I've found:
  • You are not indicating that your system uses ABC from cohadar (yes cohadar, kill him :P) Please add this to the first post.
  • If I cast the spell very near to the caster, the caster is knockbacked with the enemies, weird!!
  • You use this formula to calculate the movement:
    Collapse JASS:
    set x = x + d.expiration * Cos(a*0.01745)
    set y = y + d.expiration * Sin(a*0.01745)

    You are summing distance with velocity. If you want to be more accurate, you should use d.expiration * SUCK_INTERVAL and it's more unit homogeneous (sum distance with distance).
  • You must set the dust effect as a constant global.
  • Just a suggestion, your indent makes look your code messy, try to add more spaces, it helps a lot to read the code.
  • There's already a BlackHole spell (a JESP one) done by Blade.dk. You can see it here

Because this spell has been done, in theory I should graveyard this, so I need a good justification why it should be approved.
moyack is offline   Reply With Quote
Old 11-11-2007, 02:41 PM   #6
darkwulfv
Alpha Male of Wc3c
 
darkwulfv's Avatar


Official Map Reviewer
 
Join Date: Mar 2006
Posts: 3,646

Submissions (6)

darkwulfv is just really nice (270)darkwulfv is just really nice (270)

Send a message via AIM to darkwulfv
Default

Because the spells are different.

Blade's removes the units entirely and damages nearby ones.

This one sucks enemies in and holds them there, then the black hole implodes, sending the ones sucked in flying and damaging other units.

Quote:
Originally Posted by Moyack
If I cast the spell very near to the caster, the caster is knockbacked with the enemies, weird!!
I think this was intended. If you made a black hole in your face, I think you'd be eaten by it as well.
__________________
The Spell Request Thread
Quote:
Originally Posted by Joe-Black-5
a dota like map but with unique stuff
(There was no map attached, and that was all the thread said.)
Spells I've Made

Darkwulfv's Lightning Grapple || Tritanis' Lazy Bolt

darkwulfv is offline   Reply With Quote
Old 11-11-2007, 02:44 PM   #7
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

I will let him live for now.

Mainly because he knows how to import ABC.
(You would be surprised at the amount of people who copy whole ABC text on top of their trigger text, they think it is a macro or something!? )

He also used private actions and conditions, that is a big plus.

He did not use local trigger:
Collapse JASS:
function InitTrig_Black_Hole takes nothing returns nothing
 set gg_trg_Black_Hole = CreateTrigger(  )
 call Preload(BlackHole_FX)
 call Preload(Explode_FX)
 call Preload("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
 call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SPELL_EFFECT )
 call TriggerAddCondition( gg_trg_Black_Hole, Condition( function Conditions ) )
 call TriggerAddAction( gg_trg_Black_Hole, function Actions )
endfunction

Collapse JASS:
public function InitTrig takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call Preload(BlackHole_FX)
    call Preload(Explode_FX)
    call Preload("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
endfunction

// InitTrig is public, remember that.


The greatest remark is terrible indentation of the code.
Learn to use tabs instead of spaces.
(or use 4 spaces if your editor does not support tabs)

------
This is close to being JESP, he just needs some more work.

EDIT:
You should use this for a spell icon:
ReplaceableTextures\CommandButtons\BTNGenericSpellImmunity.blp
It is an active spell after all.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.

Last edited by cohadar : 11-11-2007 at 02:49 PM.
cohadar is offline   Reply With Quote
Old 11-11-2007, 02:52 PM   #8
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,269

Submissions (17)

moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)moyack is a splendid one to behold (661)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Quote:
Originally Posted by darkwulfv
Because the spells are different.

Blade's removes the units entirely and damages nearby ones.

This one sucks enemies in and holds them there, then the black hole implodes, sending the ones sucked in flying and damaging other units.
I see... then I'll let continue this thread :)

Quote:
Originally Posted by darkwulfv
I think this was intended. If you made a black hole in your face, I think you'd be eaten by it as well.
The caster is not eaten, only knockbacked. I think this should be configurable in the spell too.

Quote:
// InitTrig is public, remember that.
It's not necessary to make it public.

Last edited by moyack : 11-11-2007 at 02:55 PM.
moyack is offline   Reply With Quote
Old 11-11-2007, 03:24 PM   #9
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)cohadar is a jewel in the rough (246)

Default

Quote:
Originally Posted by moyack
It's not necessary to make it public.
Yes it is.
(when you are naming it only InitTrig to avoid WE dependence.)
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 11-12-2007, 08:30 AM   #10
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

I didn't use a local trigger because:

a. The global is created anyways
b. Some people may want to disable triggers dynamically


Oh and I know about Blade.dk's blackhole, I ripped off the model from his demo map =
_________________________

You can determine which units are sucked in, it's just below some constant functions and is explicitly named Filter

The InitTrig is called 'InitTrig_Blackhole' so I do not need to add a public/private prefix.

My calculations are fine, d.expiration*SUCK_INTERVAL just determines the speed travelled per second in wc3 units(for example, 800 units per second)
Which means I'd have to do something like this
Collapse JASS:
    if d.expiration < d.distance then //d.distance == d.expiration*SUCK_INTERVAL
        set x = d.x + d.expiration * Cos(a*0.01745) //Uses a local var 'x'
        set y = d.y + d.expiration * Sin(a*0.01745) //and local var 'y' instead of d.x and d.y
        set d.expiration = d.expiration + SUCK_INTERVAL
    endif

Oh and sorry cohadar, I forgot to say in the first post that I use ABC.

Check first post for the new link for the newer version of the demo map. I've included some minor changes and added a filter for units who should be knocked back.
__________________

Last edited by Malf : 11-12-2007 at 08:55 AM.
Malf is offline   Reply With Quote
Old 11-13-2007, 02:00 AM   #11
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

ok i tested the spell...it was cool but its lag
__________________
waaaks is offline   Reply With Quote
Old 11-13-2007, 07:08 AM   #12
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

It's not laggy, even on my computer. It just so happens that I've amassed trolls in the map so the units are the ones who are affecting your computer's lag issues.
__________________
Malf is offline   Reply With Quote
Old 11-13-2007, 09:04 AM   #13
waaaks
User
 
waaaks's Avatar
 
Join Date: Apr 2007
Posts: 356

waaaks is on a distinguished road (12)

Default

ah ok
maybe ill use that in my map :D

lol - moyack removed it :P
__________________

Last edited by waaaks : 11-14-2007 at 02:51 AM.
waaaks is offline   Reply With Quote
Old 11-21-2007, 05:42 PM   #14
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

This would be sweeter if it had some levels.
Pyritie is offline   Reply With Quote
Old 11-23-2007, 11:07 AM   #15
Malf
I LIKE PIZZA! | >
 
Malf's Avatar
 
Join Date: Sep 2007
Posts: 625

Submissions (2)

Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)Malf has a spectacular aura about (92)

Send a message via AIM to Malf
Default

That's why I split some constant globals into constant functions. There you can just set a formula like 50+10*level

It supports levels.
__________________
Malf 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:30 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