You need to explain what you mean by a "gate" and what you are trying to do with said "gate".
If you want to save said "gate" state between sessions then consider storing in your bank the state of the gate only instead of the entire unit. You might want to push this through some sort of save/load system for extra security and compression.
If you are simply trying to make this "gate" using triggers then use the create units action with valid arguments.
As a gate I mean for example "Metallic Orizzontal Gate". In my map, I've to save the gate and to load it in another session (bank). But when i load it, the following error message appears "Specified unit type not valid "" "
Do not bother saving the unit. Save the gate state (open or closed). When your next session comes you load the gate state from the bank (open or closed) and apply it to the gate on the map.
If you are dynamically trying to save entire dynamic base placements (hundreds of units and their locations) then be aware that such a thing is not really viable as it will quickly reach bank size limits which will cause players to disconnect during map initialization in multiplayer sessions when the banks are being synchronized.
The error you are getting seems to be because no unit type link information was saved in the bank. As such it is restoring a unit of type empty string so will error.
That's not rly a problem, it's a single player map :)
The problem is that I don't care about the gate's state, I care only about the unit type and it's position. I guessed where the error came from, do you know why the unit is not saved?
You did remember to "BankSave" after adding the unit to the bank and before the session ends (or bank "BankReload" is used). It is recommended to call BankSave after adding a number of elements to the bank since any changes made to the bank between BankSave calls will be lost if the user exits the session.
On top of that you need to make sure to preload the bank (this is not a galaxy native, it adds the bank to the preload file list). You then have to open the bank before you write anything to it and preferably assign it to a global variable at this stage. If you call the "BankRemove" native then you will not be able to modify the bank anymore and cannot open it again for the rest of the session.
The whole process should be something like this...
Preload bank
Open bank
Set bankvar equal to last opened bank
Then after that every time you want to save something.
modify bank (add gate)
save bank
You do not need to remove the bank, clean-up is done automatically when the session ends.
Hmmm would it be possible if I could get an extract or the map with this problem in it? It is important to find why the gate is not being saved/restored and cannot be created with triggers.
I have no idea why I can't use banks for gates, but somehow the "create unit" trigger worked now (maybe I used a wrong point to spawn the unit?). Thanks for help guys.
p.s.: I wont open another topic for this, but my selection in the editor is a turbot (I pressed something wrong). How can I set back to a rectangle?
Hi guys, I tried do to both these things. Seems I can't create a gate using a trigger, suggestions?
You need to explain what you mean by a "gate" and what you are trying to do with said "gate".
If you want to save said "gate" state between sessions then consider storing in your bank the state of the gate only instead of the entire unit. You might want to push this through some sort of save/load system for extra security and compression.
If you are simply trying to make this "gate" using triggers then use the create units action with valid arguments.
@ImperialGood: Go
As a gate I mean for example "Metallic Orizzontal Gate". In my map, I've to save the gate and to load it in another session (bank). But when i load it, the following error message appears "Specified unit type not valid "" "
Do not bother saving the unit. Save the gate state (open or closed). When your next session comes you load the gate state from the bank (open or closed) and apply it to the gate on the map.
If you are dynamically trying to save entire dynamic base placements (hundreds of units and their locations) then be aware that such a thing is not really viable as it will quickly reach bank size limits which will cause players to disconnect during map initialization in multiplayer sessions when the banks are being synchronized.
The error you are getting seems to be because no unit type link information was saved in the bank. As such it is restoring a unit of type empty string so will error.
@ImperialGood: Go
That's not rly a problem, it's a single player map :) The problem is that I don't care about the gate's state, I care only about the unit type and it's position. I guessed where the error came from, do you know why the unit is not saved?
You did remember to "BankSave" after adding the unit to the bank and before the session ends (or bank "BankReload" is used). It is recommended to call BankSave after adding a number of elements to the bank since any changes made to the bank between BankSave calls will be lost if the user exits the session.
On top of that you need to make sure to preload the bank (this is not a galaxy native, it adds the bank to the preload file list). You then have to open the bank before you write anything to it and preferably assign it to a global variable at this stage. If you call the "BankRemove" native then you will not be able to modify the bank anymore and cannot open it again for the rest of the session.
The whole process should be something like this...
Then after that every time you want to save something.
You do not need to remove the bank, clean-up is done automatically when the session ends.
@ImperialGood: Go
Nothing to do. The gates are the only unts that are not saved :(
@ImperialGood: Go
Plus, I can't create a gate with a trigger "create unit"
Hmmm would it be possible if I could get an extract or the map with this problem in it? It is important to find why the gate is not being saved/restored and cannot be created with triggers.
Gates work fine for me.... They don't show up on minimap tho, but that could be easily fixed in data editor...
I have no idea why I can't use banks for gates, but somehow the "create unit" trigger worked now (maybe I used a wrong point to spawn the unit?). Thanks for help guys.
p.s.: I wont open another topic for this, but my selection in the editor is a turbot (I pressed something wrong). How can I set back to a rectangle?