• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Spell Engine (by aznricepuff) - Need Help

Status
Not open for further replies.
Level 3
Joined
Feb 23, 2009
Messages
16
Hey there,

I already asked aznricepuff, but he did not answer. So I ask you, regarding this system's example map i got one question.

Where is the "super"-struct1 created and what's it's sense. Does the system need it to work?
Also where can I change the "periodic" Timer of "on(Channel/Cast)Tick".

1 = It's used at the end of each method from the example Spells.

JASS:
call super.onChannel(eventSpell)
 
Level 11
Joined
Apr 29, 2007
Messages
826
"super" in vJass refers to the parent stub method of an overwritten stub method.
Let's make it clear with an example:

JASS:
struct Parent
    stub method displayStuff takes nothing returns nothing
        call BJDebugMsg("This displayes stuff!")
    endmethod
endstruct

struct Child extends Parent
    stub method displayStuff takes nothing returns nothing
        call super.displayStuff()
        call BJDebugMsg("This displays more stuff!")
    endmethod
endstruct

When you call Child.displayStuff, it will first call Parent.displayStuff and then display our message, so the result will be:
This displays stuff!
This displays more stuff!
 
Status
Not open for further replies.
Top