HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell Level Variable Usage

06-17-2006, 04:02 AM#1
Orc Dork
I have been trying to find a way to use variables in GUI triggers that use the current spell level, but i end up having to add an integer with a real which doesnt work.

Just as an example: (not actual trigger)
Event: When a unit begins casting a spell.
Conditions: Spell is equal to Time Warp
Actions: Set TWLvl to ((Level of Time Warp) for triggering unit)
Wait (TWLvL x 5)
Whatever I want Time Warp to do....
06-17-2006, 04:08 AM#2
Rising_Dusk
Well in jass (I know you said GUI) you use GetUnitAbilityLevel(...)
In gui use the following

Zoom (requires log in)

Also...
Quote:
add an integer with a real

Typecast them using R2I(...) or I2R(...) [There are GUI equivalents].
Heck, in jass, there really isn't a problem with int/reals unless it's a return from another function.
Attached Images
File type: jpgLevelCheck.JPG (27.2 KB)
06-17-2006, 02:37 PM#3
Orc Dork
Yeah, the only problem is, I don't know any JASS whatsoever.
Anyone know a GUI fix to this problem?
06-17-2006, 09:21 PM#4
SFilip
first of all i suggest that you use starts the effect of an ability and casting unit instead of triggering unit.
also i always had problems when i tried to use wait for a variable...never worked. i had to write a if..then for every level i had. a bit messy but it worked fine.
06-17-2006, 09:27 PM#5
Rising_Dusk
Quote:
[There are GUI equivalents]
Here they are.

Zoom (requires log in) Zoom (requires log in)
Attached Images
File type: jpgI2R.JPG (57.2 KB)
File type: jpgR2I.JPG (51.6 KB)
06-17-2006, 10:07 PM#6
Orc Dork
Quote:
Originally Posted by Rising_Dusk
Here they are.


Thanks a ton, this is exactly what I was looking for! Now all i have to do is take that 4 trigger spell i made for my friends and make it into one trigger!

+rep!

Edited by Blade.dk. Reason: Removed the images from the quote, they are in the post above and they are huge.
06-17-2006, 10:19 PM#7
Anitarf
Quote:
Originally Posted by SFilip
first of all i suggest that you use starts the effect of an ability and casting unit instead of triggering unit.
Actually, triggering unit is better than Casting unit, because th elater is bugged. That might have given you the trouble you had after waits, cast event responses are bugged like that.