Kamehameha Version 4.50

This bundle is marked as approved. It works and satisfies the submission rules.
Yay with the help of deathismyfriend,PurgeandFire,BPower,Ceday,edo494 I finally got this spell fully fixed MUI leakless. Thank you, you guys. I would just like to give another special thanks to them because this spell would of been rejected without these guys.

I am kind of lame when it comes to placement and sometimes even the best needs help I would hope?

Special Thanks goes to MetaDeath for his unit-group lines as well original idea, without him I wouldn't be submitting this spell today.

A thanks also goes out to Ajijang2013 for inspiring me to submit this sooner.

Basically it creates a line of units every so few decimal seconds causing damage to anyone nearby this line.


Features to come:

More customize options for the spell. - Done
Better move function. - Done
Maybe a collision effect. - Done
Different versions of the spell in #1 post so people know how to make different kinds of beams without spamming triggers. - No idea when I will do this

If you want anything else/more suggest it down below in the comments.


[trigger=]
Events
Map initialization
Conditions
Actions
-------- This is here to let the system know to destroy trees or not with this spell --------
Set KillTrees = True
-------- This is the order ID of the spell, shouldn't need to be changed. --------
Set kameorder99 = (Order(flare))
-------- This is your ability/spell --------
Set kame = Kamehameha
-------- This is the Attack Type --------
Set kameatktype = Spells
-------- This is the Damage Type and this one ignores armor --------
Set kamedmgtype = Universal
-------- This is the special effect that pops up when a unit gets hit by the spell --------
Set kamesfxoncollide = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-------- This is what your beam/projectiles will look like --------
Set kamemissilesfx = Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
-------- This sets your explosion effects --------
Set kamefinaleffect = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Set kamefinaleffect2 = Objects\Spawnmodels\NightElf\NEDeathMedium\NEDeath.mdl
-------- We do this to enable it to work better then 0.03 and to be more precise. --------
Custom script: set udg_kametimer = 0.03125
-------- This is how you can add events through GUI/Triggering --------
Trigger - Add to kameloop <gen> the event (Time - Every kametimer seconds of game time)

[/trigger]

[trigger=]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Kamehameha
Actions
-------- Setting the index to make the entire spell work --------
Set kameindex99 = (kameindex99 + 1)
-------- --------
-------- Creating and setting the unit groups because the GUI version doesn't work correctly --------
Custom script: set udg_kamegroup99[udg_kameindex99] = CreateGroup()
-------- --------
-------- This identifes the caster --------
Set kameu99[kameindex99] = (Triggering unit)
-------- --------
Set kamelevel[kameindex99] = (Level of kame for kameu99[kameindex99])
-------- --------
-------- This is how much your damage gets multiplied at the final explosion --------
-------- Set it to 1 if you don't want any bonus explosion damage --------
Set kameendmultiplier[kameindex99] = 4.00
-------- --------
-------- This identifes the player --------
Set kameplayer[kameindex99] = (Owner of kameu99[kameindex99])
-------- --------
-------- This is your damage --------
Set kamedmg[kameindex99] = (25.00 + ((Real(kamelevel[kameindex99])) x 50.00))
-------- --------
-------- This is the current speed your beam/spell moves at per 0.03 seconds --------
Set kamespeed[kameindex99] = (10.00 + ((Real(kamelevel[kameindex99])) x 10.00))
-------- --------
-------- This is the size of the projectile at the front of the beam --------
Set kammainbeamsize[kameindex99] = (200.00 + ((Real(kamelevel[kameindex99])) x 100.00))
-------- --------
-------- This is the area where units get hit by the spell --------
Set kameAoE[kameindex99] = (150.00 + ((Real(kamelevel[kameindex99])) x 20.00))
-------- --------
-------- This is the entire beam size besides the front --------
Set kamesize[kameindex99] = (200.00 + ((Real(kamelevel[kameindex99])) x 100.00))
-------- --------
-------- This helps clean a leak --------
Set kamep = (Position of kameu99[kameindex99])
-------- --------
-------- This sets where you targeted the ground with so it'll know when to stop/explode at that point --------
Set kamecastp99[kameindex99] = (Target point of ability being cast)
-------- --------
-------- This creates the front part of the beam --------
Unit - Create 1 Dummy for kameplayer[kameindex99] at kamep facing (Angle from kamep to kamecastp99[kameindex99]) degrees
Set kamedummyu99[kameindex99] = (Last created unit)
-------- This adds the effect of a blue beam --------
Special Effect - Create a special effect attached to the origin of kamedummyu99[kameindex99] using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
Set kamesfx99[kameindex99] = (Last created special effect)
-------- --------
-------- This is to set it's size and height so it isn't in the ground --------
Animation - Change kamedummyu99[kameindex99]'s size to (kammainbeamsize[kameindex99]%, 100.00%, 100.00%) of its original size
Animation - Change kamedummyu99[kameindex99] flying height to 75.00 at 0.00
-------- --------
Custom script: call RemoveLocation(udg_kamep)
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
kameindex99 Equal to 1
Then - Actions
-------- Don't forget to turn this on when imported into your map --------
Trigger - Turn on kameloop <gen>
Else - Actions
-------- --------

[/trigger]

[trigger=]
Events
Conditions
Actions
-------- All the stuff that is easily changeable is already in kameinit and kamecast for you --------
-------- Only edit stuff here once you understand what is what if even only a little --------
-------- Some knowledge is better then going into it with nothing --------
-------- --------
For each (Integer kameloop99) from 1 to kameindex99, do (Actions)
Loop - Actions
-------- This checks where your front beam is --------
Set kamep = (Position of kamedummyu99[kameloop99])
-------- --------
-------- Destroys trees in the path of the beam only if the value is set to true --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KillTrees Equal to True
Then - Actions
Destructible - Pick every destructible in (Region centered at kamep with size (kameAoE[kameloop99], kameAoE[kameloop99])) and do (Actions)
Loop - Actions
Set ISD_d = (Picked destructible)
Trigger - Run system <gen> (checking conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ISD_boolean Equal to True
Then - Actions
Set ISD_d = (Picked destructible)
Destructible - Kill ISD_d
Set ISD_d = No destructible
Else - Actions
Else - Actions
-------- The conditions are doing a distance check to see if the beam arrived at its explsion point --------
-------- It also is checking to make sure your caster is still focusing the spell --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between kamep and kamecastp99[kameloop99]) Greater than or equal to 20.00
(Current order of kameu99[kameloop99]) Equal to kameorder99
Then - Actions
-------- This sets the radius to damage units within --------
Set kamedmggroup = (Units within kameAoE[kameloop99] of kamep)
Unit Group - Pick every unit in kamedmggroup and do (Actions)
Loop - Actions
Set kamepickedu = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(kamepickedu is dead) Not equal to True
(kamepickedu is hidden) Not equal to True
(kamepickedu belongs to an enemy of kameplayer[kameloop99]) Equal to True
Then - Actions
Unit - Cause kameu99[kameloop99] to damage kamepickedu, dealing kamedmg[kameloop99] damage of attack type kameatktype and damage type kamedmgtype
-------- This sets the collide effect as well makes sure it doesn't lag too badly --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Special Effect - Create a special effect attached to the chest of kamepickedu using kamesfxoncollide
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Set kamepickedu = No unit
-------- We can't forget to get rid of the group leak --------
Custom script: call DestroyGroup(udg_kamedmggroup)
-------- This creates the entire beam besides the front --------
Set kamedumdumindexer99 = (kamedumdumindexer99 + 1)
Unit - Create 1 Dummy for (Owner of kameu99[kameloop99]) at kamep facing (Angle from kamep to kamecastp99[kameloop99]) degrees
Set kamequickunit = (Last created unit)
Unit - Change ownership of kamequickunit to Neutral Victim and Retain color
Player - Set Neutral Victim handicap to (100.00 + (Real(kamedumdumindexer99)))%
Unit - Change ownership of kamequickunit to kameplayer[kameloop99] and Retain color
Player - Set Neutral Victim handicap to 100.00%
Unit Group - Add kamequickunit to kamegroup99[kameloop99]
Special Effect - Create a special effect attached to the origin of kamequickunit using kamemissilesfx
Set kame2sfx99[(Integer((Max life of kamequickunit)))] = (Last created special effect)
Animation - Change kamequickunit's size to (kamesize[kameloop99]%, 100.00%, 100.00%) of its original size
Animation - Change kamequickunit flying height to 75.00 at 0.00
Set kamequickunit = No unit
-------- --------
-------- This sets the radius to damage units within all of the beam --------
Unit Group - Pick every unit in kamegroup99[kameloop99] and do (Actions)
Loop - Actions
Set kamepickedu2 = (Picked unit)
Set kamep3 = (Position of kamepickedu2)
Set kamedmggroup = (Units within kameAoE[kameloop99] of kamep3)
Unit Group - Pick every unit in kamedmggroup and do (Actions)
Loop - Actions
Set kamepickedu = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(kamepickedu is dead) Not equal to True
(kamepickedu is hidden) Not equal to True
(kamepickedu belongs to an enemy of kameplayer[kameloop99]) Equal to True
Then - Actions
Unit - Cause kameu99[kameloop99] to damage kamepickedu, dealing kamedmg[kameloop99] damage of attack type kameatktype and damage type kamedmgtype
-------- This sets the collide effect as well makes sure it doesn't lag too badly --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Special Effect - Create a special effect attached to the chest of kamepickedu using kamesfxoncollide
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Set kamepickedu = No unit
Custom script: call RemoveLocation(udg_kamep3)
Set kamepickedu2 = No unit
Custom script: call DestroyGroup(udg_kamedmggroup)
-------- --------
-------- This is how we move a beam --------
Set kamep2 = (kamep offset by kamespeed[kameloop99] towards (Angle from kamep to kamecastp99[kameloop99]) degrees)
Custom script: call SetUnitX ( udg_kamedummyu99[udg_kameloop99] , GetLocationX(udg_kamep2))
Custom script: call SetUnitY ( udg_kamedummyu99[udg_kameloop99] , GetLocationY(udg_kamep2))
Custom script: call RemoveLocation(udg_kamep2)
-------- --------
Else - Actions
-------- Finishing/explosion effects --------
Special Effect - Create a special effect at kamep using kamefinaleffect
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at kamep using kamefinaleffect2
Special Effect - Destroy (Last created special effect)
-------- --------
-------- Destroys trees within the blast radius only if the value was set to true --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KillTrees Equal to True
Then - Actions
Destructible - Pick every destructible in (Region centered at kamep with size ((kameAoE[kameloop99] x 2.00), (kameAoE[kameloop99] x 2.00))) and do (Actions)
Loop - Actions
Set ISD_d = (Picked destructible)
Trigger - Run system <gen> (checking conditions)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ISD_boolean Equal to True
Then - Actions
Set ISD_d = (Picked destructible)
Destructible - Kill ISD_d
Set ISD_d = No destructible
Else - Actions
Else - Actions
-------- Explosion damage --------
Set kamedmggroup = (Units within kameAoE[kameloop99] of kamep)
Unit Group - Pick every unit in kamedmggroup and do (Actions)
Loop - Actions
Set kamepickedu = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(kamepickedu is dead) Not equal to True
(kamepickedu is hidden) Not equal to True
(kamepickedu belongs to an enemy of kameplayer[kameloop99]) Equal to True
Then - Actions
Unit - Cause kameu99[kameloop99] to damage kamepickedu, dealing (kamedmg[kameloop99] x kameendmultiplier[kameloop99]) damage of attack type kameatktype and damage type kamedmgtype
-------- This sets the collide effect as well makes sure it doesn't lag too badly --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Special Effect - Create a special effect attached to the chest of kamepickedu using kamesfxoncollide
Special Effect - Destroy (Last created special effect)
Else - Actions
Else - Actions
Set kamepickedu = No unit
Custom script: call DestroyGroup(udg_kamedmggroup)
-------- --------
-------- So the caster isn't stuck --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of kameu99[kameloop99]) Equal to kameorder99
Then - Actions
Unit - Order kameu99[kameloop99] to Stop
Else - Actions
-------- --------
-------- Gets rid of the dummy unit --------
Unit - Kill kamedummyu99[kameloop99]
-------- --------
-------- Gets rid of the rest of the beam --------
Unit Group - Pick every unit in kamegroup99[kameloop99] and do (Actions)
Loop - Actions
Custom script: call DestroyEffect( udg_kame2sfx99[R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()))] )
Unit - Add a 1.00 second Generic expiration timer to (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
kamedumdumindexer99 Greater than 1000
Then - Actions
Set kamedumdumindexer99 = 0
Else - Actions
-------- --------
Custom script: call DestroyEffect(udg_kamesfx99[udg_kameindex99])
-------- Just nulling up some handles --------
Set kamedummyu99[kameloop99] = kamedummyu99[kameindex99]
Set kamedummyu99[kameindex99] = No unit
-------- --------
Set kamespeed[kameloop99] = kamespeed[kameindex99]
-------- --------
Set kameu99[kameloop99] = kameu99[kameindex99]
Set kameu99[kameindex99] = No unit
-------- --------
Set kameplayer[kameloop99] = kameplayer[kameindex99]
Custom script: set udg_kameplayer[udg_kameindex99] = null
-------- --------
Custom script: call RemoveLocation(udg_kamecastp99[udg_kameloop99])
Set kamecastp99[kameloop99] = kamecastp99[kameindex99]
-------- --------
Custom script: call DestroyGroup(udg_kamegroup99[udg_kameloop99])
Set kamegroup99[kameloop99] = kamegroup99[kameindex99]
Custom script: set udg_kamegroup99[udg_kameindex99] = null
-------- --------
-------- --------
Set kameindex99 = (kameindex99 - 1)
Set kameloop99 = (kameloop99 - 1)
-------- --------
-------- Turning the trigger off if nobodys casting so we don't cause extra lags --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
kameindex99 Equal to 0
Then - Actions
Set kamedumdumindexer99 = 0
Trigger - Turn off (This trigger)
Else - Actions
-------- --------
-------- Cleans up location at the top --------
Custom script: call RemoveLocation(udg_kamep)
-------- --------


[/trigger]


Keywords:
tal,tal0n,dat,dat-c3,c3,kame,kamehameha,ha,hame,fail,pro,epic,lol,fun,1337,hax,o.o
Contents

Just another Warcraft III Kamehameha (Map)

Reviews
21:53, 14th Jul 2014 BPower: Looks ok to me. Approved.

Moderator

M

Moderator

21:53, 14th Jul 2014
BPower:
Looks ok to me. Approved.
 
Level 12
Joined
Mar 24, 2013
Messages
1,105
You should have configurable AoE, Base Damg, Leveled Damg, etc.

However it does not work properly with 2 live instances right now. It works on creation, but when it tries to retract/disappear it is left. tl;dr not MUI

The blue laser it makes is different-ish so 2/5 till updated.
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
You should have configurable AoE, Base Damg, Leveled Damg, etc.

However it does not work properly with 2 live instances right now. It works on creation, but when it tries to retract/disappear it is left. tl;dr not MUI

The blue laser it makes is different-ish so 2/5 till updated.


Read post above yours, and re-download map then re-test it. If you don't mind of course.
 
Level 4
Joined
Apr 16, 2014
Messages
19
No problem.How did I inspired you? in what way? Well, can you give me a very very easily mui/tutorial spell? coz my spell seems to be trashed, it's not MUI so it can be accepted but it required MUI in order to use in any maps such as DBZ or DON maps.Actually, I did not understand how to do MUI spell, can you give me a very easy example?
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
I am moving a head dummy, you likely just don't see it.
You inspired me to submit it faster. No I can not offer you any help on MUI however I can suggest you to look at some of this sites tutorials on it.

Sadly if it isn't MUI then it really isn't worth it as you said. Yeah sure, check out a system/spell named MUI by Ruke. You can find it in the spells section of hive, just search for Ruke in the author field.

I didn't fully get the rest of your last post however please don't double-post, edit your first one and copy what you typed in the second one then delete your second post.
 
Level 3
Joined
Jul 11, 2013
Messages
9
Wow, really cool. Big improvement from the first version you showed me. I like how the dummies can't be selected now. ;) Locust works wonders for stuff like this. And good effect for the explosion at the end as well.

No leaks. Comments throughout. The code is easy to understand and is customizable. Good work!

5/5
 
Last edited:
Level 22
Joined
Mar 15, 2012
Messages
2,662
Wow, really cool. Big improvement from the first version you showed me. I like how the dummies can't be selected now. ;) Locust works wonders for stuff like this. And good effect for the explosion at the end as well.

No leaks. Comments throughout. The code is easy to understand and is customizable. Good work!

5/5
Sadly locust doesn't make much wonderful considering it makes the unit immune to most detection.
That was actually a test of trying to make locust detection, finally found a way thanks to Icemanbo. Though yeah big improvement =)

Thanks.
 
Level 12
Joined
Jul 16, 2012
Messages
681
Wow, really cool. Big improvement from the first version you showed me. I like how the dummies can't be selected now. ;) Locust works wonders for stuff like this. And good effect for the explosion at the end as well.

No leaks. Comments throughout. The code is easy to understand and is customizable. Good work!

5/5

LOL ARE YOU CRAZY??

I HAVE PICTURE
LOOK THIS

229063-albums7219-picture83554.bmp


:ogre_datass: NEED FIX THIS IS NOT MUI
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
LOL ARE YOU CRAZY??

I HAVE PICTURE
LOOK THIS

229063-albums7219-picture83554.bmp


:ogre_datass: NEED FIX THIS IS NOT MUI

Read post #4 and then #6, and re-download map then re-test it. If you don't mind of course. - Ignore this.

Edit: Oh, wait I just noticed you have the right version. Big woops on my end, I don't see how that is possible though. Do you have a replay?
Edit2: Never mind Don't need a replay, it bugs when three cast it.
Edit3: It might be the unit-groups messing up though the caps-lock wasn't needed as well it is mostly MUI. =)
Edit4: Well this isn't good, It really is the unit-groups.

Edit5: Okay it is mostly fixed, there's one new problem though. When two beams finish and the third beam is going, it removes some near the caster and looks like it jumped.
 
Last edited:
Level 12
Joined
Mar 24, 2013
Messages
1,105
Upon a re-evaluation, you're leaking locations (looping trigger), and would be wise to cut down on your function calls. i.e. save picked units into variables, save level of x ability for unit into variable, etc.

Also a more configurable ability is desirable, as I previously listed out potential points to allow customization. Another might be the size of the dummy.

Also it might be easier for someone else to work with if you picked units in range and filtered out with an if, rather than having a long strand of ((Matching x conditions)).
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
I will fix the level of ability configurable, been having issues with getting the spell to function properly which is why I forgot about it.

Everything you listed is already configurable.


EDIT: Everything has been fixed and is now fully leakless and MUI besides the special effect.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,549
Dude, I understand the MUI now ! I just need help on my remaking of my spell, I made a new one but it needs to cast three times before it's head will be moving.

Post the trigger in trigger and scripts forum along with a full explanation on what the problem is. How you want the spell to work. And what is currently happening when spell is cast.
 
  • -------- This creates the entire beam besides the front --------
  • Unit - Create 1 Dummy for (Owner of kameu99[kameloop99]) at kamep facing (Angle from kamep to kamecastp99[kameloop99]) degrees
  • Unit Group - Add (Last created unit) to kamegroup99[kameloop99]
  • Special Effect - Create a special effect attached to the origin of (Last created unit) using kamemissilesfx
  • Animation - Change (Last created unit)'s size to (kamesize[kameloop99]%, 100.00%, 100.00%) of its original size
  • Animation - Change (Last created unit) flying height to 75.00 at 0.00
^I think you know what I wanna say here. :p
use varible!

Maybe you can think of a boolean in config that allows user to destroy trees with kamehameha. yes/no :prazz:

I've also stated it in Haley's kamehameha. I think doing a condition to prevent passing it higher cliff levels would be cool. So it would immediatly exploode then.
(or configurable at least)

I dont think following is really needed in your deindex part:
  • Set kamespeed[kameindex99] = 0.00
  • Set kameplayer[kameindex99] = Neutral Passive
  • -------- So the caster isn't stuck --------
  • Unit - Order kameu99[kameloop99] to Stop
Could you explain, please? With this the unit will ignore the 1st move order, if user aborts casting.

Else I think code looks ok and clean. Might be useful. :thumbs_up:
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
Heh, thanks. =)

If you tell me the line of setting a real to current Z/terrain height then I might add something extra. otherwise I will make it so it doesn't fly around cliffs.

Edit: If you noticed, I tried to make a terri-bad indexing system for them dummies. Kind of failed however I don't want to use someone else's work for this. I might change my mind soon if I can't find a solution though.
 
Last edited:
Level 17
Joined
Mar 18, 2012
Messages
1,717
The tooltip is so-so and could need an improvement.

  • Set kamepickedu = No unit
move this line out of the ForGroup loop. Below this loop you use "last created unit" multiple times. Here you could use your the unit variable, because variable lookups are faster than function calls.

  • Set kamespeed[kameindex99] = 0.00
This doesn't do anything.
  • Set kameplayer[kameindex99] = Neutral Passive
Delete this line aswell.

  • Custom script: if udg_kamegroup99[udg_kameindex99] == null then
  • //......
  • Custom script: set udg_kamegroup99[udg_kameindex99] = null
The first condition is always true because you null the group in the end. So it's a needless check.
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
The tooltip is so-so and could need an improvement.

  • Set kamepickedu = No unit
move this line out of the ForGroup loop. Below this loop you use "last created unit" multiple times. Here you could use your the unit variable, because variable lookups are faster than function calls.

  • Set kamespeed[kameindex99] = 0.00
This doesn't do anything.
  • Set kameplayer[kameindex99] = Neutral Passive
Delete this line aswell.

  • Custom script: if udg_kamegroup99[udg_kameindex99] == null then
  • //......
  • Custom script: set udg_kamegroup99[udg_kameindex99] = null
The first condition is always true because you null the group in the end. So it's a needless check.

I'll fix it either today or tomorrow, thanks.

EDIT: Time for the fixed version, hopefully it is approvable now. =) Let me know if you find anything else wrong with it.
 
Last edited:
Not very effective, I guess.

  • -------- We do this to enable it to work better then 0.03 and to be more precise. --------
  • Custom script: set udg_kametimer = 0.03125
  • -------- This is how you can add events through GUI/Triggering --------
  • Trigger - Add to kameloop <gen> the event (Time - Every kametimer seconds of game time)
Since you're using timer to run period trigger, you need to do this way:

  • Countdown Timer - Start kametimer as a Repeating timer that will expire in Period seconds
instead of
  • Trigger - Turn on kameloop <gen>
and

  • Countdown Timer - Pause kametimer
imstead of
  • Trigger - Turn off (This trigger)
I've test about this thing and I realize:
Timer keep running even I turned period trigger off.
This thing very hurt CPU and RAM you know, specifically is CPU, CPU keep high level when timer keep running. CPU Hot (Also drain more battery) => Performance decrease => Slow down computer. So it's very important thing. You really need to fix it.

If you want proof, just tell me.

Forgot something?
  • Set kameorder99 = (Order(flare))
<=>

  • (Distance between kamep and kamecastp99[kameloop99]) Greater than or equal to 20.00
  • (Current order of kameu99[kameloop99]) Equal to (Order(flare))
This is unsafe.

  • Unit - Set life of kamequickunit to (Real(kamedumdumindexer99))
    • Unit Group - Add kamequickunit to kamegroup99[kameloop99]
    • Special Effect - Create a special effect attached to the origin of kamequickunit using kamemissilesfx
    • Set kame2sfx99[(Integer((Life of kamequickunit)))] = (Last created special effect)
You really need to do another way instead of get Life of kamequickunit and put it as a index.

GUI version and this are the same.

  • -------- Creating and setting the unit groups because the GUI version doesn't work correctly --------
  • Custom script: set udg_kamegroup99[udg_kameindex99] = CreateGroup()
you're wrong about this
GUI version doesn't work correctly

GUI version perfecly fine to use it, but keep it in mind, do not destroy it if you want to use it as a Entrie Unit Group.

GUI is more cooler I guess, because even it's destroyed, it still can be use as a normal group but it can ONLY be used for
  • Unit Group - Pick every unit in Group and do (Actions)
    • Loop - Actions
Proof: Simply hook native CreateGroup, and then create a variable as UnitGroup.

  • Set kamereal1 = (X of kamep2)
    • Custom script: call SetUnitX ( udg_kamedummyu99[udg_kameloop99] , udg_kamereal1 )
    • Set kamereal1 = (Y of kamep2)
    • Custom script: call SetUnitY ( udg_kamedummyu99[udg_kameloop99] , udg_kamereal1 )
=>
  • Custom script: call SetUnitX ( udg_kamedummyu99[udg_kameloop99] , GetLocationX(kamep2))
  • Custom script: call SetUnitY ( udg_kamedummyu99[udg_kameloop99] , GetLocationY(kamep2))
Don't get more useless space.

  • Animation - Change kamequickunit's size to (kamesize[kameloop99]%, 100.00%, 100.00%) of its original size
    • Animation - Change kamequickunit flying height to 75.00 at 0.00
You can just simply do it via Object Unit Editor.

I think this can be used as a spell global variable
  • Angle from kamep to kamecastp99[kameloop99])
since your dummy or some stuffs still created from a same angle.

  • Custom script: call DestroyEffect(udg_kame2sfx99[R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()))] )
Even this is unsafe, but use GetUnitState instead of GetUnitStateSwap :)..



Although I named variable very bad >.<, but I still have a good variables presentation than your (Lower case, Upper case, etc..)
2/5
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
I'll see about it, sure give low ratings all you want. Only petty people care for that, I am submitting stuff to help the community as well people. Since there is not a single Kamehameha approved yet well... yeah.
Well I decided try my luck and use my courage to get at least one Kamehameha approved even if it disgraces me. =)

Thanks for the post I guess, hopefully someone can comment on this and see if your claims are correct.

Edit: Didn't want to say this however I barely understood your post, could you try editing it a bit?

For example the lower case and upper case variable presentation, what does that even mean?

Sure you can do flying height through object editor, but I believe in one dummy unit(Unless slowing down the animation of the effect) only so yeah about that in my opinion your wrong. Shouldn't rely on object editor functions, we did that years ago. Most of what you have said is rather wrong or just silly unless you can provide more evidence.

I was kind of testing unit life, I will see what I can do to fix that.

Almost forgot, try using a unit group array in GUI.

Edit2: Just tested timer vs every seconds and every seconds is faster, it doesn't run when turned off either because if it did then it would trigger the actions wouldn't it?
 
Last edited:
Level 12
Joined
Jul 16, 2012
Messages
681
  • -------- Finishing/explosion effects --------
  • Special Effect - Create a special effect at kamep using kamefinaleffect
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect at kamep using kamefinaleffect2
  • Special Effect - Destroy (Last created special effect)
in every 0.03125 sec, you create sfx in a point you have leaks
so maybe you just use tempoint here hehehe
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
  • -------- Finishing/explosion effects --------
  • Special Effect - Create a special effect at kamep using kamefinaleffect
  • Special Effect - Destroy (Last created special effect)
  • Special Effect - Create a special effect at kamep using kamefinaleffect2
  • Special Effect - Destroy (Last created special effect)
in every 0.03125 sec, you create sfx in a point you have leaks
so maybe you just use tempoint here hehehe

Nope :grin:
 
Thanks for the post I guess, hopefully someone can comment on this and see if your claims are correct.

Ahaha, depending on you :) and you are throwing water in my face.

Edit2: Just tested timer vs every seconds and every seconds is faster

Yup!, timer is faster than trigger timer but it's not about faster or not :). I just noticed you:

Replace:
  • Trigger - Turn on kameloop <gen>
with
  • Countdown Timer - Start kametimer as a Repeating timer that will expire in Period seconds
and this
  • Trigger - Turn off (This trigger)
with this:
  • Countdown Timer - Pause kametimer
it doesn't run when turned off either because if it did then it would trigger the actions wouldn't it?

Trigger doesn't run when it turned off, but timer keep running, timer just have a job is execute, system ordered timer to do that and never stop even run for nothing until
  • Countdown Timer - Pause kametimer
is called!.

I'll see about it, sure give low ratings all you want. Only petty people care for that, I am submitting stuff to help the community as well people. Since there is not a single Kamehameha approved yet well... yeah.

No, they gives you a rating for two reasons:

- Resources quality (Inclued presentation, code, performance, optimizer, etc..)
- Resources very pretty

You should care about the first one to improve your experience since you're trying to become a programmer :).

You really should listen more to the opinions of others :).

Shouldn't rely on object editor functions, we did that years ago. Most of what you have said is rather wrong or just silly unless you can provide more evidence.

What do you mean anway?.

Sure you can do flying height through object editor, but I believe in one dummy unit(Unless slowing down the animation of the effect) only

Why one dummy?, you can do that with all dummies you have!. Blizzard will do it for you than you do it manually :).

Edit: Didn't want to say this however I barely understood your post, could you try editing it a bit?

For example the lower case and upper case variable presentation, what does that even mean?

Since I have told you about this thing!, is this your style?.

  • Set kameu99[kameindex99] = (Triggering unit)
=>
  • Set KM_Caster[KM_Index] = (Triggering unit)
  • Set kameatktype = Spells
=>
  • Set KM_ATTACK_TYPE = Spells
This will look more readable. Don't forget you're submiting this to the public :).
 
Level 22
Joined
Mar 15, 2012
Messages
2,662
Ahaha, depending on you :) and you are throwing water in my face.



Yup!, timer is faster than trigger timer but it's not about faster or not :). I just noticed you:

Replace:
  • Trigger - Turn on kameloop <gen>
with
  • Countdown Timer - Start kametimer as a Repeating timer that will expire in Period seconds
and this
  • Trigger - Turn off (This trigger)
with this:
  • Countdown Timer - Pause kametimer


Trigger doesn't run when it turned off, but timer keep running, timer just have a job is execute, system ordered timer to do that and never stop even run for nothing until
  • Countdown Timer - Pause kametimer
is called!.



No, they gives you a rating for two reasons:

- Resources quality (Inclued presentation, code, performance, optimizer, etc..)
- Resources very pretty

You should care about the first one to improve your experience since you're trying to become a programmer :).

You really should listen more to the opinions of others :).



What do you mean anway?.



Why one dummy?, you can do that with all dummies you have!. Blizzard will do it for you than you do it manually :).



Since I have told you about this thing!, is this your style?.

  • Set kameu99[kameindex99] = (Triggering unit)
=>
  • Set KM_Caster[KM_Index] = (Triggering unit)
  • Set kameatktype = Spells
=>
  • Set KM_ATTACK_TYPE = Spells
This will look more readable. Don't forget you're submiting this to the public :).


Well it is just you kind of did the same, I barely understood you and I really want to know what is right because we both know WC3 works a little different then everything else. Sorry, Should of said it better I suppose.

How did you find this out? Like I really want you to show me proof, I never noticed it. Does it use up more RAM because it isn't noticeable in-game. Not to mention no mod has told me this.

Well rating from people is different then rating from officials which is kind of true in the real world since you want your boss to like it or the person you made the code for instead of random people. . .
Not to mention not many people rate fairly on here including you. I documented every single little thing with tips and even some more instructions so nobody could go wrong without knowing something at least.
Lol that one was funny, since when did this matter for code-based resources? Sure it is a nice visual bonus, but I didn't know everyone was into gigantic visuals for spells because you don't want spells blocking the gameplay of peoples maps when they use your spell unless it is a cinematic or boss spell.

Yeah I do care, its more of I don't usually care for capitals, which is bad of me. I will consider changing it, so far yeah lot of people complain about my style of variable presentation... =)
Thanks again, I didn't mean to offend you. Really appreciate the help, it is just I can't believe the timer thing without like a way to test it or something... Could you get a Mod to agree with you?
I don't like it when people rate my stuff really low, but at least I am able to handle it and see what to do to improve. Constructive critcism I think it might be called?

More dummies means more work for the person who wants to use your spell. Unless I am slowing down the special effect of the dummy it is not needed.
The public could learn to read better... hehe =)
 
I agree that it doesn't stop the timer. PeriodicEvent still runs in background, but without evaluating the trigger.

  • Create 2 triggers with same periodic event
  • Let both trigger display a message
Logically they both will always display thier message at same time.

Now for the test turn off one of these triggers, and turn it on again after (any) time. You will recognize that even after the temporary <TurnedOff> status, the messages again will display at the exactly same time.
So the reason for this is obviously that the timer in background was not stopped.

It's sure a small optimization to work with timer and pause/start, but I don't think it's really noticeable or really a big deal for a GUI-system.
 
Does it use up more RAM because it isn't noticeable in-game.
Sorry about this. Just a habit, CPU goes with RAM, so I use both, just skip those things about RAM.

Could you get a Mod to agree with you?
Sound like very funny!
Why do I have to go through them while it is only my own opinion?. Skip or not depending on you, not a big deal for me.

Let's force 6 timers run with 0.00 seconds to see the different.

untitl15.png

CPU: 9.60
untitl16.png

CPU: 5.86

As IcemanBo said, not a big deal for GUI-System.
 
Last edited:
Level 17
Joined
Mar 18, 2012
Messages
1,717
This could be configurable.
  • Special Effect - Create a special effect attached to the origin of kamedummyu99[kameindex99] using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
  • Custom script: call DestroyEffect( udg_kame2sfx99[R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()))] )
--> GetUnitStateSwap should be the function GetUnitState instead.
 
Top