I spawned a bot using console command %bot = new aiPlayer(%name){datablock=playerStandardArmor; position=findClientByName("enterNameHere").player.getPosition();};
but I'm trying to access the ID of the bot, i tried %bot.getID(); but it doesnt work. If anyone knows how I can accomplish this any help would be great!
function Armor::onTrigger(%this,%obj,%slot,%on)
{
%objectID = %this.getID();
if(isObject(%obj.client))
{
if(%on)
{
if(%slot == 4)
{
if (%obj.client.isCarryingBody == 0)
{
Findclientbyname(%obj.client.name).player.mountobject(%objectID,1);
%obj.client.isCarryingBody = 1;
}
else if (%obj.client.isCarryingBody == 1)
{
%objectID.dismount();
%obj.client.isCarryingBody = 0;
}
}
}
}
parent::onTrigger(%this,%obj,%slot,%on);
}
I need help getting that object's ID ingame is there any possible way?