i think there is a problem of my understanding of the parameter of the item slot. can anyone explain me that condition (item carried by UNIT in INDEX, "Inventory Item Carried")?
i have a problem with my auto-cast ability. i thought that i made everything ok, but unit uses that ability only when stands in one spot, but i wanted it to use ability anytime it is hurt (i set validators Life LT 50 Percent and something like Caster is not healing itself). i tested it when unit was under attack by ultralisk and unit was moving. when it is moving - the ability does not auto-cast. when it stops for a while - ability is used. any ideas how to change that?
ok. counting of items done (by using "Inventory Items Carried"). but how to check if specific slot is empty? i tried the examples i wrote earlier... but they don't work...
i need to chceck, if all the inventory slots of my hero are empty.
i tried some loops with conditions like "if item carried by hero in 1 != any item" or "if item carried by hero in 1 = no unit" but nothing works...
i moved preloading section to map initialization main trigger (but that doesn't matter for now). the thing that matters is that i used a constant expression while preloading. i mean:
Bank - Preload and synchronize bank "ATC" for player 1
(not "for player iPlayer" - that means: not for variable.)
i have detected that in at least one trigger there should be at least one "open bank" or "preload bank" with a constant expression for all players. so, if i want to use my bank, i should put "preload bank for player" in the "map initialization" trigger with constants of all human players.
while i've been trying to make thing work, i made a function:
LoadPlayerBank
Options: Action
Return Type: (None)
Parameters
iPlayer <Integer>
Grammar Text: LoadPlayerBank(iPlayer)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Bank - Preload and synchronize bank "ATC" for player iPlayer
Bank - Open bank "ATC" for player iPlayer
Bank - Set Option Signature for Bank (Last opened bank) to Enable
General - If (Conditions) then do (Actions) else do (Actions)
If
(Bank (Last opened bank) is verified) == true
Then
UI - Display "Bank is valid." for (All players) to Subtitle area
General - If (Conditions) then do (Actions) else do (Actions)
If
(Bank (Last opened bank) has "Hero" in section "SaveData") == true
Then
Bank - Restore "Hero" of section "SaveData" from bank (Last opened bank) for player iPlayer at Player Spawn Point 01 facing 0.0
Variable - Set PlayerHeroes[iPlayer] = (Last restored unit)
Else
UI - Display "Hero data not found." for (All players) to Subtitle area
CreatePlayerHero(iPlayer)
Else
UI - Display "Invalid bank file." for (All players) to Subtitle area
but that functions returns only "Invalid bank file.", but, as i think, it should create (restore) "hero" unit. i use that function in Map Initialization trigger (only Map Initialization). trigger is used for 8 players, but while testing, there was only one (me).
any ideas how to fix the problem?
There are 14 slot and I think I played with all slots, but I checked that I am saving and loading the banks for all slots before even making these thread:D
I think he meant if you were testing the map with other players occupying other slots. By the way: if you were testing your map as local player, then you couldn't test if ALL banks were successfully loaded. Every bank is connected with a human player, not computer player, i think...
i think they don't. a couple of days ago i've been testing bank operations (preload, open, save, store) and i could load bank anytime i wanted to. i made a trigger, which was executed, when player typed "load" in chat messages. it worked properly, but now - none of the bank operation works :/ (except storing and saving)
anyone knows the way to fix that?
i have a problem with trigger: i think i did everything ok, but when i test map by Test Document option - i get message, that the bank is not valid. i use signature for checking if the bank has been modified by game or not.
i will attach image in a minute.
if i use that trigger without Signature Option and without Verify Bank - i get "no value", this is strange too, because in the bank there is a value of the specified key and section.
0
so, there is no way to check if specified inventory slot is empty?
0
i think there is a problem of my understanding of the parameter of the item slot. can anyone explain me that condition (item carried by UNIT in INDEX, "Inventory Item Carried")?
0
noone can answer how to change that ability?
0
noone got any ideas?
0
i have a problem with my auto-cast ability. i thought that i made everything ok, but unit uses that ability only when stands in one spot, but i wanted it to use ability anytime it is hurt (i set validators Life LT 50 Percent and something like Caster is not healing itself). i tested it when unit was under attack by ultralisk and unit was moving. when it is moving - the ability does not auto-cast. when it stops for a while - ability is used. any ideas how to change that?
0
i check every slot. i wrote "1" for example only.
ok. counting of items done (by using "Inventory Items Carried"). but how to check if specific slot is empty? i tried the examples i wrote earlier... but they don't work...
0
i need to chceck, if all the inventory slots of my hero are empty. i tried some loops with conditions like "if item carried by hero in 1 != any item" or "if item carried by hero in 1 = no unit" but nothing works...
i have used Bifuu's hero creation tutorial, btw.
0
i think i solved the problem.
i moved preloading section to map initialization main trigger (but that doesn't matter for now). the thing that matters is that i used a constant expression while preloading. i mean:
i have detected that in at least one trigger there should be at least one "open bank" or "preload bank" with a constant expression for all players. so, if i want to use my bank, i should put "preload bank for player" in the "map initialization" trigger with constants of all human players.
anyway, thanks for replies.
0
i use the following function to save data:
as you see, setting signature to enable is set after opening the bank, but the problem still exists.
0
does anybody know what is wrong?
0
while i've been trying to make thing work, i made a function:
LoadPlayerBank
but that functions returns only "Invalid bank file.", but, as i think, it should create (restore) "hero" unit. i use that function in Map Initialization trigger (only Map Initialization). trigger is used for 8 players, but while testing, there was only one (me). any ideas how to fix the problem?
0
I think he meant if you were testing the map with other players occupying other slots. By the way: if you were testing your map as local player, then you couldn't test if ALL banks were successfully loaded. Every bank is connected with a human player, not computer player, i think...
0
i think they don't. a couple of days ago i've been testing bank operations (preload, open, save, store) and i could load bank anytime i wanted to. i made a trigger, which was executed, when player typed "load" in chat messages. it worked properly, but now - none of the bank operation works :/ (except storing and saving) anyone knows the way to fix that?
0
i have a problem with trigger: i think i did everything ok, but when i test map by Test Document option - i get message, that the bank is not valid. i use signature for checking if the bank has been modified by game or not.
i will attach image in a minute.
if i use that trigger without Signature Option and without Verify Bank - i get "no value", this is strange too, because in the bank there is a value of the specified key and section.
0
now, i use a bank signature, but i think it is easy to modify... really noone can help?