Hello.
There is a character and he should be (by quantity) one.
But if a player chooses this character, and the bot of the same character is already on the map, then there are already two characters on the map.
I used to have a script, but I lost it.
Write on the memory and documentation does not work, i'm missing something...
Can anyone help?
try writing just 0 for that character for example sniper = { "rep_inf_ep2_sniper",5, 12}, to sniper = { "rep_inf_ep2_sniper",0, 0}, it only effects bots. doesent work with the droideka
Thanks for the reply, but this is not what I need.
I will clarify ...
I put Kenobi as a normal unit.
- if the player has not chosen him, then the bot will spawn,
- if the player chooses it, but the bot (Kenobi) is already on the map and is still alive, then it turns out two Kenobi.
So, when a player (Kenobi) spawn, the bot (Kenobi) should disappear.
In my codes:
{"rep_hero_obiwan", 1, 1}
And also in map_name.lua:
In function ScriptPostLoad() should be something like this
OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
KillObject("rep_hero_obiwan")
end
end
)
But it does not work, and still there are two Kenobi on the map (
oh ok sorry i dont think i can help with that :confused: