• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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