Wardog_01

Add bots automatically on the server

How could I include cyborgs in the server in the following way:

_If a player connects add a bot to fight.

Example if the game is for teams and there is only one player, then the server adds a bot and if the teams are balanced, remove the bot.

The objective is that the game is as even as possible.

Share this post


Link to post
Share on other sites

Tiddy-bits:

Posted (edited)

46 minutes ago, Wardog_01 said:

How could I include cyborgs in the server in the following way:

_If a player connects add a bot to fight.

Example if the game is for teams and there is only one player, then the server adds a bot and if the teams are balanced, remove the bot.

The objective is that the game is as even as possible.


Unless the "cyborgs" have scripted AI built into the (custom) map, stock cyborg models won't be animated and serve no purpose beyond existing as a static map object. Aesthetic perhaps?


In any case, you can spawn one at the location of the player who just quit like this:

event_quit 'spawn bipd "characters\cyborg_mp\cyborg_mp" $n'

This may not work, because I'm pretty sure SAPP's event system cannot retrieve the player's map coordinates on quit, You'd have to use the Lua API to achieve this.

 

Haven't tested it. Try it out.

Edited by Chalwk
Wardog_01 and Enclusion like this

- I invite you to join my Halo Discord Server.

- Add me on discord: Chalwk#9284
- HSP Repo

- HSP Repo Wiki (new)

Share this post


Link to post
Share on other sites

Posted (edited)

9 hours ago, Chalwk said:


A menos que los "cyborgs" tengan una IA con secuencias de comandos integrada en el mapa (personalizado), los modelos de cyborg estándar no se animarán y no tendrán ningún propósito más allá de existir como un objeto de mapa estático. ¿Estética tal vez?


En cualquier caso, puedes generar uno en la ubicación del jugador que acaba de salir así:

event_quit 'spawn bipd "characters\cyborg_mp\cyborg_mp" $n'

Esto puede no funcionar, porque estoy bastante seguro de que el sistema de eventos de SAPP no puede recuperar las coordenadas del mapa del jugador al salir. Tendrías que usar la API de Lua para lograrlo.

 

No lo he probado. Pruébalo.

 

And... well now, bipd, vehi etc... but where do I get that information from. for example if it were for an (actor_variant)? Is there some place to document about that or do you know what it is in that case, because I think I'm close to what I'm looking for.

 

I thank you in advance for the help.

 

Edited by Wardog_01

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.