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

[Trigger] Spell Help (GUI)

Status
Not open for further replies.
Level 9
Joined
Nov 24, 2007
Messages
229
Spell: Naruto Rendan/ Rasengan - The Hive Workshop - A Warcraft III Modding Site

Although looking at this u proly can't believe it but..... This is my first spell lol......

I need help with making the spell both MPI and MUI (At least MPI) I HAVE NO IDEA HOW 2 :hohum: :sad:

Alssssooooo (Heard this was easy) I need to make the spell multi level support......

THANK YOU FOR ALL WHOM HELP ME!!!! + REP!! :grin:
 
Level 9
Joined
Nov 24, 2007
Messages
229
Multi level isnt hard,,
do something like:
Set Damage = (((Level of (Rasengan) for (Triggering Unit)) x 3) + 5)

And it is too late now for me to tell you bout MUI-ing spells

ummm i'ma good visual learner XD Can you just show me exactly what i should put hahaha

and is there anyway at all i can MUI or MPI this spell now??? (Either (or both) will work just MUI better)
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
ummm i'ma good visual learner XD Can you just show me exactly what i should put hahaha

and is there anyway at all i can MUI or MPI this spell now??? (Either (or both) will work just MUI better)

Well,, MPI is always possible,,
But it is late now (for me) Gotta get to sleep soon
This is the Multi-level code (not really code, it is an example code)
  • Set Damage = (((Real((Level of Animate Dead for (Triggering unit)))) x 3.00) + 5.00)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Multi-level support is achieved by doing different stuff for different levels.
I.e. if the spell is level 1 do 50 damage.
level 2 - 100 damage so on ...
Do not go making a lot of ifs that is just silly. Use formulas to calculate every stat of the ability - damage = Level of ability * 2

The easiest way to achieve MUi is by having no waits.
If you have waits, then do not use functions(event responses) or variables that might have changed during the wait. I.e. A spell. A trigger with the Unit starts the effect of a spell event. If you use the function(event response) Casting unit it will give you the unit that casted the spell and if you have a 20 second wait during that wait another unit may use this spell(or any other) so after the wait Casting unit will give you a wrong unit. I think every event response that has Trigger(-ing) in it will work properly after the wait and maybe some others, but I am uncertain. Note that if you use global variables
I.e. Set temp_integer = Hero Level of Triggering Unit
After the wait, that variable may have changed as well.

If there is no way to avoid waits and you have to use some special event response, you can go for MPI. The secret is using arrays. The result is that the spell will work for 1 unit per player any more and the spells will mix up.
In the above example MPI can be achieved like this:
Set temp_integer[Player Index of (Owner of (Triggering Unit))] = Hero level of (Triggering Unit)
So for every player the part: Player Index of (Owner of (Triggering Unit)) will give a different value and will keep separate instances apart.
So if you have to use special event responses store them in a variable:
Set spell1_attacker[Player Index of (Owner of (Triggering Unit))]= Attacking unit
Wait 10 seconds
Kill spell1_attacker[Player Index of (Owner of (Triggering Unit))]

It is important to save all the things you need before the first wait.
There are extensive tutorials in the tutorial section.
I recommend you start using Triggering Unit whenever you have a choice:
Attacked unit = Triggering Unit (only with the proper event)
Casting Unit = Triggering Unit (only with the proper event)
Dying Unit = Triggering Unit (only with the proper event)
etc.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Set Damage[Player Number of (Owner of (Triggering Unit))] = (Level of Rasengan x 5)
You can use x5, or maybe x2 + 4, or anything else, that suits a normal damage factor,,
P.S. The damage is an Real Array variable,,
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
The array doesnt matter (you can set to 1 or 12)
Action: General - Set Variable
Set Value = Value
Set Damage = Value

Now you will see a window pop up (when you click the last Value)
In the window you will see:
Arithmetic
1.00 + 1.00

Click the first 1.00 and look in the sub-window for: Convert Integer to Real
In this, you need to find: Level of Ability for Unit,
Click this, set the Unit to Triggering Unit, and the Ability to Whatever ability you are using.

Now click 'Enter' a couple of times, until you see the first window:
Arithmetic
(Real(Level of 'Yourability' for Triggering Unit)) + 1.00

Now you can do whatever you want,, you can change the + to -, x or /.
And you can change to 1.00 to any value you want,,

Done!
 
Level 9
Joined
Nov 24, 2007
Messages
229
The array doesnt matter (you can set to 1 or 12)
Action: General - Set Variable
Set Value = Value
Set Damage = Value

Now you will see a window pop up (when you click the last Value)
In the window you will see:
Arithmetic
1.00 + 1.00

Click the first 1.00 and look in the sub-window for: Convert Integer to Real
In this, you need to find: Level of Ability for Unit,
Click this, set the Unit to Triggering Unit, and the Ability to Whatever ability you are using.

Now click 'Enter' a couple of times, until you see the first window:
Arithmetic
(Real(Level of 'Yourability' for Triggering Unit)) + 1.00

Now you can do whatever you want,, you can change the + to -, x or /.
And you can change to 1.00 to any value you want,,

Done!

hahaha i think i got it but can you make sure???? I'll attach it:
 

Attachments

  • Naruto Rendan.w3x
    25.4 KB · Views: 63
Level 16
Joined
Oct 12, 2008
Messages
1,570
Ok, that is the right thing,,
But still most things (all but the Damage variable) are not arrayed, and that way the spell aint MPI yet,,
Even if you remove the locations every time, it is safer to array them,,
You can try to NOT array them first, and see what happens,,
Or you can set one location: TempLoc[] (arrayed)
Set TempLoc[1] = Bla
Set TempLoc[2] = Bla
Call RemoveLocation(udg_TempLoc[1])
call RemoveLocation(udg_TempLoc[2])

P.S. You want me to help you make it MPI, and maybe even MUI?
 
Level 9
Joined
Nov 24, 2007
Messages
229
Ok, that is the right thing,,
But still most things (all but the Damage variable) are not arrayed, and that way the spell aint MPI yet,,
Even if you remove the locations every time, it is safer to array them,,
You can try to NOT array them first, and see what happens,,
Or you can set one location: TempLoc[] (arrayed)
Set TempLoc[1] = Bla
Set TempLoc[2] = Bla
Call RemoveLocation(udg_TempLoc[1])
call RemoveLocation(udg_TempLoc[2])

P.S. You want me to help you make it MPI, and maybe even MUI?

That would be great hahaha i'm not exactly pro :p If you want, we can just work on it together from now on
 
Well this is rather simple to do when it comes to the MPI just change your Casters to arrays (1) and do this

  • Set NarutoRendanCaster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
Be sure to make every trigger that had the caster variable look like that.. that makes it at least MPI

As for multi leveled i guess you'll just have to go with what he said because i can't think of anything to fix that..
 
Status
Not open for further replies.
Top