HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Correct ?

03-21-2008, 10:23 AM#1
ThonGod
Is this trigger correct ?

Like without leaks, etc ?

Would all the texts be removed if people cast spells at same times?

Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Conditions
Collapse Actions
Set Caster = (Casting unit)
Floating Text - Create floating text that reads (Name of (Ability being cast)) above Caster with Z offset 20.00, using font size 14.00, color (50.00%, 100.00%, 100.00%), and 0.00% transparency
Set SpellText = (Last created floating text)
Floating Text - Change SpellText: Disable permanence
Floating Text - Change the lifespan of SpellText to 3.00 seconds
Floating Text - Change the fading age of SpellText to 1.00 seconds
Floating Text - Set the velocity of SpellText to 32.00 towards 90.00 degrees
Wait 3.00 seconds
Floating Text - Destroy SpellText

Thanks

- ThonGod
03-21-2008, 11:56 AM#2
DioD
No.

This code incorrect and fail if multiple players cast spell same time.

Text tags not need to be destroyed.

Leaks are...

Single location == caster location from second line.
03-21-2008, 03:08 PM#3
Gorman
dont use the variables, they are unneeded.
think about it, if it happens again so that its not "last created text blah.." then there is nothing stopping it overriding the variable. Besides, its basicly 0 time. So dont use the variables, just use last created, and casting unit.
And the wait and destroy are unneeded, because u used set life span
03-21-2008, 04:56 PM#4
Salbrismind
Use Jass it is the best way to prevent leaks and it also looks very clean because your using locals.
03-22-2008, 06:55 AM#5
Gorman
Use GUI, it looks wayyy prettier.

although i do like the locals.
Out of intrest, if i use custom script to define a variable as local, but it is still in the global bit, does that makes it local?
(coz in JASS u dont use that little global thing right?)
03-22-2008, 08:22 AM#6
Pyrogasm
WTF are you talking about, Gorman?

Anyway, ThonGod, as Gorman said: you don't need the Variable Setting, Wait, or Floating Text Destroying because you've set the Floating Text's lifespan and disabled its permanence.
03-22-2008, 04:25 PM#7
Salbrismind
Quote:
Originally Posted by Gorman
Use GUI, it looks wayyy prettier.

although i do like the locals.
Out of intrest, if i use custom script to define a variable as local, but it is still in the global bit, does that makes it local?
(coz in JASS u dont use that little global thing right?)

Gorman, Gorman, Gorman...

http://www.wc3campaigns.net/showthre...690#post988690

This is in pyro's signature it will convince you that gui is not the road to take...

Also I remember hearing that the gui local's trick only works once per trigger?
03-23-2008, 01:40 AM#8
ThonGod
Ok, thanks everyone for the help =]

- ThonGod
03-23-2008, 10:14 AM#9
Gorman
A dude from ETS MT told me about it, ill post a topic to ask, coz i think it would be pretty useful =)

Off Topic

Quote:
Originally Posted by lolz i said this!
Use GUI, it looks wayyy prettier.
Quote:
Originally Posted by but that fool Pyro said this back!
WTF are you talking about, Gorman?
Pyro, dont u miss the pretty little green Xs and cogs, and the red Zs and hundreds of tiny yellow men when u make a big trigger?
I bet secretley he has a picture of all the yellow men and xs etc, and he looks at it when he is sad.

Vex said GUI is like using a catapault (or trebuchet, i forget) which is way cool, and looks awesome aswell. Vex's analogy wins, it means that GUI is :
A) sweet looking, and mad-dog old school
B) way faster and more awesome
C) can be fun to ride on, but dont try at home, also watch out for landing on poles.

And he said JASS is like walking up a hill, so that means its silly and more silly, unlucky JASSers!

03-24-2008, 02:40 AM#10
Pyrogasm
My "WTF are you talking about, Gorman?" was in response to this:
Quote:
Originally Posted by Gorman
Out of intrest, if i use custom script to define a variable as local, but it is still in the global bit, does that makes it local?
(coz in JASS u dont use that little global thing right?)
03-24-2008, 03:13 AM#11
Here-b-Trollz
I really don't see why that couldn't apply to everything he's ever posted.
03-24-2008, 03:25 AM#12
Pyrogasm
lolololol...
03-24-2008, 06:24 AM#13
Gorman
lolz, i just know nothing about JASS, but i assumed u dont use that little variable window like in GUI, coz that would be stupid.

(and yes i realised thats waht u was wtfing.)