Hey everyone, I posted a question on Anachron's awesome inventory spell recently, but it occurred to me my problem might simply be due to my very basic understanding of vjass. The custom inventory spell he made is pretty popular I beleive so maybe someone out there will see what I mean...
I want the inventory to be constructed at the start location for each player. I have it so each players start location is at an empty part of the map where there is room for the construction of the inventory destructibles. Technically all I have to do is define the 'point' right? After that each player inventory will correspond to that players hero, right? I don't really have to edit anything futher, its already mui from what I can tell. I was looking in the CISetup trigger and tried the following:
rect CI_UI_RECT = GetPlayerStartLocation(Player(i))
It says error, undeclared variable. I guess I don't remember much about vjass.
Am I in the right place? And sorry if you already answered a question like this, but I double checked all your notes and almost every page on this forum.
Also I wanted to ask if it was possible to directly add stats to items that are mathematical expressions, not just values, i.e.
(This is from the "Test" trigger)
set ci.dmg = 2*GetHeroLevel(hero)
or maybe something like
set ci.dmg = native GetRandomReal takes real 20., real 50. returns real
Would the ability libraries ect. handle these expressions properly and add the right amount of damage as is? If not would there be an easy tweak somewhere to adjust things properly, or are these things too unpractical? So far I haven't figured this out yet either. I'm also not sure if its not working due to my possible misunderstanding of a vjass function or if its a limitation of the spell system itself. any help at all would be great.
I want the inventory to be constructed at the start location for each player. I have it so each players start location is at an empty part of the map where there is room for the construction of the inventory destructibles. Technically all I have to do is define the 'point' right? After that each player inventory will correspond to that players hero, right? I don't really have to edit anything futher, its already mui from what I can tell. I was looking in the CISetup trigger and tried the following:
rect CI_UI_RECT = GetPlayerStartLocation(Player(i))
It says error, undeclared variable. I guess I don't remember much about vjass.
Am I in the right place? And sorry if you already answered a question like this, but I double checked all your notes and almost every page on this forum.
Also I wanted to ask if it was possible to directly add stats to items that are mathematical expressions, not just values, i.e.
(This is from the "Test" trigger)
set ci.dmg = 2*GetHeroLevel(hero)
or maybe something like
set ci.dmg = native GetRandomReal takes real 20., real 50. returns real
Would the ability libraries ect. handle these expressions properly and add the right amount of damage as is? If not would there be an easy tweak somewhere to adjust things properly, or are these things too unpractical? So far I haven't figured this out yet either. I'm also not sure if its not working due to my possible misunderstanding of a vjass function or if its a limitation of the spell system itself. any help at all would be great.