17.05.2015, 08:48
Sure.
You created a global variable without a tag (Text3D) to store the 3D Label ID but you tried to assign the value format returns (wiki says it doesn't return any specific value though) to it.
The code I posted do the following:
- Declaring a global array with correct tag with size equal to HouseInfo (as I wasn't aware of the size you use).
- In OnGameModeInit, you should reset all house variables including the one we made above. We also reset it to INVALID_3DTEXT_ID.
- Those three parts of code you did "Kuca3D = format(" will be replaced with those above. Format should be just called normally (without having a variable storing a value from it) and assigning the 3D Label ID from Create3DTextLabel to the array we created.
- Whenever you want to destroy a 3D Label, you should know the house index and then you can easily destroy it so it won't mess up with the rest and setting the variable to INVALID_3DTEXT_ID to avoid destroying another 3D Labels.
You created a global variable without a tag (Text3D) to store the 3D Label ID but you tried to assign the value format returns (wiki says it doesn't return any specific value though) to it.
The code I posted do the following:
- Declaring a global array with correct tag with size equal to HouseInfo (as I wasn't aware of the size you use).
- In OnGameModeInit, you should reset all house variables including the one we made above. We also reset it to INVALID_3DTEXT_ID.
- Those three parts of code you did "Kuca3D = format(" will be replaced with those above. Format should be just called normally (without having a variable storing a value from it) and assigning the 3D Label ID from Create3DTextLabel to the array we created.
- Whenever you want to destroy a 3D Label, you should know the house index and then you can easily destroy it so it won't mess up with the rest and setting the variable to INVALID_3DTEXT_ID to avoid destroying another 3D Labels.

