| 09-04-2003, 03:43 AM | #151 |
Added even more functions to my post on page 6 of this thread. I NEED A PHP/MYSQL EXPERT PM me if you are one ;) |
| 09-05-2003, 02:48 AM | #152 |
Coded a new function: Code:
//Also carries over custom value, hero stats, flying height, and prop window angle
//Takes exact same arguments as ReplaceUnitBJ in blizzard.j
function ReplaceUnitAdvanced takes unit whichUnit, integer newUnitId, integer unitStateMethod returns unit
local integer temp_customdata = GetUnitUserData(whichUnit)
local boolean wasHero = IsUnitType(whichUnit, UNIT_TYPE_HERO)
local real temp_fheight = GetUnitFlyHeight(whichUnit)
local real temp_pangle = GetUnitPropWindow(whichUnit)
local integer temp_strength
local integer temp_agility
local integer temp_intelligence
local unit temp_replacedunit
if(wasHero) then
set temp_strength = GetHeroStr(whichUnit, true)
set temp_agility = GetHeroAgi(whichUnit, true)
set temp_intelligence = GetHeroInt(whichUnit, true)
endif
set temp_replacedunit = ReplaceUnitBJ(whichUnit, newUnitId, unitStateMethod)
if(wasHero and IsUnitType(temp_replacedunit, UNIT_TYPE_HERO)) then
call SetHeroStr(temp_replacedunit, temp_strength, true)
call SetHeroAgi(temp_replacedunit, temp_agility, true)
call SetHeroInt(temp_replacedunit, temp_intelligence, true)
endif
call SetUnitUserData(temp_replacedunit, temp_customdata)
call SetUnitFlyHeight(temp_replacedunit, temp_fheight, temp_fheight)
call SetUnitPropWindow(temp_replacedunit, temp_pangle)
return temp_replacedunit
endfunction |
| 09-05-2003, 03:02 AM | #153 |
Curious anyone experimented with these common.j functions? I haven't yet: Code:
native UnitAddIndicator takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing native EnableUserUI takes boolean b returns nothing native CreateTrackable takes string trackableModelPath, real x, real y, real facing returns trackable I wonder what EnableUserUI is as opposed to EnableUserControl.... |
| 09-05-2003, 07:00 AM | #154 |
CreateTrackable will just create the specified Model at the specified position. It's just like a special effect but you can't access, change or remove it with triggers afterwards. It's just there if you create it.... |
| 09-06-2003, 06:29 AM | #155 | |
Quote:
Andy idea what the purpose is/was? |
| 09-06-2003, 10:24 AM | #156 |
No idea Sorry |
| 09-06-2003, 11:04 AM | #157 |
Is there anyway to convert an itemtype to a string? And about EnableUserUI, from what I understand I just think it disables showing of tooltips when you hold the mouse over objects. |
| 09-06-2003, 04:34 PM | #158 | |
Quote:
You could do this with Peppar's method of converting types (look back a couple pages) but I'm not sure it'd have the desired effect. You might get complete gobligook. |
| 09-06-2003, 06:31 PM | #159 |
Maybe Im just blind but I cant find it... And is there anyway to convert an ability to a string? |
| 09-06-2003, 06:53 PM | #160 |
@dataangel: I think he doesn't mean the integer for the itemtype (Peppar wrote these handle converting funcs), but the string, that belongs to the type (the name of the type). BoZo, tell us, who of us is wrong. |
| 09-06-2003, 07:01 PM | #161 |
Yeah your right, I can get the itemid but not the name... |
| 09-07-2003, 10:01 PM | #162 | |
Quote:
I know that's what he was talking about ;) But using Peppar's technique you can convert ANY type to any other type, for bozo it'd be like Code:
function ItemId2String takes itemtype whichItemType returns string
if(1) then
return whichItemType
endif
endfunction |
| 09-07-2003, 10:08 PM | #163 |
Alas, piro-pion has left us because he had no time (same reason I can't code it). So once again: WE NEED A PHP/MYSQL GURU PM me if you can help =) |
| 09-07-2003, 11:19 PM | #164 |
Well I suck at jass so how would you make a dialog button be named that? |
| 09-08-2003, 01:21 AM | #165 |
peppar posted his dialog engine a while back and truthfully i have no idea how to use it ( not that i've tried to hard to find out but... ) how would i get which player clicked a button? the GetPlayerButtonData function returns an integer and not a player... would that be the index of the player? like if Player 1 Red clicked a button then GetPlayerButtonData() would retrn 0? |
