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

MUI Questions

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
How should I end a MUI Trigger ?
I don't know if my WE is bugged, but, why some of MUI example spells (like the ones from hive) there is always an "invisible" variable ? .
What should be array ? Someone told me before but I forgot. I know that the caster should. What else ?
How should I remove leaks ? There are skills that has 3 triggers to active and things like locations leaks are not removed.
I never used hashtable before, but, is it obligatory ?
 
Level 12
Joined
May 22, 2015
Messages
1,051
There are a bunch of ways to do it. When you are writing triggers, you are basically writing a very simple program (that can get really complex if you want to do harder things). There isn't just some magic set of rules to follow to make your abilities fully MUI - you have to understand what the code is doing like a programmer. It can be different for some cases and you might just want to do it one way as opposed to another when there is not a major benefit to either method.

First off, the part that requires you to do extra work to make it MUI is adding stuff like effects over time or effects after some amount of time. The easiest way to make a spell MUI is to set it up so you never even need to use global variables (except maybe temporary ones). That would be like instant healing 100 health for all the units in some AOE instead of doing 10 health per second for 10 seconds to them.

You can get by without hashtables, but they make life a lot easier. However, any time you try to program without understanding what is happening, you can make life a hell of a lot harder.

Anyway, this question id very broad. It would be easier if you showed us a spell you want to make MUI and others can take a look at it for you.
 
  • Like
Reactions: hdm

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Well I would like to make that "Insanic Punch" from Bute Lord Spell Pack a MUI skill. It was a hiveworkshop resource but it is not avaliable anymore, but I found it on Epic War.

Also, what should have an array in MUI, other than the caster ?
 
Level 25
Joined
Sep 26, 2009
Messages
2,387
To have MUI spell mean that basically anything you need to save for any length of time should be put into an array and indexed (or put in hashtable), else you risk overwriting your data.

So the process is not something like:
Need to index caster, need to index target, need to index special effects, need to...

It goes along the lines:
Do I need to know who the caster is after some time? Do I need to know that for the target?

As an example, notice the difference in the following two spells:
Shadow Curse - Curses an enemy, dealing 20 damage every 2 seconds for 10 seconds.
Void Zone - Explode the enemy, immediately causing 100 damage to the target and creating a void zone beneath it.

In these two spells when you ask yourself the question: "Do I need to index the target?" You will get a "Yes" for Shadow Curse (since you need to know who to periodically damage) and "No" for Void Zone (since the target is dealt 100 damage immediately and the void zone is created underneath him immediately as well).
 
Status
Not open for further replies.
Top