1
DNA - General / How can I get this to work?
« on: January 22, 2012, 03:38:50 PM »
This is my bot but how can I get it so there is a head and two body pieces and that the body pieces follow the head. I have tried this but the system to track the type of piece each is isnt working and I know the problem is right there I just can't see it. I want to create more advanced multi-bots if i can get this working.
Code: [Select]
def head 50
def body 51
cond
*.eye5 0 >
*.refeye *.myeye !=
*.head 0 !=
*.multi 1 =
start
*.refveldx .dx store
*.refvelup 30 add .up store
*.refxpos *.refypos angle .setaim store
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
'*.refeye *.myeye !=
*.head 0 !=
*.multi 1 =
start
-1 .shoot store
*.refvelup .up store
*.refxpos *.refypos angle .setaim store
stop
cond
*.multi 1 =
*.head 0 !=
*.eye5 0 =
*.refeye *.myeye = or
start
314 rnd .aimdx store
stop
cond
*.numties 0 =
*.numties 1 = or
*.robage 0 !=
*.head 0 =
*.tienum < 3
start
32 .repro store
.tienum inc
.head inc
stop
cond
*.robage 0 =
*.body 0 =
*.head 0 =
start
.body inc
.tie inc
stop
cond
*.nrg 30000 >
*.body 0 !=
*.head 0 != or
start
.body dec
.head inc
.tienum 0 =
.deltie inc
stop
cond
*.multi 1 =
*.head 1 = and
start
*.eye5 .tout1 store
50 .sharenrg store
3 .fixlen store
100 .stifftie store
628 .fixang store
*.aimright .tout2 store
*.head .tout3 store
*.tienum .tout4 store
stop
cond
*.head 0 =
*.body1 0 = or
start
*.tiepres .readtie store
*.tin1 .eye5 store
*.tin2 .aimright store
*.tin4 .tienum store
stop
cond
*.head 1 =
*.body 1 = or
*.numties 2 >
start
*.tiepres .deltie store
stop
end