Jump to content

Bots invencibles


DRW

Recommended Posts

Posted

Muy buenas a todos/as.

Soy nuevo en esto del scripting (y por nuevo me refiero a que llevo unas horas sabiendo lo esencial), por lo que, por favor, no blasfeméis si he cometido alguna atrocidad :).

El caso es que estoy usando el resource Slothbot para generar un bot cuando haya un evento onMarkerHit, hasta ahí bien, el bot funciona usando la posición "guarding", dispara a los que no estén en su equipo y todo eso. El problema es que, a la hora de ser disparado no recibe ningún tipo de daño, como si fuera invencible. He buscado por el foro sobre este problema y realmente ninguna sugerencia ha logrado solucionarlo.

Me he dejado llevar por los errores que me daba la consola del server y los he solucionado según sus indicaciones.

  
Marker1 = createMarker (214.32,1879.686, 12.9,"cylinder",2.0,180,0,0,255) 
  
function botenemy1 
  
()enemigo = exports [ "slothBot" ]:spawnBot(212,1863,13.14,0,2,0,0,enemies,22,"guarding") 
  
end 
addEventHandler("onMarkerHit", Marker1, botenemy1) 

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted

"enemies" es el nombre del team, ¿verdad?

  
  
Marker1 = createMarker (214.32,1879.686, 12.9,"cylinder",2.0,180,0,0,255) 
  
function botenemy1 
  
()enemigo = exports [ "slothBot" ]:spawnBot(212,1863,13.14,0,2,0,0,getTeamFromName("enemies"),22,"guarding") 
  
end 
addEventHandler("onMarkerHit", Marker1, botenemy1) 
  

Currently developing for International Gaming Community - Join us!

Posted

Sí, el equipo es "enemies". Aunque hayas editado el team, el bot sigue siendo invencible, pero por razones obvias, al atacar con un cuchillo a la espalda del bot, este muere.

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted

El bot es parte de enemies, y su posición hace que ataque a los que no sean enemies.

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...