Author Topic: RadiusSearch Problems - Runs only once  (Read 530 times)

Code: [Select]
function DNASearch(%pos,%dna,%bot)
{
InitContainerRadiusSearch(%pos, 5, $TypeMasks::PlayerObjectType);
while(%hit = containerSearchNext())
{
if(%hit.getClassName() $= "Player")
{
announce(%hit.getClassName());
announce(%dna);
announce(%hit.dna);
if(%hit.dna !$= "" && %dna !$= "")
{
if(%hit.dna $= %dna)
%bot.dna =  %dna;
else
%bot.dna = "[NONE]";
}
}
}
}
Everytime i run this when the bot is generated, it runs only once.
However, whenever I run elsewise, eval or console, it functions perfectly.

Elaborate on "runs once" please. I'm not sure what you mean by that.

Elaborate on "runs once" please. I'm not sure what you mean by that.
I found the issue. When I ran it, it was before the parent which seemed to matter.

Bot DNA? Sounds exciting :D

Bot DNA? Sounds exciting :D
not as much as you'd probably expect.
Killing a player leaves behind a corpse.
if you were close enough, you leave your dna on the bot.
A detective then can use it to compare it to living people's DNA.
if the DNA lights up green bam you have your killer.

It's too late. You have already inspired Greek2Me.