HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

xploss trigger help

01-06-2004, 02:06 AM#1
ubern00b
does anyone know of a working revive trigger that removes xp proportional to the heros level when it revives? i have something close but i need to set one variable to the heros level, and it is a real type, which can not be converted to a heros level, and i dont think that i can convert a real into an integer... help?

Untitled Trigger 003
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set Reviveherolevelinteger = (Hero level of (Dying unit))
Set Revivexploss = ((reviveherolvlreal x 0.95) x 1.00)
Wait revivetime seconds
Hero - Instantly revive (Dying unit) at (Center of Revivezone), Show revival graphics

once i can get the heros level into the equation, ican add teh xp removal and the remaining variables that need to be set into it

actually, i really just need to know how to convert a real into an integer.. but any suggestions wiould be appreciated





also, while on this post, im also trying to get a revival-zoen trigger, is it possible to set a trigger to revive to a variable region? to my knowledge, a variable regions initial state has to be no region, so it doesnt seem possible but im probably just missing somethiong. Again, any help would be appreciated
01-06-2004, 04:22 AM#2
Mr. Euthanasia
I'm not quite positive what you are asking with either question but I made a quick map you can download that subtracts xp from the hero according to level (I think that is what your question was). I also did a revival thing with a region variable. The map is attached below.

Also on the question of converting a real to an integer it should be in the triggers, if you still can't find it the JASS function is "R2I(real)".
01-06-2004, 04:40 AM#3
Kywrath
As far as converting a real to an integer, Look in the functions. You will find something called "Convert Real to Integer". Use that when you want to acess the variable
01-08-2004, 01:23 AM#4
ubern00b
heh, pardon my n00bness. ( hence my name) i actually figured out what i was trying to do the day after i posted
, i was about to give up using the search-for command to find integer, when i realized to search for conversion and the rest is pretty obvious. i'd post the working triggers here, but i dont think they are necessary. thanks for the replies anyways, i appreciate the help:ggani: this site is pretty cool. i can probably get any questions i have answered here, thanks loads guys.