XԔ0cM0lX ( @ (//(  0/80@0?/8 0( ?G@POWOXOP?H0@/7@O_``h_hPX 0(P_oppxow_g@O/8'' 7p`o?G/7 0??H/8`/o?GOX@H0?/pOW?H/8 7OP?G/7( P0@PX@O0@ 0O @H/@' 00@@P0?'_OP@H( 7/7' ^^^^^^^^^^^^^^^^^^^^^^^^^^TeeBBBBeTT^^^^^^^eBDJ33333JJDBeZ^^^^TD33==#####==3JDBT^^^^eJ=###=3DeZ^^TB3# #=3JBZ^^T3#  #=JBT^^J# Sll #=JBZ^T# %,68??86,/@A*< ##45('.6787-9%:;*<=#$+&,--.,/01)2 3 $%&&'%($!)* ##  !"#     ??dٱ ;@ sprite_red   Yxs5a3 b(fdH@Q@(Ehthj8խ4V|42l [A(`@w? nj>F(yG sprite_blue   Nxs5a3 b(fdH@Q@(Ehphj8խ4V !FL %>F(Z object_red -action_set_alarm100000000-action_set_alarm10 +random(50)0000000u action_snap1616000000action_if_collision00100000e action_move 0000100000000000c movechance1000000action_if_object 0-16000000c movechance-0.25000000action_if_object 016000000c movechance-0.25000000action_if_object 00-1600000c movechance-0.25000000action_if_object 001600000c movechance-0.25000000action_if_object 1-16000000c movechance0.25000000action_if_object 116000000c movechance0.25000000action_if_object 10-1600000c movechance0.25000000action_if_object 101600000c movechance0.25000000daction_if_variable movechance0.75200000e action_move 1111011112000000p action_wrap20000000 object_blue -action_set_alarm100000000-action_set_alarm10 +random(50)0000000u action_snap1616000000action_if_collision00100000e action_move 0000100000000000c movechance1000000action_if_object 1-16000000c movechance-0.25000000action_if_object 116000000c movechance-0.25000000action_if_object 10-1600000c movechance-0.25000000action_if_object 101600000c movechance-0.25000000action_if_object 0-16000000c movechance0.25000000action_if_object 016000000c movechance0.25000000action_if_object 00-1600000c movechance0.25000000action_if_object 001600000c movechance0.25000000daction_if_variable movechance0.75200000e action_move 1111011112000000p action_wrap20000000object_controller [show_info() for (i=0; i0.5) { if(random(10)>5) instance_create(i,j,object_red) else instance_create(i,j,object_blue) } } }0000000room0 Seggregation        XGame InformationXk {\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 Courier New;}{\f2\fnil Courier New;}{\f3\fnil MS Sans Serif;}{\f4\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green0\blue128;\red0\green0\blue255;\red128\green0\blue128;} \viewkind4\uc1\pard\cf1\fs24 Demonstration of clustering by 2 populations \par Tony Forster 29/10/07 \par May be copied with acknowledgement \par \par The controller fills the room with random red and blue balls and some blank space \par \cf2\f1\fs20 \cf1 \par \b\f2 for\b0 (i=0; i<\cf3 room_width\cf1 ; i+=16)\cf2 \par \cf1 \b\{\cf2\b0 \par \cf1 \b for\b0 (j=0; j<\cf3 room_height\cf1 ; j+=16)\cf2 \par \cf1 \b\{\cf2\b0 \par \cf1 \b if\b0 (\cf2 random\cf1 (10)>\f1 0.5\f2 )\cf2 \par \cf1 \b\{\cf2\b0 \par \cf1 \b if\b0 (\cf2 random\cf1 (10)>5) \cf2 instance_create\cf1 (i,j,\cf4 object_red\cf1 )\cf2 \par \cf1 \b else\cf2\b0 \par \cf1 \cf2 instance_create\cf1 (i,j,\cf4 object_blue\cf1 )\cf2 \par \cf1 \b\}\cf2\b0 \par \cf1 \b\}\cf2\b0 \par \cf1 \b\}\cf0\b0 \par \cf1\f0\fs24 For red and blue objects, they will stay put if there are their colour nearby but not the other colour \par \par \cf0\b\f3\fs16 Alarm Event for alarm 0: \par \b0 set Alarm 0 to 10 +random(50) \par snap position to a grid with cells of 16 by 16 pixels \par if relative position (0,0) gives not a collision with All objects \par start moving in directions 000010000 with speed set to 0 \par set variable movechance to 1 \par if at relative position (-16,0) there is object object_red \par set variable movechance relative to -0.25 \par if at relative position (16,0) there is object object_red \par set variable movechance relative to -0.25 \par if at relative position (0,-16) there is object object_red \par set variable movechance relative to -0.25 \par if at relative position (0,16) there is object object_red \par set variable movechance relative to -0.25 \par if at relative position (-16,0) there is object object_blue \par set variable movechance relative to 0.25 \par if at relative position (16,0) there is object object_blue \par set variable movechance relative to 0.25 \par if at relative position (0,-16) there is object object_blue \par set variable movechance relative to 0.25 \par if at relative position (0,16) there is object object_blue \par set variable movechance relative to 0.25 \par if movechance is larger than 0.75 \par start moving in directions 111101111 with speed set to 2 \par \par \cf1\f0\fs24 \par Things to try: \par change the amount of blank space by editing the controller \par change their requirements of number of like and unlike objects nearby \par \par Press escape to start \par \par \par \par \par \f4 \par } Sprites sprite_red sprite_blueSounds BackgroundsPathsScripts Fonts Time LinesObjects object_red object_blueobject_controllerRoomsroom0 Game Information Global Game Settings