Author Topic: Energy Shooting Virus  (Read 4335 times)

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Energy Shooting Virus
« on: December 02, 2006, 07:59:49 PM »
Would this work for a virus that forces the victim to shoot energy?

Code: [Select]
cond
 *.robage 0 =
start
 7 989 store
stop

cond
 *.vitmer 0 =
start
 3 .mkvirus store
stop

cond
 7 *989 !=
start
 -2 .shoot store
stop

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Energy Shooting Virus
« Reply #1 on: December 03, 2006, 12:28:21 AM »
Yes, but you need a gene to fire the virus.

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Energy Shooting Virus
« Reply #2 on: December 03, 2006, 09:21:00 AM »
Sorry, but what would the gene be, I guess I never put it in to any of my bots and that would explain why they aren't firing their virus

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Energy Shooting Virus
« Reply #3 on: December 03, 2006, 09:34:26 AM »
Something such as

cond
  *.eye5 20 >
  *.vtimer 1 =
start
  40 .vshoot store
stop

would fire your virus when it sees something, the number stored in .vshoot determines how far the virus travels, the higher the number the greater distance but the more energy used you would also want to add some cospec recognition so you dont shoot at your own bots.

Offline kage

  • Bot Neophyte
  • *
  • Posts: 49
    • View Profile
Energy Shooting Virus
« Reply #4 on: December 03, 2006, 12:25:54 PM »
Quote from: Light
Something such as

cond
  *.eye5 20 >
  *.vtimer 1 =
start
  40 .vshoot store
stop

would fire your virus when it sees something, the number stored in .vshoot determines how far the virus travels, the higher the number the greater distance but the more energy used you would also want to add some cospec recognition so you dont shoot at your own bots.

Thanks, I will add it to my bot

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy Shooting Virus
« Reply #5 on: December 03, 2006, 12:48:28 PM »
FYI, I think you have a typo.

cond
7 *989 !=
start
-2 .shoot store
stop

Should be

cond
7 989 * !=
start
-2 .shoot store
stop
Many beers....

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
Energy Shooting Virus
« Reply #6 on: December 03, 2006, 12:52:28 PM »
I think both are correct, *989 and 989 * are the same aren't they?
« Last Edit: December 03, 2006, 12:59:04 PM by Light »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Energy Shooting Virus
« Reply #7 on: December 03, 2006, 01:16:04 PM »
Quote from: Light
I think both are correct, *989 and 989 * are the same aren't they?
Your right.  I hadn't noticed the other way in the code.  Guess I should try writing a few more bots...  


Nevermind....
Many beers....