Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Alvio

#1
SWBF2 Modding / Re: Need lua script
July 10, 2019, 01:07:30 PM
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 (
#2
SWBF2 Modding / Need lua script
July 10, 2019, 10:28:52 AM
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?