• gmsv_bot - Bot Module
    77 replies, posted
Why are you using Bot.Entity, use entity or controller (entity in his case i guess) Edit: you also didn't normalize the angle [lua]viewangle = ( ply:GetPos() - entity:GetShootPos() ):Normalize():Angle();[/lua]
[QUOTE=Suicidal_B]Why are you using Bot.Entity, use entity or controller (entity in his case i guess) Edit: you also didn't normalize the angle [lua]viewangle = ( ply:GetPos() - entity:GetShootPos() ):Normalize():Angle();[/lua][/QUOTE] Thanks, but the error was actually I was missing some parens :) There is no need to normalize it either. And bot.Entity is a variable by me :)
Uh. I can't get this to work, I may be doing something wrong, I put this in the console: [code] bot.Create [MingeBag] Or bot.Create( [MingeBag] ) [/code] Halp pl0x? It says it's an unknown command.
What compiler you did use to make this? I want to learn C++ but i need good compiler & need to learn use it before learning C++.
[QUOTE=BulletofHell]Uh. I can't get this to work, I may be doing something wrong, I put this in the console: [code] bot.Create [MingeBag] Or bot.Create( [MingeBag] ) [/code] Halp pl0x? It says it's an unknown command.[/QUOTE] This is a lua module, you can't use it with the console.
[QUOTE=jA_cOp]Thanks, but the error was actually I was missing some parens :) There is no need to normalize it either. And bot.Entity is a variable by me :)[/QUOTE] Oh okay :)
[QUOTE=Catdaemon]This is a lua module, you can't use it with the console.[/QUOTE] Ok, I sound really fucking retarded, but what the hell is a lua module? And how to I activate it, or whatever?
Sorry, I'm a noob but where do I extract ? thanks !
Garrysmod/Garrysmod. Now can someone answer my question?
[QUOTE=BulletofHell]Ok, I sound really fucking retarded, but what the hell is a lua module? And how to I activate it, or whatever?[/QUOTE] You don't. This module adds lua commands for scripters to use. If you want to try the example script though - type [code]lua_openscript bot.lua[/code] in the console. If you want bot scripts, just wait for a release using this :)
[QUOTE=BulletofHell]Ok, I sound really fucking retarded, but what the hell is a lua module? And how to I activate it, or whatever?[/QUOTE] It's additional program what adds new words into the lua scripting language. This is just program what allows you program your own bots, It isin't the bot it self. [b]Edit:[/b] Can anyone tell if there is anything tutorials at gmod wikipedia what would help new users of C++ make their own modules for gmod?
Ahhhh, thanks guys.
When I put [code]lua_openscript bot.lua[/code] in console it says: [code] ] lua_openscript bot.lua Running script bot.lua... Failed to create Bot. ********************************************************** ERROR: Hook 'BotThink' Failed: bot.lua:13: attempt to call method 'IsValid' (a nil value) Removing Hook 'BotThink' ********************************************************** [/code] :( how I can spawn them ?
[QUOTE=ferdam]When I put [code]lua_openscript bot.lua[/code] in console it says: [code] ] lua_openscript bot.lua Running script bot.lua... Failed to create Bot. ********************************************************** ERROR: Hook 'BotThink' Failed: bot.lua:13: attempt to call method 'IsValid' (a nil value) Removing Hook 'BotThink' ********************************************************** [/code] :( how I can spawn them ?[/QUOTE] You either are trying it in singleplayer or you installed the addon incorrectly.
Ohh, yes, I was trying in singleplayer ! :D thanks !:D
Amazing! thank you!
well, all is OK now, but the bots need respawn..
No offense, but once again, this isn't meant to be seen as a bot, but as library/module to make bots with. Although the bot.lua works, it's not intended to be some kind of amazing '31337' css bot, it's just an example for the lua coders that want to use this module.
Ok, sorry for the questions.. (I'm a noob at Lua !:D)
It's okay, i'm glad i managed to explain you it :)
Thanks..:D
When I type lua_openscript bot.lua in console my gmod crash. Why?
Are you trying in singleplayer ??
[QUOTE=rallymuse]When I type lua_openscript bot.lua in console my gmod crash. Why?[/QUOTE] Is the VCD file inside the addons folder? And not inside its subfolders?
When I type lua_openscript bot.lua I crash also. Multiplayer VCF file is in the addons folder by default and I even tried making it a non addon.
Make sure your not trying in singleplayer like say'd before :)
[QUOTE=Suicidal_B]Make sure your not trying in singleplayer like say'd before :)[/QUOTE] [quote]When I type lua_openscript bot.lua I crash also. [highlight][B]Multiplayer [/B][/highlight]VCF file is in the addons folder by default and I even tried making it a non addon.[/quote] I know, I am and it is still crashing.
Excellent work Jinto. It's good to see we still have some of the classic coders here.
So in the future, do you guys think that we can have NPC cops for roleplay? That is gonna be fun. :D
I don't know, but I think so.
Sorry, you need to Log In to post a reply to this thread.