Jaysds1 Posted December 18, 2011 Share Posted December 18, 2011 lol, what about the map editor side? Link to comment
Slothman Posted January 21, 2012 Author Share Posted January 21, 2012 BUG FIX Better late than never. This is just an update to make the script work. It doesn't add any new features or optimization. That may come later if you treat me nice. https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 Link to comment
gtrg Posted January 22, 2012 Share Posted January 22, 2012 btw could you add them in mutiple teams? Link to comment
Tunner Posted January 26, 2012 Share Posted January 26, 2012 Thanks for the bug fix slothman. But debugscript is still spamming me with red error messages. About comparing bolean with numbers and such. Link to comment
Slothman Posted January 30, 2012 Author Share Posted January 30, 2012 can you post the errors? Link to comment
Tunner Posted January 31, 2012 Share Posted January 31, 2012 sure, here you are: ERROR slothbot/sbclient.lua:1109:attempt to compare boolean with number This error totally floods the debug. Link to comment
LT Uranus Posted February 4, 2012 Share Posted February 4, 2012 great to see that it works again but something is wrong with teams for me,does anyone have problems with teams too ? bots fight but they dont care its teammate or enemy they fight fight fight... u know -- mortal-kombat ;D edit im using 1.3 Link to comment
asturel Posted February 29, 2012 Share Posted February 29, 2012 great to see that it works again but something is wrong with teams for me,does anyone have problems with teams too ? bots fight but they dont care its teammate or enemy they fight fight fight... u know -- mortal-kombat ;D edit im using 1.3 i had this issue too. btw the throwable weapons (grande, molotov, etc..) is not handled it would be great if it would be. some tactics improment would be also good (switching between weapons depends on distance or running around the target w/ tec/etc.. while shooting) Link to comment
Slothman Posted February 29, 2012 Author Share Posted February 29, 2012 currently the bots can only have 1 weapon at a time, so weapon switching isn't really possible. The team bug is something I was made aware of, and im working to solve it properly rather than just a patch job. Throwable weapons are a a problem because peds can't throw projectiles weapons( or at least last I checked, maybe that's changed) and the only way to do it would be some hacky createProjectile method. Link to comment
LT Uranus Posted March 1, 2012 Share Posted March 1, 2012 currently the bots can only have 1 weapon at a time, so weapon switching isn't really possible. The team bug is something I was made aware of, and im working to solve it properly rather than just a patch job. Throwable weapons are a a problem because peds can't throw projectiles weapons( or at least last I checked, maybe that's changed) and the only way to do it would be some hacky createProjectile method. sounds great, il be back to my project then Link to comment
villr Posted March 7, 2012 Share Posted March 7, 2012 addEvent("SpawnPetDog", true) function spawnDog() local x,y,z = getElementPosition (source) local rot= 90 local skin=10 local interior=0 local dimension= 0 local team=getPlayerTeam(source) local weapon=0 local mode= "waiting" local modesubject=source dog = call (getResourceFromName("slothbot"), "spawnBot", x, y+math.random(1,3), z+math.random(1,3), rot, skin, interior, dimension, team, weapon, mode) call (getResourceFromName("slothbot"), "setBotAttackEnabled",dog,false) --setElementData(source,"HasPetDogpackOut", true) end addEventHandler("SpawnPetDog", getRootElement(), spawnDog) why isent the setBotAttackEnabled working? i dont know why and it dont come any error in debugsript Link to comment
Slothman Posted March 9, 2012 Author Share Posted March 9, 2012 https://community.multitheftauto.com/index.php?p= ... ils&id=672 fixed team detection, new version uploaded. i see what the problem is for setbotattackenabled. for some reason, i wait a bit of time to set certain aspects of the bot after it spawns. so to stop the bot from being able to shoot, do this: setTimer ( call, 400, 1,getResourceFromName("slothbot"), "setBotAttackEnabled",thebot,false ) that should work Link to comment
Deagle Posted March 10, 2012 Share Posted March 10, 2012 Is it possible to create a ped which could fight against me with a hunter ? Link to comment
karlis Posted March 10, 2012 Share Posted March 10, 2012 slothbot doesn't support vehicles. Link to comment
Tunner Posted March 10, 2012 Share Posted March 10, 2012 Sorry to say this, but even after the update my bots still kill everyone regardless the team. Link to comment
Slothman Posted March 10, 2012 Author Share Posted March 10, 2012 lets see the line that you spawn the bot and set its team. Link to comment
Tunner Posted March 15, 2012 Share Posted March 15, 2012 (edited) function Spawnsoldier () local x,y,z = 16.8071,1500.2646,12.75 local rot=0 local skin=287 local interior=0 local dimension= 0 local team=Team local weapon=29 local mode=guard local modesubject= getElementPosition(source) call (getResourceFromName("slothbot"), "spawnBot", 16.8071,1500.2646,12.75, rot, skin, interior, dimension, team, weapon, mode, modesubject) the teams are set in different resource but i made sure to run the team resource before the bot. Bad thing is, that I cant set the teams in the bot resource as I need the teams to work regardless the bot resource. Edited March 15, 2012 by Guest Link to comment
Castillo Posted March 15, 2012 Share Posted March 15, 2012 You defined a variable in another resource ( not a script in the same resource as Spawnsoldier function ) and you expect it to work? Link to comment
Castillo Posted March 15, 2012 Share Posted March 15, 2012 That'll not work, variables aren't shared by resources. You can use getTeamFromName. Link to comment
Tunner Posted March 15, 2012 Share Posted March 15, 2012 It looks like just another way of expressing a team name to me, but ill give it a shot. EDIT: Yep I was right, it still doesnt work. Thanks for the try though. Just to make sure everythings right, heres the code: function Spawnsoldier () local x,y,z = 16.8071,1500.2646,12.75 local rot=0 local skin=287 local interior=0 local dimension= 0 local team= getTeamFromName ( "Team" ) local weapon=29 local mode=guard local modesubject= getElementPosition(source) call (getResourceFromName("slothbot"), "spawnBot", 16.8071,1500.2646,12.75, rot, skin, interior, dimension, team, weapon, mode, modesubject) Link to comment
Tunner Posted March 16, 2012 Share Posted March 16, 2012 Now i have made the teams in the same resource as my bot script, but it still doesnt work. It worked perfectly before so i dont know whats wrong with it. Maybe it has something to do with the eror slothbot/sbclient 114 attempt to compare boolean with a number. Can somebody tell me whats wrong in the sbclient script? Im convinced this is the cause of the faulty team recognition. Link to comment
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