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

[Trigger] MUI Help and JASS

Status
Not open for further replies.
Level 8
Joined
Jun 18, 2007
Messages
214
  • Beast Rage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Beast Rage
    • Actions
      • Set BRCaster = (Casting unit)
      • Set BRTarget = (Target unit of ability being cast)
      • Special Effect - Create a special effect attached to the weapon of BRCaster using Abilities\Spells\Undead\Cripple\CrippleTarget.mdl
      • Set BRSF = (Last created special effect)
      • Unit - Pause BRTarget
      • Unit - Pause BRCaster
      • Animation - Change BRCaster's animation speed to 200.00% of its original speed
      • Animation - Change BRTarget's animation speed to 150.00% of its original speed
      • Animation - Change BRCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
      • Set BlowCountera = 0
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BRCaster is alive) Equal to True
            • Then - Actions
              • Set TempPoint1 = (Position of BRCaster)
              • Set TempPoint2 = (Position of BRTarget)
              • Unit - Create 1 Beast Rage for (Owner of BRCaster) at TempPoint1 facing (Angle from TempPoint1 to TempPoint2) degrees
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
              • Animation - Change (Last created unit)'s animation speed to 100.00% of its original speed
              • Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Animation - Play (Last created unit)'s attack animation
              • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Wait 0.10 seconds
              • Unit - Cause BRCaster to damage BRTarget, dealing 10.00 damage of attack type Hero and damage type Normal
              • Special Effect - Create a special effect attached to the origin of BRTarget using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
              • Special Effect - Destroy (Last created special effect)
              • Animation - Play BRCaster's attack animation
              • Animation - Play BRTarget's death animation
              • Set BlowCountera = (BlowCountera + 1)
              • Floating Text - Create floating text that reads ((String(BlowCountera)) + !) above BRTarget with Z offset 2.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Show (Last created floating text) for (All players)
              • Floating Text - Change the lifespan of (Last created floating text) to 0.20 seconds
            • Else - Actions
              • Unit - Unpause BRCaster
              • Unit - Unpause BRTarget
              • Animation - Change BRCaster's animation speed to 100.00% of its original speed
              • Animation - Change BRTarget's animation speed to 100.00% of its original speed
              • Animation - Change BRCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Special Effect - Destroy BRSF
              • Set BRCaster = No unit
              • Set BRTarget = No unit
              • Set BlowCountera = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BlowCountera Equal to 7
        • Then - Actions
          • Unit - Make BRCaster Invulnerable
          • Floating Text - Create floating text that reads INVULNERABLE! above BRTarget with Z offset 10.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Show (Last created floating text) for (All players)
          • Floating Text - Change the lifespan of (Last created floating text) to 0.20 seconds
          • For each (Integer A) from 1 to (13 x (Level of Beast Rage for BRCaster)), do (Actions)
            • Loop - Actions
              • Set TempPoint1 = (Position of BRCaster)
              • Set TempPoint2 = (Position of BRTarget)
              • Unit - Create 1 Beast Rage for (Owner of BRCaster) at TempPoint1 facing (Angle from TempPoint1 to TempPoint2) degrees
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
              • Animation - Change (Last created unit)'s animation speed to 100.00% of its original speed
              • Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 40.00% transparency
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Animation - Play (Last created unit)'s attack animation
              • Special Effect - Create a special effect at TempPoint1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Wait 0.10 seconds
              • Animation - Play BRCaster's attack animation
              • Animation - Play BRTarget's death animation
              • Unit - Cause BRCaster to damage BRTarget, dealing 10.00 damage of attack type Hero and damage type Normal
              • Special Effect - Create a special effect attached to the origin of BRTarget using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set BlowCountera = (BlowCountera + 1)
              • Floating Text - Create floating text that reads ((String(BlowCountera)) + !) above BRTarget with Z offset 2.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Show (Last created floating text) for (All players)
              • Floating Text - Change the lifespan of (Last created floating text) to 0.20 seconds
          • Unit - Make BRCaster Vulnerable
          • Unit - Unpause BRCaster
          • Unit - Unpause BRTarget
          • Animation - Change BRCaster's animation speed to 100.00% of its original speed
          • Animation - Change BRCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
          • Animation - Change BRTarget's animation speed to 100.00% of its original speed
          • Set BRCaster = No unit
          • Set BRTarget = No unit
          • Special Effect - Destroy BRSF
          • Set BlowCountera = 0
        • Else - Actions
          • Do nothing
Could anyone help me to convert this spell into JASS, or even better to make it MUI in GUI? I've tried tutorials, tried to use locals, but I failed on every aspect. If anyone would be generous enough to help me into converting in into JASS or comment on to how to make it MUI, I would forever be grateful. Please if you can help :(. Thank you.
 
Level 5
Joined
Dec 18, 2007
Messages
205
well i just read over the script and i couldn't find any leaks. maybe i'm too tired or this code is leak-free.
=> floating texts leak too? i don't really know, but if they do there could be the problem because they are changed and displayed very often.
 
Level 8
Joined
Jun 18, 2007
Messages
214
Leaks? I never said there are leaks in this spell.... I'm trying to find a suggestions how to make this spell MUI ( which means that you can have as many heroes as you want and they can use a spell at the same time ), or at least MPI ( one hero per player ). Or even help into converting this spell into JASS.
 
Level 5
Joined
Dec 18, 2007
Messages
205
oh sry i was anyhow confused and i thought about leaks xD

well the only thing (as far as i see) is that you must create local variables in JASS.

The global variable makes it non-MUI. so you have the option
a) to create a unit array and set its number to player number (MPI) or
b) creating locals to make it MUI
 
Level 8
Joined
Jun 18, 2007
Messages
214
Yes that's what I thought two. But in GUI you can only use one local variable :(. Just these tutorials on JASS, none of them don't use methods of converting a certain spell into JASS, and that's a problem. Well like you said, I'll probably use arrays and create it MPI. I really wanted this spell to be MUI in GUI, but well... Thank you for trying to help. +rep ( if it is worth anything :))
 
Level 5
Joined
Dec 18, 2007
Messages
205
well you can create more than 1 local.

the only problem is whether there is more than a single function in your trigger.
use 'convert to custom text' and look whether there are more functions.
if there are only
BLAH_Intialization
BLAH_Conditions
BLAH_Actions
u can use the locals.
otherwise you must pass them through a trigger if possible or setting them to a UDG and afterwarsds again to a local.

sounds complicated i know, but first check that.
 
Level 8
Joined
Jun 18, 2007
Messages
214
Just try to learn some basic Jass, ask Themis in channel Clan BoM he taught me just because I asked. He's friendly to. Anyway I would do It but Its a pain to copy paste gui so convert it to custom text and pm it to me and I can help ya out.

Where can I find this guy? I asked so many people to help me learn JASS, but I there is no one friendly enough :-(. I know some basic stuff, but I can't put it together to work....
 
Status
Not open for further replies.
Top