🏆 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!
A scope is a block of code which can have private and public members. Public members can be seen from anywhere in your code (well, anywhere below that scope) but must have the scope's name prefixed. Private members cannot be seen from outside the scope.
A scope can also have an initializer, which is a function called upon map initialization.
Structs are related to Object Oriented Programming and have more features than I care to list.
Both scopes and structs are documented in the vJass manual.
To answer your question more directly, vJass has included features to allow structs to have initializers, and some java programmers who use vJass prefer to handle all their triggers in structs.
That being said, this doesn't mean you should use structs to handle your triggers. Most vJass gurus will recommend scopes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.