Answered How do I spawn a bot at a specific spot on a map

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
How do I spawn a bot at a specific spot on a map (with godmode).
Is it possible to make the bot not count as a player, if not its ok (must be able to use the melee lounge on the bot)
Is there a way to rename the bot as well?
Whould be nice if I could delete the bot too.
And is there a way to make players not collide?
EDIT:The bot must not be able to move!
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,747
Reaction score
2,832
Points
1,053
How do I spawn a bot at a specific spot on a map (with godmode).
Is it possible to make the bot not count as a player, if not its ok (must be able to use the melee lounge on the bot)
Is there a way to rename the bot as well?
Whould be nice if I could delete the bot too.
And is there a way to make players not collide?
EDIT:The bot must not be able to move!
So you're looking for a script which just spawns a bot to a position? :smile:
 
S

SeriousHD-

Guest
How do I spawn a bot at a specific spot on a map (with godmode).
Is it possible to make the bot not count as a player, if not its ok (must be able to use the melee lounge on the bot)
Is there a way to rename the bot as well?
Whould be nice if I could delete the bot too.
And is there a way to make players not collide?
EDIT:The bot must not be able to move!
So basically you want a clone with health?

guy = self clonePlayer(1);
guy.maxhealth = 100;
guy.health = 100;
guy.team = (self.team == "allies") ? "axis" : self.team;
guy SetCanDamage(1);
guy EnableAimAssist();
guy NotSolid();
guy setphysparams( 0, 0, 0);
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,747
Reaction score
2,832
Points
1,053
Yes, that was the plan.
With this function you can teleport all bots to one position:
Code:
function func_teleportBots(origin = self.origin)
{
    players = GetPlayers();

    foreach( player in players )
    {
        if ( !player IsTestClient() )
        {
            continue;
        }

        player SetOrigin(origin);
        
    }
}
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
So basically you want a clone with health?

guy = self clonePlayer(1);
guy.maxhealth = 100;
guy.health = 100;
guy.team = (self.team == "allies") ? "axis" : self.team;
guy SetCanDamage(1);
guy EnableAimAssist();
guy NotSolid();
guy setphysparams( 0, 0, 0);

Im getting this error when linking the mod:

^1 guy.team = (self.team == "allies") ?
^1------------------------------------^
^1ERR(0) scripts/mp/gametypes/_clientids.gsc (264,37) in "func_dummy()" : syntax error, unexpected TOKEN_CONDITIONAL, expecting TOKEN_SEMICOLON : guy.team = (self.team == "allies") ?
 
S

SeriousHD-

Guest
Im getting this error when linking the mod:

^1 guy.team = (self.team == "allies") ?
^1------------------------------------^
^1ERR(0) scripts/mp/gametypes/_clientids.gsc (264,37) in "func_dummy()" : syntax error, unexpected TOKEN_CONDITIONAL, expecting TOKEN_SEMICOLON : guy.team = (self.team == "allies") ?
Oh its black ops 3 ****. Um try this instead of that whole line:

guy.team = "allies";
if(guy.team == self.team)
guy.team = "axis";
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
Oh its black ops 3 ****. Um try this instead of that whole line:

guy.team = "allies";
if(guy.team == self.team)
guy.team = "axis";

Got this error now:
bo3error.PNG
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
Use this to create a clone in black ops 3:
Code:
#using scripts\shared\util_shared;

//function
self util::spawn_player_clone( self );

Ok I think I need to clarify something first.
I want the clone/bot to: Not move, Not collide,Have god mode, be an enemy so I can use him as a dummy I can melee so I start flying.
Im trying to make it easier to do the melee lounge glitch alone.
Here is a link to the first video I could find that shows what my plan was:

EDIT: If there is a way to make the bot not take damage from melee attacks then I could also use it as a trickshot dummy.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,747
Reaction score
2,832
Points
1,053
Ok I think I need to clarify something first.
I want the clone/bot to: Not move, Not collide,Have god mode, be an enemy so I can use him as a dummy I can melee so I start flying.
Im trying to make it easier to do the melee lounge glitch alone.
Here is a link to the first video I could find that shows what my plan was:

EDIT: If there is a way to make the bot not take damage from melee attacks then I could also use it as a trickshot dummy.
Ok, thank you. I will take a look into this when I'm at home and update you as fast as possible :peace:
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
Ok, thank you. I will take a look into this when I'm at home and update you as fast as possible :peace:
Thanks for the help, both of you!
I made it work by combining some of SeriousHD-'s and your code and here is the result that worked:
Code:
function func_dummy()
{
    guy = self util::spawn_player_clone( self );
    guy EnableAimAssist();
}
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
Yeah it isnt an internal in bo3 :/. I dunno, use mod tool docs and find the clone function
Thanks for reminding me about the mod tools docs. I forgot they existed. :tonguewink:
Btw I got it to work by combining CabCon and your code.
Look at the reply I sent to CabCon if you want to see the result that worked!
 

CoD_Modern_Gamer

Insane-Known Member
Messages
44
Reaction score
15
Points
368
Ok, thank you. I will take a look into this when I'm at home and update you as fast as possible :peace:
Ohh I almost forgot, How do I make the clones spawn in the spot I want them to without standing there.
Is there a way delete them? And how to put an icon above the head of the clones I make so they are easy to find?
And I tried to put an animation on the clones I spawn but got an error about the anim was uninitialized local variable, and I tried to look for the #something that I needed to initialize it with, but I could only find #precache and that seems to not precache anims. :disappointed: If you know, well you do since you have that mod menu with those clone animations, It whould be nice if you could tell me. :grinning:
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,747
Reaction score
2,832
Points
1,053
Ohh I almost forgot, How do I make the clones spawn in the spot I want them to without standing there.
Is there a way delete them? And how to put an icon above the head of the clones I make so they are easy to find?
And I tried to put an animation on the clones I spawn but got an error about the anim was uninitialized local variable, and I tried to look for the #something that I needed to initialize it with, but I could only find #precache and that seems to not precache anims. :disappointed: If you know, well you do since you have that mod menu with those clone animations, It whould be nice if you could tell me. :grinning:
Hi, unfortunately I don't have much time at the moment I can not code this for you, but I will try to answer your question as best as possible for now (don't got a pc at the moment):

Is there a way delete them?
Code:
function func_clonePlayer_delete()
{
    //You need to spawn a clone first
    self.gamevars["Clone"] = player util::spawn_player_clone( player, "t7_loot_gesture_goodgame_salute" );
  
    //Than you can delete it with that:
    self.gamevars["Clone"] delete();
    self.gamevars["Clone"] = undefined;
}

And how to put an icon above the head of the clones I make so they are easy to find?
Create a text at the origin of the clone. (use z)

And I tried to put an animation on the clones I spawn but got an error about the anim was uninitialized local variable, and I tried to look for the #something that I needed to initialize it with, but I could only find #precache and that seems to not precache anims. :disappointed:

Use this function:
Code:
function func_clonePlayer_playAnimation(animname)
{
    if(!isDefined(self.gamevars["Clone"]))
        return;
    self.gamevars["Clone"] AnimScripted( "clone_anim", self.gamevars["Clone"].origin, self.gamevars["Clone"].angles, animname );
}

animname-list:
Use just the first phrase, example: t7_loot_gesture_boast_disconnected
Code:
self func_clonePlayer_playAnimation("t7_loot_gesture_boast_disconnected");
You do not have permission to view link Log in or register now.

I didn't precached everything special for the anims. :peace:


Best regards and wishes,
CabCon :peace:
 
Top