+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Personal Protection Bot

  1. #11
    Wire Sofaking Jimlad's Avatar
    Join Date
    Dec 2008
    Posts
    941

    Default Re: Personal Protection Bot

    Just a quick tip, you don't have to jam all your persists (or inputs/outputs for that matter) onto one line. You can have multiple lines for each, for example:

    Code:
    @name Defence Bot
    @outputs Fire
    @persist EO:entity State Name:string Follow:entity Aim
    @persist Accuracy Firez Weapon Range Height Pos:vector
    @persist Grabed:entity Target:entity Online Grab Hold:vector
    @trigger none
    Makes things much nicer to edit and read.

  2. #12
    Wire Amateur ace1313's Avatar
    Join Date
    Feb 2007
    Posts
    81

    Default Re: Personal Protection Bot

    I'll create and upload a video tomorrow, till then I'll be taking suggestions for what I should add to the bot

  3. #13
    Wire Noob raven_lives's Avatar
    Join Date
    May 2009
    Posts
    2

    Default Re: Personal Protection Bot

    Hey this looks cool,
    i have it as a chip but cant get it to work or do anything apart from spam quote at the side of the screen..

    help ?

  4. #14
    Wire Sofaking Officer Tibbles's Avatar
    Join Date
    Aug 2008
    Location
    Barnus Philbert Boulevard
    Posts
    867

    Default Re: Personal Protection Bot

    Meh, not to troll but.

    THE GENERIC! IT BURNS!


    Seriously though, what's with everyone making floating E2 defense bots.

    They all offer the same thing. It's getting repetitive.

  5. #15
    Wire Noob snipa's Avatar
    Join Date
    Mar 2009
    Posts
    9

    Default Re: Personal Protection Bot

    yea, sounds really cool but i cant get mine to work. for some odd reason i type 'bot,help' and it just spams constantly things on the right side of my screen any advice on getting it to work?

  6. #16
    Wire Sofaking Captain Maim's Avatar
    Join Date
    Aug 2008
    Posts
    528

    Default Re: Personal Protection Bot

    The very short answer is use this:
    Code:
    Time=20
    interval(Time)
    K = curtime() - entity():owner():lastSaidWhen() < (Time*1)/1000
    (Time*1)/1000 = 1 chip interval I use 20 cause it almost always works. If your chip doesn't do anything that requires multiple executions to finish you can do an interval of 500 which can ease things with your CPU somewhat. But less than 15 probably wouldn't be good, as you want it to have accurate timing.
    If K doesn't trigger every time, multiply Time by 2, so K is true for 2 intervals.

    Or you can do this if you need to use Time*2 or greater and don't want repeated text prints:

    Code:
    @persist Once
    Time=20
    interval(Time)
    K = curtime() - entity():owner():lastSaidWhen() < (Time*2)/1000 
    if(K){Once=1}
    
    if(Whatever & Once){
    print("Do whatever here") 
    #put whatever here
    Once=0
    }
    That way Once is only true the first interval after K is true.
    You may be able to use this to work with runOnTick(1), but K won't work so some sort thing like saving the chat string in a different variable and comparing if it changed since last execution and then using that and Once in place of K.
    I don't use the once function as much, something like that should work for you.
    Last edited by Captain Maim; 06-03-2009 at 05:34 AM.

  7. #17
    Wirererer Lol-Nade's Avatar
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    385

    Default Re: Personal Protection Bot

    Screw that, I love all of the defense bots.
    Quote Originally Posted by l3ulletje View Post
    Quote Originally Posted by AzraelUK View Post
    We need more people like you, |3ulletje.
    I'll start working on it with my girlfriend.

  8. #18
    Wire Noob Pnemesis's Avatar
    Join Date
    Feb 2010
    Posts
    12

    Default Re: Personal Protection Bot

    oh my ... Coooool great work :3


    Sry For my bad English i am from Austria Accept it ^^

  9. #19
    Mario, hard at work Filipe's Avatar
    Join Date
    Jun 2007
    Location
    Portugal - Lisbon
    Posts
    401
    Blog Entries
    1

    Default Re: Personal Protection Bot

    One last thing, you can probably use a table to make your help function easier to work with.

    Help["item",string] = "Description!"
    Help["item2",string] = "Description!"

    if(Chat:left-???- == "help" & Help[HelpItem,string]!="" ) {
    hint(Help[HelpItem,string],7)
    }

    Something like this.
    beep boop

  10. #20
    Wirererer userman122's Avatar
    Join Date
    Mar 2010
    Location
    Norway
    Posts
    179

    Default Re: Personal Protection Bot

    Nice code, ill try it out later.

+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. dupe protection
    By malum in forum Expression 2 Discussion & Help
    Replies: 4
    Last Post: 03-09-2009, 04:54 PM
  2. Personal Floating Gun
    By Paper Clip in forum Finished contraptions
    Replies: 19
    Last Post: 02-05-2009, 02:57 PM
  3. Wired Personal Teleporter
    By SamPerson12345 in forum Wiremod Addons & Coding
    Replies: 0
    Last Post: 06-22-2008, 06:15 PM
  4. A Personal Challenge: Wiremod Tic Tac Toe.
    By Pariah in forum Ideas & Suggestions
    Replies: 15
    Last Post: 05-03-2007, 08:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots