• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hellfire vJASS

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Finally, i've learnt JASS n decided to make simple spell like HF......

BIG Thanks to

Laeiv, mckill2009 & Mr_Bean987 - Who help me to fix the triggers errors
Maker - The one that find the problems
U the downloader

Hellfire
Call the deep heat from earth, causing fire in a straight line, deals damage

Trigger:

Hellfire

[JASS=]function Hellfire_Condition takes nothing returns boolean
return GetSpellAbilityId() == 'ANbf'
endfunction

function Hellfire_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local player p = GetTriggerPlayer()
//-------------------------------
local real xx = x + 50 * Cos(f * bj_DEGTORAD)
local real yy = y + 50 * Sin(f * bj_DEGTORAD)
local integer i = 1
local unit d

loop
exitwhen i > 50
set d = CreateUnit( p, 'hfoo', xx , yy , 0 )
set xx = x + (50 * i) * Cos(f * bj_DEGTORAD)
set yy = y + (50 * i) * Sin(f * bj_DEGTORAD)
call UnitAddAbility(d, 'A000')
call UnitApplyTimedLife(d, 'BTLF', 1.50)
call IssueImmediateOrder(d, "thunderclap")
set i = i + 1
endloop

set u = null
set d = null
set p = null
endfunction

//--------------------------------------------------------
function InitTrig_Hellfire takes nothing returns nothing
set gg_trg_Hellfire = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hellfire, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Hellfire, Condition( function Hellfire_Condition ) )
call TriggerAddAction( gg_trg_Hellfire, function Hellfire_Actions )
endfunction [/code]



Keywords:
Fire,King,Hell,Flare,Anything,Noob,Dota,Spell
Contents

Hellfire vJASS (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Tooltip needs to be improved. Take a look at standard abilities for reference. Spell category should be JASS Do local real f = GetUnitFacing(u) * bj_DEGTORAD. There's no need to...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Maker, Hellfire, 12:18, 22nd Nov 2011

  • Tooltip needs to be improved. Take a look at standard abilities for reference.
  • Spell category should be JASS
  • Do local real f = GetUnitFacing(u) * bj_DEGTORAD. There's no need to calculate it four times
  • You don't need variables xx and yy, use x and y instead
  • It is the dummies that get the credit for kills, not the caster
  • Creating 50 dummies/effects is way too much
  • The ability doesn't support levels
  • The ability is too simple, make it more interesting
  • Don't edit footman unit in Human/Melee/Units. Copy and paste the unit.
  • Dummy uses upgrades, gives vision. Set it to can't raise, does not decay.
 
Level 10
Joined
Aug 21, 2010
Messages
316
This should be somewhere else ('Anbf','hfoo','A000') not directly in the code

TriggerRegisterAnyUnitEventBJ( gg_trg_Hellfire, EVENT_PLAYER_UNIT_SPELL_EFFECT )

should be replaced with this

TriggerRegisterPlayerUnitEvent(whichTrigger,whichPlayer,whichPlayerUnitEvent,filter)

Poor use of vJass
Correct me if I'm wrong,but where is here vJass
I do not understand why do you use vJass for something this simple
How it seems to me this is a gui converted to jass[and then worked out a little]
I think this is better left in the GUI version

Category should be JASS not vJASS
Why is this important?
Because I noticed that noobs think it's jass and vjass one and the same
 
Last edited:
Level 10
Joined
Aug 21, 2010
Messages
316
so, u mean:

[JASS=] call TriggerRegisterPlayerUnitEvent(Hellfire,p,EVENT_PLAYER_UNIT_SPELL_EFFECT) [/code]

for example
function InitTrig_Hellfire takes nothing returns nothing
local trigger Hellfire=CreateTrigger()
local integer i=0
loop
exitwhen i==16 or bj_MAX_PLAYER_SLOTS or 15 or whatever
call TriggerRegisterPlayerUnitEvent(Hellfire,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
endloop
call TriggerAddCondition( gg_trg_Hellfire, Condition( function Hellfire_Condition ) )
call TriggerAddAction( gg_trg_Hellfire, function Hellfire_Actions )
set Hellfire=null
endfunction

or you can use some of the existing codes for these events
I think there are a few of those here in the hive
I think that the Bribe did some such codes
but I'm not 100% sure
because I use my own code
Ask him
 
You shouldn't inline TriggerRegisterAnyUnitEventBJ
Keep it.
It's one of the most useful BJs in blizzard.j

The only case you'd do it is when you're going to replace the entire Trigger system. (Like I did with RegisterPlayerUnitEvent)

edit

JASS:
//--------------------------------------------------------
function InitTrig_Hellfire takes nothing returns nothing
    set gg_trg_Hellfire = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Hellfire, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Hellfire, Condition( function Hellfire_Condition ) )
    call TriggerAddAction( gg_trg_Hellfire, function Hellfire_Actions )
endfunction

Why are you using gg_trg_Hellfire?
Use a local trigger instead.
And instead of using a condition and an action, use only a condition.
Put the actions inside the condition and use an comparison to check if the unit is casting the right spell, then return false at the end.
Or better yet, use this: SpellEffectEvent By Bribe

Also, in vJass, we don't use InitTrig_ functions, we use struct/module initializers.
Library initializers are ok for spells too (Scope initializers work too, but I prefer not to use them)

Just do this:

JASS:
private struct Initializer
    private static method onInit takes nothing returns nothing
        // Init code here
    endmethod
endstruct

Bribe explains initializers and proper vJass application in this tutorial

And you shouldn't be creating 50 dummies. That's way too much.
10 or 15 is fine.
 
Level 4
Joined
Apr 18, 2011
Messages
60
Magtheridon96 is right :)

+ good point
- bad point
= sugerrences

- 50 dummies is too much
+ sxf are cool
- but overloaded sxf
- local triggers should work fine :)
= category should be jass
- why it seems like an gui trigger converted??
= use scopes or libraries/structs for spells they are lot better :)
+ clean code (more or less)
- you shoud add a "setup" part to easly configure the spell
- do not edit premade units make your own
= USE Jass New Gen Pack to more usefull jass copiler
+ MUI and GOOD use of locals great :)
 
Level 6
Joined
Nov 15, 2010
Messages
112
Magtheridon96 is right :)

+ good point
- bad point
= sugerrences

- 50 dummies is too much
+ sxf are cool
- but overloaded sxf
- local triggers should work fine :)
= category should be jass
- why it seems like an gui trigger converted??
= use scopes or libraries/structs for spells they are lot better :)
+ clean code (more or less)
- you shoud add a "setup" part to easly configure the spell
- do not edit premade units make your own
= USE Jass New Gen Pack to more usefull jass copiler
+ MUI and GOOD use of locals great :)

what u mean
local riggers should work fine
should add a "setup"
???
 
Level 4
Joined
Apr 18, 2011
Messages
60
you made a normal trigger and then made it jass (this is not vjass and if realy is it is vry poor use srry)
you need delete the "gg_trg_Hellfire" replace all with something like "spell_Hellfire" to evade "trigger replaement" that can crash your game :S and
set gg_trg_hellfire = CreateTrigger()
delete gg_trg so you can make it a local trigger :)
just examples :) (note " not goes in)

now about a setup well its pretty nice you can configure damage, damage multiplier, special efects, duration, dummiez, etc,etc,etc so you need at the begining of the spell a "setup" to allow users who-not-know-jass to easy configure it whiout needening go to spell core if you know what you mean your spell can look better more expert made plus it not need many time to add a setup and A HEADER to make your spell look good to the eyes, not only to jasser's eyes but also to guiers and begginers who-not-know-anything about spells but they thing "wow nice spell very pro i will use it" :)

anyways try to make more weird and "cooler" spells well i mean make them more compleX so the spell canot be rejeted ("need fiX") so easly

also visual things get a really BIG impact to your spell and the revews because special effectz look really nice if you combine it nicely BUT be carefull to NOT "overload" the spell with special effects/dummyz because they lag seriously
then we can conclude in: a spell qualify in 5/5 points

1 point from a nice & clean code also leakless and lagless
1 point from how well you present it here screenshot and desription
1 point from special efects and how well you use dummyz in you spell
1 point from people revewz i mean....they liked? they hated it??? this is not under your control srry
1 point from the moderator modd xD because if he/she is on a bad modd well........etC

almost i think its how points are given :)
~~~~~have a nice day~~~~xD~~~~
 
Top