Author Topic: GTAV-like Character Switcher  (Read 1492 times)

Actually, it's only very slightly like it. Mainly it's an option to switch your control to a bot.

Spawn any bot. Let's say you name it "Bob", and it's a normal blockhead. Now you spawn another, and name it "Jimmy", and it's a normal blockhead. You also set both behavior to be your friends, to not attack you and to attack enemies, such as the zombies.. And also there's you. Let's call you "Blockhead999999".
Likely, those two bots are doing silly things right now.

Okay, now add an event to those bots, blockhead! You select "onActivate" "Bot" "isControllable" "Yes" You click on their holes (heh) and now you can control them!

Type "/listchar" and you would get this in chat:
"You can control these characters:
Blockhead999999
Bob
Jimmy"
Your original player's name will always be yellow. However, each of the bot names will be different colors. You can change what their color is by typing "/setmycolor" and typing a color. This command will not work when you are playing as yourself.

Okay here's how switching would work:
You then type "/switch Bob" and the camera would then switch to Bob the bot! He stops doing all the funny bot stuff, and you are now in full control. When you chat, your name will be your color.
"Bob: lol im gay cigaretteycigaretteia aghasefgshgfhags"
But then what happens to your player, Blockhead999999? Oh well of course, he starts acting like a bot! He does boty things. He will wander around, randomly use the hammer and other things. (for safety, the tools wont do anything) Unlike bots, these actions would only happen if the player has the tools. Bots with these idle actions deactivated will not have the tools, unless an RTB pref is changed. The bots would have full trust with the player and all other bots, unless changed by an RTB pref. Also your bot's inventory is saved when switched.

Now to combat doing this, you spawn some zombies while being Bob. Because the zombies are hostile, Jimmy and Blockhead start to attack, just like bots! Controllable bots will stay somewhat close to each other if they are combating in the same area, and also depending on their behavior mode, unless an RTB pref is changed. You notice that Jimmy has a better weapon and is in a better position. You just switch to him, and then Bob proceeds to act like a bot again.

Now my fingers hurt. I'm sure you get the point now.


I should do this, but my ai skills aren't top notch

Also, you can't change player names

I should do this, but my ai skills aren't top notch

Also, you can't change player names
Couldn't you
-create client with specific name
-use client to spawn player
-control that player

I should do this, but my ai skills aren't top notch

Also, you can't change player names
Can't you just use the default bot AI?

And also darn. I guess you could just recolor the original player's name. Or just don't.

I would say don't worry about color changing and chat name changing and that stuff.

So, basically, there are three (or more or less) bots, and you're controlling one while the others go to their normal behaviors?
*thinks of tenek, eksi and siten instantly*

This sounds totes possible. I know I once went around a little maze controlling a tiny bot, leaving my body behind.

Surely you could do some sort of slash command to switch to one instead of going to a brick to do it like some kind of necromantic ATM.


Also, you can't change player names
Wasn't there once a mod that would replace players' names in chat with randomized first and last names?
« Last Edit: December 03, 2013, 06:38:40 PM by Eksi »

Wasn't there once a mod that would replace players' names in chat with randomized first and last names?
rp chat?

Oh and also when you die as a bot, the bot's hole acts as their spawn point, unless you hit a checkpoint.

And also maybe you would be able to switch with other players! Full trust only, when you switch with a player the player will then switch to control your original person. To avoid spamming maybe there could be a confirmation command, like a chat line appears saying "Someone wants to switch to the person you're controlling!" and then you type "/y" or "/n" within 10 or so seconds
« Last Edit: December 03, 2013, 09:37:57 PM by Crispy_ »

Couldn't you
-create client with specific name
-use client to spawn player
-control that player

function mBot_Create(%name,%pos,%data)
{
   %c = new GameConnection()
   {
      name = %name;
      bl_id = -1;
   };
   %c.createPlayer();
   %b = %c.player;
   %c.schedule(0,delete);
   %b.setTransform(%pos);
   %b.setDatablock(%data);
   return %b;
}

crashes me

totally possible

why are you doing it with new players? @marble

do what you did on the RC helicopter but with 3 STANDARD_PLAYER bots


you could have a slash command to control each one
the only thing left to do is to give them behaviors while you're not controlling them.


also, this topic is another example of kids wanting blockland to be like other games. instead of just playing other games.

HOWEVER; This topic's idea does prove great for puzzles and gamemodes. So I like the sound of it.
« Last Edit: December 04, 2013, 02:32:50 PM by Pandan »


function mBot_Create(%name,%pos,%data)
{
   %c = new GameConnection()
   {
      name = %name;
      bl_id = -1;
   };
   %c.createPlayer();
   %b = %c.player;
   %c.schedule(0,delete);
   %b.setTransform(%pos);
   %b.setDatablock(%data);
   return %b;
}

crashes me
Yea I have had this issue a long time ago with GameConnections, try dumping a random client and copy those same variables and see what happens.

HOWEVER; This topic's idea does prove great for puzzles and gamemodes. So I like the sound of it.
this is what i was intending...

this is what i was intending...
im just going to make this mod myself
its so easy, that even a handicap like myself can piece it together.

i'll even make pawns for playermodels if people want to make a chess variant

im just going to make this mod myself
its so easy, that even a handicap like myself can piece it together.

i'll even make pawns for playermodels if people want to make a chess variant
that would be sweet, please do!