But everytime I do so, only the first unit has the marker working! I dont know whats wrong, maybe the team is wrong? I tried change "ATT" to "DEF" but still problem remains... please help thanks
I think my problem only happens when I try to put markers on 2 different teams... because on 1 team it works as it should but on other team, the marker(s) work for different units than I specified...
When I change the "ATT" with "DEF" it works on opposite team... is there a way to make it work for both teams? Thanks
what does the "ATT" refer to? Is it the team that sees the marker or is the team that has the marker on their head?
Most likely the team that sees the marker. If that's the case, then try adding this line twice, once for ATT, and the second time for DEF.
Oh stupid me... I didn't quit the game when testing the new .lvls ... I just restarted the map and that's why the changes didn't refresh lol...
Anyway I think I know what is causing the original error now... I have the markers on bunch of units now and I think its limited to 7 or 8 or so units and then it ignores them I guess but idk Ill have to test more to be sure
Weird bug when I play the markers show now but when the next map starts they stop working until I restart swbf2 game...
and now its crashing the game right when the last soldier is killed and map is supposed to end... I made bfront log but couldnt find anything with severity 3 in it
MapAddClassMarker() might only add markers to entities that are alive at the moment you call it. Since that's not working, I'd recommend using MapAddEntityMarker() on all the entities you want marked. If you want all the units marked, use MapAddEntityMarker() in an OnCharacterSpawn() and MapRemoveEntityMarker() when the unit dies.
Markers are only added to one team at a time, so if you want them visible on both teams you need to add them for both teams.
I forget what all the trues and falses mean. Play around with them and search through the other script files to see how the official scripts use them. If the game is limiting how many markers are shown, it might be a memory pool issue.
[RDH]Zerted wrote:MapAddClassMarker() might only add markers to entities that are alive at the moment you call it. Since that's not working, I'd recommend using MapAddEntityMarker() on all the entities you want marked. If you want all the units marked, use MapAddEntityMarker() in an OnCharacterSpawn() and MapRemoveEntityMarker() when the unit dies.
Markers are only added to one team at a time, so if you want them visible on both teams you need to add them for both teams.
I forget what all the trues and falses mean. Play around with them and search through the other script files to see how the official scripts use them. If the game is limiting how many markers are shown, it might be a memory pool issue.
It only working the first time you play a map doesn't make sense. My only guess for that is the marker field doesn't get removed properly at the end of the game and when the next game starts, SWBF2 somehow thinks everything already has a marker.
Anyway, get it working for the map first and hopefully it'll magically fix the re-playability issue.
[RDH]Zerted wrote:It only working the first time you play a map doesn't make sense. My only guess for that is the marker field doesn't get removed properly at the end of the game and when the next game starts, SWBF2 somehow thinks everything already has a marker.
Anyway, get it working for the map first and hopefully it'll magically fix the re-playability issue.
You know you might be right... I did not include "remove" code as well...
Could you give me an example of a remove code? I'm not very good at creating new scripts/function things but Im guessing is it would include something like OnObjectiveEnd (Thats completely made up function by the way)