DRW Posted April 10, 2015 Posted April 10, 2015 Hello. I've tried to create a server-sided marker linked to a function that spawns a slothbot bot, it appears and shoots when he sees me. For now all works perfectly, but the problem is that when the bot sees me, another bot appears in the same place he is at, and another, and another... After all, bots don't even get damage when they get shot. What did I do wrong and how can I solve both problems? Server Marker2a = createMarker (-2065, -118, 52,"cylinder",80,100,255,150,0) function botenemy1 ()enemy1a = exports [ "slothBot" ]:spawnBot(-2068,-144,35,0,2,0,0,enemies,22,"guarding") end addEventHandler ("onMarkerHit", Marker2a, botenemy1) 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
Ryancit2 Posted April 10, 2015 Posted April 10, 2015 You mean multiple bots are being spawned? That would only happen if you hit marker multiple times, is it happening even when you hit marker only once? In that case, provide rest of the code so that we can detect where else this bug might be, maybe in a loop or something. [Resource] Advance Voice Messaging system with 120+ languages support! [Resource] Information markers with ingame management + editable permissions! [Resource] Live weather telling app! [Resource] Send Emails from game! [HELP?] Ask Pakistani's, have fun %3C3
rain_gloom Posted April 10, 2015 Posted April 10, 2015 Probably the bot is entering the marker. You should definitely check the element entering inside the function. Try logging everything you work with (the bots created and the element entering the marker) You should see what is entering this way. My GitHub function brain() return nil end
DRW Posted April 10, 2015 Author Posted April 10, 2015 You mean multiple bots are being spawned? That would only happen if you hit marker multiple times, is it happening even when you hit marker only once? In that case, provide rest of the code so that we can detect where else this bug might be, maybe in a loop or something. Oh I forgot other map elements can count as hitelements, thanks! 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
Ryancit2 Posted April 10, 2015 Posted April 10, 2015 You mean multiple bots are being spawned? That would only happen if you hit marker multiple times, is it happening even when you hit marker only once? In that case, provide rest of the code so that we can detect where else this bug might be, maybe in a loop or something. Oh I forgot other map elements can count as hitelements, thanks! My pleasure, and like rain_gloom said, you can also add a check to see whether the hitelement is a player or some other element. [Resource] Advance Voice Messaging system with 120+ languages support! [Resource] Information markers with ingame management + editable permissions! [Resource] Live weather telling app! [Resource] Send Emails from game! [HELP?] Ask Pakistani's, have fun %3C3
DRW Posted April 10, 2015 Author Posted April 10, 2015 Thanks but I still have a problem, when I shoot them they dont get damaged 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
Ryancit2 Posted April 11, 2015 Posted April 11, 2015 Is the bot being shot by same teammate? [Resource] Advance Voice Messaging system with 120+ languages support! [Resource] Information markers with ingame management + editable permissions! [Resource] Live weather telling app! [Resource] Send Emails from game! [HELP?] Ask Pakistani's, have fun %3C3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now