source: experiments/frams/deathmatch/data/scripts/deathmatch-smellPopulation.neuro @ 309

Last change on this file since 309 was 231, checked in by sz, 11 years ago

Deathmatch experiment - http://www.framsticks.com/deathmatch

File size: 680 bytes
Line 
1class:
2name:Sp
3longname:Smell population
4description:Detects the population given by the "pop" parameter
5prefoutput:1
6preflocation:1
7vhints:32
8# 32=receptor class
9icon:~
1064,5,7,100,50,90,50,90,40,70,40,80,50,70,60,90,60,90,50,3,10,40,15,45,15,55,10,60,5,20,30,25,35,30,45,30,55,25,65,20,70,4,15,35,20,40,22,50,20,60,15,65,5,75,50,50,50,45,45,40,50,45,55,50,50~
11code:~
12function init()
13{}
14
15function go()
16{
17  if (Populations.size>Fields.pop)
18        Neuro.state = Populations[Fields.pop].senseCreaturesProperty(
19                Neuro.position_x, Neuro.position_y, Neuro.position_z,
20                "energy", Neuro.creature);
21  else
22        Neuro.state=0;
23}
24~
25
26prop:
27id:pop
28name:population
29type:d
Note: See TracBrowser for help on using the repository browser.