Clones?

Status
Not open for further replies.

Tamkis

Lua Grasshopper
Just a really quick question and thought:

Is it possible to spawn an MT_Player object as a Bot through LUA? Through experimentation with RocksFall.lua, I made the game spawn Tails instead of Rocks (see gif below); however, the Tails had no AI. They could, however, be killed. Using Eggman.wad, I was able to shoot down and kill some Tails. See/DL the gif movie here.

Just curious if this is possible. It would be really fun if one could spawn an army of Tails Bot helpers. Although I scourged the SRB2 Source code file, I could not find where in code the game spawns the Tails Bot AI in a Sonic & Tails game. Is the spawning of the Tails Bot a hardcoded function? Is this possible through LUA?

Thanks in advance
 
Tailsbot AI is enabled/disabled by the value of the "botingame" global in the source code, which is managed by the "botskin" global in the source code, which is set when a single-player game with a bot is started. (Or something like that.) Neither of these globals are in any way accessible through Lua, so triggering the game's built-in bot AI is impossible outside of the pre-existing conditions. What you could do, though, is spawn an MT_PLAYER (or a clone object with similar properties) and recreate aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaall of the relevant physics and actions in Lua, then write your own AI suited to what you want the bots to do. That's... your only possible option, really.

On an unrelated note, find a better GIF host
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top