Page 1 of 1

Two Questions [Answered]

Posted: Wed Jun 03, 2015 12:05 pm
by thelegend
Hey guys,
I still have two questions which would make me feel better if I got both things working.
1. Is it possible to let buildings be destroyed when the game starts. For example some skyscrapers would explode since the player first spawns (or even before the player selected for a team).

2. On Sniper Hint Nodes there are sometimes up to 3-4 snipers in one node. I would like to decrease the amount of snipers (or other things like mines). I know someone already asked this here but I don't seem to find that topic again..

Thanks in advance.

Re: Two Questions

Posted: Wed Jun 03, 2015 12:49 pm
by Anakin
you can set the health points of objects via lua. look at the stock scripts it's done a couple of times for turrets. About 2 It is not possible to reduce the number of snipers per node. you can only add more nodes so that the snipers spread, or you reduce the number of sniper that can spawn at once.

Re: Two Questions

Posted: Wed Jun 03, 2015 2:25 pm
by AnthonyBF2
For the first thing try something like this:

Code: Select all

OnCharacterSpawn(
function(character)
if IsCharacterHuman(character) then
KillObject("buildings")
end
end
)
Of course it has to be a destructible entity for lua to kill it.

Re: Two Questions [Answered]

Posted: Wed Jun 03, 2015 3:07 pm
by thelegend
Thank you both. Got everything working fine :)