• 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.

MUI Help, Ability concept

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Hello, I am trying to improve my development skills further, and one thing I havn't been able to accomplish is MUI spells. I'm working on a 4v4 PvP style map that will involve character classes. Anyways I'm wanting to make an ability that is attack based, it goes like this.
"Anytime the Blazing Fiend attacks he has a 20% chance to release a fireball toward the victim doing 50 damage."
-Also a question of mine is how to create a dummy unit effect and hide the hitpoint bar on the unit. Often when I create spells I use dummy units but you can see their hitpoint bars.
~Thanks for any feedback.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
-Also a question of mine is how to create a dummy unit effect and hide the hitpoint bar on the unit. Often when I create spells I use dummy units but you can see their hitpoint bars.

You can give the dummy unit the ability Locust (the raw-code is 'Aloc') and that will prevent your dummy from having a hit-point bar and being selected, and taking damage from most things.

Hello, I am trying to improve my development skills further, and one thing I havn't been able to accomplish is MUI spells. I'm working on a 4v4 PvP style map that will involve character classes. Anyways I'm wanting to make an ability that is attack based, it goes like this.
"Anytime the Blazing Fiend attacks he has a 20% chance to release a fireball toward the victim doing 50 damage."

What you really want is for each fireball to be independent of each other. MUI means that each fireball is independent of another fireball for a different unit, but in this day and age of modding that really isn't good enough --you want a single unit to be able to own any number of fireballs.

I'm curious, are you using GUI? If you know any programming it makes this whole idea much easier to grasp. vJass also has features built-in that make the process much simpler by providing a means of allocating/deallocating an array index to represent an instance of something.
 
Level 6
Joined
Oct 4, 2011
Messages
226
Yes, I'm using GUI I want the fireballs to work infinitely. or pretty much you know. Idk how to go about doing this though.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
From the looks of it, you just need a dummy unit to cast the fire-ball. There really is no need for you to trigger any kind of multi-instanceable anything. The entire effect will be handled by the dummy ability.

The dummy ability itself is simply invoked once the unit casts the ability. There would be no need to detect any further than this.

Just determine when a unit is attacked, find a random number between 1-100 (for your "chance") and then make the dummy unit cast fireball on the correct unit if necessary.

If you were moving the unit yourself you would need to worry about it, though, because you would have to somehow keep reference to all of these fireballs that you are moving (which is typically done through a stack).
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
There is an Event that does it for you. Unit takes damage.

The problem is when you declare it in the Events section, you are unable to declare it for "any" unit and you must specify which unit you want to register (which is typically a limited selection when selecting this). The work-around is to use the action Trigger - Add Event... which will allow you to add the exact same Event at run-time (when the map loads and stuff) except using a variable unit parameter (rather than having to select one from your editor).
 
Level 4
Joined
Feb 22, 2012
Messages
74
ok here is the test map with a working fireball using hashtables

as you can see, the numbers dont have to be constant. you could set the damage to 100 + 0.1 x int, if you want some stat like spellpower to affect magic damage.

you can also just change the event from casting a spell to "unit is attacked" and adjust the parameters from "triggering unit" to "attacking unit"

keep in mind that "on attack" abilities occur when the attack starts, not when it lands. this is why the greater bash ability in dota will trigger more if you spam stop without ever attacking
 

Attachments

  • fireballTest.w3x
    16.3 KB · Views: 29
Level 6
Joined
Oct 4, 2011
Messages
226
You know, aslong as i've wanted to be a game developer and aslong as i've tinker'd with the wc3 editor... I giveup... this is too much. I will never be able to do the things I want to im just not good enough. As far as your test map goes. I tried to look at it. im just lost doing so and the ability was supposed to work like a passive ability. triggering the fireball on 20% of attacks.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Have you tried reading tutorials on this site? If you're not very familiar with the concept then it's going to be hard to get it by just reading someone else' code. You have to be familiar with the concept before you can do that effectively.

There are tutorials on this site that will help you around the hedge with MUI.
 
Level 4
Joined
Feb 22, 2012
Messages
74
well here is a trigger that works on attack. the cool thing is the only trigger that changed in the first one, the second one is the same.

there is a tutorial on hashtables on this website somewhere in the tutorial forum which taught me how to use them when i was in the same place as you

basically you think of hashtables as a spreadsheet so my trigger makes this for each fireball that is currently in the air:

Target, Caster, Damage, Radius, Interval

The target and caster are given values called unit handles, which are just numbers that identify unique units.

The damage, radius, and interval are real numbers. They are stores in the fireball basically until the fireball explodes.

The second trigger runs every 0.03 seconds (about 30 frames per second)

It checks if the fireball is close to the target and explodes if it is, using the damage value on all enemy units in the radius that are stored in the hashtable.

If the unit is not close enough to the target, it moves towards it using the "interval," which is defined in the first trigger as 1200 x 0.03. Since the trigger runs every 0.03 seconds, this means the fireball travels at a 1200 projectile speed.

If you opne the global variables you can see all these things that would otherwise be numbers in the trigger. It is in a variable because, if you want to change it later for balance, you just have to change the variables instead of opening every trigger.
 

Attachments

  • fireballTest.w3x
    17 KB · Views: 27
Level 19
Joined
Aug 8, 2007
Messages
2,765
You know, aslong as i've wanted to be a game developer and aslong as i've tinker'd with the wc3 editor... I giveup... this is too much. I will never be able to do the things I want to im just not good enough. As far as your test map goes. I tried to look at it. im just lost doing so and the ability was supposed to work like a passive ability. triggering the fireball on 20% of attacks.

How old are you? (not saying this in an insultful way)

If your young (below high school young) than yes it will look incrediblly confusing to you. Once you get near my experience (check jd) it'll make alot more sense for you but its quite confusing once you first look at it.

If your at high school and completely baffled by it, than try it for about a month and if u still cant get it maybe another profession is an order.
 
Level 6
Joined
Oct 4, 2011
Messages
226
17 lol. I'm just having alot of trouble is all. and Hashtables are confusing. I'm looking things over though thanks.

Edit: for balance issues I realized that I wanted something more reliable and set-in-stone. What I'm currently trying to do on my own is make a periodic passive ability that picks the closest (if any) enemy and then sends a fireball toward this unit etc. so im trying to use a every 4.00 periodic trigger to check for all the blazingfiends and everything else, and I have to come up with a mover trigger for the fireball. I'm still just expirementing to figure out how to do it.
 
Last edited:
Status
Not open for further replies.
Top