This little tutorial will tell you how to use BUTTONS in compound agents. At first we need a set of sprites: here I set them like this in the .c16 : * sprite 0 : the main part of the sprite * sprite 1 : the 'teach' button * sprite 2 : the 'save' button * sprite 3 : the 'quit' button * we install the agent in the game inst new: comp 2 24 11111 "tutogui" 4 0 9900 attr 38 * attributes ... floatable 32 + mouseable 2 + mouse activeable 4 bhvr 0 * and here the hardest part of the install script begins! * but don't worry, it is still quite simple * we create the button 'teach all creatures in game' pat: butt 1 "tutogui" 1 4 1 1 0 [] 3000 0 * I explain what all these odd numbers mean: * 1 - it is the number of the created part - the main part of
Identifier (URI) | Rank |
---|---|
dbkwik:resource/KJC2Qwj84f6CnL_KtyR8cA== | 5.88129e-14 |