• 🏆 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!

Basic Jass Questions.

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Hey, guys, I have some basic Jass questions:
1. What is the more efficient way to get the same result as using "GroupAddGroup"?

2. If I disable a local trigger at map initialization, how can I enable it afterwards?

3. If a trigger is disabled, can I use "ConditionalExecuteTrigger" or "Execute Trigger" to execute it? I suppose yes?

Thanks guys.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
1. You could write your own and remove the unnecessary operations GroupAddGroup has. GroupAddGroup doesn't look that bad to me, if your going to use it on a non-periodic action, then why not just use it. There are issues with groups and removed units but I don't remember what. (In case you decide to write an alternative and not ForGroup.)
2. Enable the trigger on another function.
3. Try testing it. What I know is that disabling triggers turns off the event associated with them.
 
Level 18
Joined
Sep 14, 2012
Messages
3,413
Hey, guys, I have some basic Jass questions:
1. What is the more efficient way to get the same result as using "GroupAddGroup"?

2. If I disable a local trigger at map initialization, how can I enable it afterwards?

3. If a trigger is disabled, can I use "ConditionalExecuteTrigger" or "Execute Trigger" to execute it? I suppose yes?

Thanks guys.

1. Wait a bit i'll make it if you want.
Oh sorry won't have the time this evening.
You'll have to wait tomorrow if you want it.

2. You will not be able, so i suggest you add a condition or you use a global variable for the trigger.

3. If it's disabled you can still run them (AFAIK)
 
Last edited:
Level 14
Joined
Jun 27, 2008
Messages
1,325
About 1.
If you have to add groups to other groups very frequently you can use linked lists instead which allow for concatenation in constant time.
If this approach is useful for your scenario depends on which operations you run on the lists/groups (and how often).
 
Status
Not open for further replies.
Top