Bots and Simulations > F1 bots
Cheddarmold(F1)(Spork22)9-22-2015
spork22:
Ok. I'm just wondering why nobody has found a way to set off a chain reaction in the bots that gives all of them target coordinates, as in:
--- Code: ---cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 *.out1 store
*.in2 *.out2 store
stop
--- End code ---
Heh, that gives me another question. Where in a code do you put asterisks? Do they even matter much in how the program reads it?
spike43884:
--- Quote from: spork22 on July 24, 2015, 09:53:21 AM ---Ok. I'm just wondering why nobody has found a way to set off a chain reaction in the bots that gives all of them target coordinates, as in:
--- Code: ---cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 *.out1 store
*.in2 *.out2 store
stop
--- End code ---
Heh, that gives me another question. Where in a code do you put asterisks? Do they even matter much in how the program reads it?
--- End quote ---
They actually do matter....that code I don't think would work...I'll explain what it does
Lets say we have this bit of code at the start of the bot:
--- Code: ---def variableA 1
--- End code ---
Lets say variable 1 = 10
If I did
*.variableA 10 =
it would return true
but if I did
.variableA 10 =
it would return false.
VariableA's memory location (think of it like a house number) is 1. I can look to see if it is 1, by doing .variableA -- This is useful for memory shots, as you can do .up .shootval store
as if I want to see what is INSIDE variableA then I have to put a * -- This is useful for conditions, like eye distance, because when I look for the distance a bot is away from my eye, I don't actually want to know the address of my eye.
So in your peice of code it actually needs to be
--- Code: ---cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 .out1 store
*.in2 .out2 store
stop
--- End code ---
whenever you do store you don't put a * except in....special circumstances. If I did
*.eye5 *.VariableA store it'd actually store eye5's value in memory location 10, instead of variableA. Now in conspec fooling or such, you may put a * before whatever your storing it to, possibly in a 'special' virus as well...
spork22:
OHHH. Ok :P
Navigation
[0] Message Index
[*] Previous page
Go to full version