DESPERATE! Please help with patch.

Mar 26, 2007 at 3:58am

DESPERATE! Please help with patch.

Skip to the *** if you don’t want to read what this patch does in context. After the *** will explain what I need done to the patch.

In my latest project, we built 2 robots who will help each other stay alive over a network. their life force starts out at 100% each, while events like interactions with the robots will increase its life, and events like stealing his toy and just plain passing of time will decrease its life.

in order to help each other stay alive, if one robot looses more life than the other, the other robot will give up some of its own life to pass over to the robot in need. this is done pretty much by averaging out their life numbers, and reassigning the averaged life to both robots.

This averaging happens at 40%, 30%, 20%, 10% and 5%.

When this averaging happens, some life is added to the robot with lesser life…. but on the next decrease in life, it’s as if the add never happened.

If “His Life” remains at 100 the entire time, by the time “My Life” hits 40%, the averaging would make His Life 70% as well as My Life to 70%. But after that 70%, it just jumps back down to 39 instead of 69!!

***

Try this: open the patch, and make sure that you click the big green ON bang in the Life Sharing section. Also make sure that you click the 100 beside the “Make life equal to 100″ on BOTH sides. Don’t start the 2 metros near the top.

Now start with the left one, My Life. Right above the slider and the word LIFE, take that number box that says 100, and scroll it down. At 40, it will jump back up to 70. Then as you scroll down more, it goes to 69, 68. THIS IS WHAT I WANT IT TO DO ALL THE TIME!!

But, clearly I can’t be scrolling the number box while the thing is running, so I figured I’d just add a metro that would decrease that number for me. But when the metro does it instead of me manually scrolling, after 40, it jumps up to 70, THEN BACK DOWN TO 39!!!! WHY??? It works when I do it manually, but not when the metro does it.

PLEASE, can you please give me any advice, or even try to fix the patch with your own additions that will make my patch behave with the metro as it does when you scroll it manually.

I will attach the patch as well as the TXT for it. If you played around with it and have any additions that make it work, please attach the new patch or TXT.

THANK YOU SO MUCH TO ANYONE WHO TRIES!!!!

#31020
Mar 26, 2007 at 3:59am

here is the patch TEXT. it’s also attached.

max v2;
#N vpatcher 15 55 1345 788;
#P origin 0 8;
#P window setfont “Sans Serif” 36.;
#P comment 622 487 81 9109540 OFF;
#P comment 538 486 62 9109540 ON;
#P button 616 464 92 3;
#P button 524 464 92 7;
#P objectname ON;
#P window setfont “Sans Serif” 9.;
#P message 652 511 28 9109513 0;
#P message 573 538 28 9109513 1;
#P toggle 779 392 15 0;
#P toggle 438 386 15 0;
#P newex 754 418 40 9109513 metro 1;
#P newex 438 412 40 9109513 metro 1;
#P message 746 623 23 9109513 dec;
#P number 759 572 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 768 548 27 9109513 -;
#P message 773 623 22 9109513 inc;
#P newex 755 593 40 9109513 uzi;
#P number 760 524 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 767 499 27 9109513 / 2;
#P number 759 476 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 766 449 27 9109513 +;
#P window setfont “Sans Serif” 20.;
#P message 1130 344 32 9109524 0;
#P message 1129 315 41 9109524 100;
#P button 909 652 15 0;
#P button 981 652 15 0;
#P button 963 652 15 0;
#P button 945 652 15 0;
#P button 927 652 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 900 622 101 9109513 select 40 30 20 10 5 0;
#P window setfont “Sans Serif” 36.;
#P comment 909 379 84 9109540 LIFE;
#P user incdec 902 330 15 15 0 0;
#P number 917 330 75 36 0 100 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user uslider 917 429 62 149 101 1 0 7;
#P user panel 894 316 111 359;
#X brgb 62 167 218;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 14.;
#P comment 1011 319 130 9109518 Make life equal to;
#P comment 1010 347 130 9109518 Make life equal to;
#P window setfont “Sans Serif” 9.;
#P message 464 622 23 9109513 dec;
#P number 438 566 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 438 544 27 9109513 -;
#P message 438 622 22 9109513 inc;
#P newex 438 590 40 9109513 uzi;
#P number 438 520 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 438 495 27 9109513 / 2;
#P number 438 472 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 438 445 27 9109513 +;
#P window setfont “Sans Serif” 36.;
#P comment 492 330 262 9109540 LIFE SHARING;
#P comment 861 30 164 9109540 HIS LIFE;
#P comment 226 29 142 9109540 MY LIFE;
#P window setfont “Sans Serif” 14.;
#P window linecount 4;
#P comment 1147 91 78 9109518 Some event that subtracts 1 life point;
#P comment 1066 91 78 9109518 Some event that subtracts 2 life points;
#P comment 989 91 78 9109518 Some event that subtracts 3 life points;
#P comment 907 91 72 9109518 Time decreases life point value;
#P comment 828 91 72 9109518 Some event that adds 1 life point;
#P comment 747 91 72 9109518 Some event that adds 2 life points;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 1177 271 23 9109513 dec;
#P button 1153 174 63 3;
#P user panel 1146 167 76 128;
#X brgb 145 5 5;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 1097 271 23 9109513 dec;
#P button 1073 246 15 0;
#P button 1073 174 63 3;
#P user panel 1066 167 76 128;
#X brgb 197 1 1;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 1016 271 23 9109513 dec;
#P button 1040 246 15 0;
#P button 992 246 15 0;
#P button 992 174 63 3;
#P user panel 985 167 76 128;
#X brgb 255 9 9;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 857 271 22 9109513 inc;
#P button 833 174 63 7;
#P user panel 826 167 76 128;
#X brgb 0 131 48;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 777 271 22 9109513 inc;
#P button 753 246 15 0;
#P button 753 174 63 7;
#P user panel 746 167 76 128;
#X brgb 3 197 1;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 696 271 22 9109513 inc;
#P button 720 246 15 0;
#P button 672 246 15 0;
#P button 672 174 63 7;
#P toggle 912 171 66 0;
#P newex 912 242 55 9109513 metro 2000;
#P message 912 271 24 9109513 dec;
#P user panel 665 167 76 128;
#X brgb 86 255 9;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 906 167 76 128;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 14.;
#P window linecount 4;
#P comment 667 91 72 9109518 Some event that adds 3 life points;
#P window setfont “Sans Serif” 20.;
#P window linecount 1;
#P message 192 344 32 9109524 0;
#P message 191 315 41 9109524 100;
#P button 253 653 15 0;
#P button 325 653 15 0;
#P button 307 653 15 0;
#P button 289 653 15 0;
#P button 271 653 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 248 621 101 9109513 select 40 30 20 10 5 0;
#P window setfont “Sans Serif” 36.;
#P comment 257 378 84 9109540 LIFE;
#P window setfont “Sans Serif” 14.;
#P window linecount 4;
#P comment 501 90 78 9109518 Some event that subtracts 1 life point;
#P comment 420 90 78 9109518 Some event that subtracts 2 life points;
#P comment 343 90 78 9109518 Some event that subtracts 3 life points;
#P comment 261 90 72 9109518 Time decreases life point value;
#P comment 182 90 72 9109518 Some event that adds 1 life point;
#P comment 101 90 72 9109518 Some event that adds 2 life points;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 531 270 23 9109513 dec;
#P button 507 173 63 3;
#P user panel 500 166 76 128;
#X brgb 145 5 5;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 451 270 23 9109513 dec;
#P button 427 245 15 0;
#P button 427 173 63 3;
#P user panel 420 166 76 128;
#X brgb 197 1 1;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 370 270 23 9109513 dec;
#P button 394 245 15 0;
#P button 346 245 15 0;
#P button 346 173 63 3;
#P user panel 339 166 76 128;
#X brgb 255 9 9;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 211 270 22 9109513 inc;
#P button 187 173 63 7;
#P user panel 180 166 76 128;
#X brgb 0 131 48;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 131 270 22 9109513 inc;
#P button 107 245 15 0;
#P button 107 173 63 7;
#P user panel 100 166 76 128;
#X brgb 3 197 1;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P message 50 270 22 9109513 inc;
#P button 74 245 15 0;
#P button 26 245 15 0;
#P button 26 173 63 7;
#P toggle 266 170 66 0;
#P newex 266 241 55 9109513 metro 2000;
#P message 266 270 24 9109513 dec;
#P user incdec 250 329 15 15 0 0;
#P window setfont “Sans Serif” 36.;
#P number 265 329 75 36 0 100 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user uslider 265 428 62 149 101 1 0 7;
#P user panel 19 166 76 128;
#X brgb 86 255 9;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 260 166 76 128;
#X brgb 206 206 206;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont “Sans Serif” 14.;
#P window linecount 4;
#P comment 21 90 72 9109518 Some event that adds 3 life points;
#P user panel 242 315 111 362;
#X brgb 62 167 218;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window linecount 1;
#P comment 71 319 130 9109518 Make life equal to;
#P comment 71 347 130 9109518 Make life equal to;
#P user panel 394 317 450 351;
#X brgb 255 253 107;
#X frgb 0 0 0;
#X border 1;
#X rounded 50;
#X shadow 10;
#X done;
#P user panel 626 26 617 691;
#X brgb 231 157 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 5 26 617 691;
#X brgb 255 190 107;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 15 0 16 0;
#P connect 17 0 18 0;
#P connect 16 0 18 0;
#P connect 15 0 18 0;
#P connect 15 0 17 0;
#P connect 20 0 21 0;
#P connect 21 0 22 0;
#P connect 20 0 22 0;
#P connect 24 0 25 0;
#P hidden connect 9 0 45 0;
#P hidden connect 10 0 11 0;
#P hidden connect 37 0 11 0;
#P hidden connect 34 0 11 0;
#P hidden connect 30 0 11 0;
#P hidden connect 12 0 11 0;
#P hidden connect 25 0 11 0;
#P hidden connect 22 0 11 0;
#P hidden connect 18 0 11 0;
#P hidden connect 96 0 11 0;
#P hidden connect 123 0 11 0;
#P fasten 45 0 50 0 253 653 258 653;
#P hidden connect 52 0 10 0;
#P hidden connect 51 0 10 0;
#P hidden connect 11 0 10 0;
#P hidden connect 10 0 9 0;
#P connect 14 0 13 0;
#P connect 13 0 12 0;
#P connect 45 1 46 0;
#P connect 45 2 47 0;
#P connect 45 3 48 0;
#P connect 45 4 49 0;
#P connect 27 0 28 0;
#P connect 28 0 30 0;
#P connect 29 0 30 0;
#P connect 27 0 30 0;
#P connect 27 0 29 0;
#P connect 32 0 33 0;
#P hidden connect 129 0 126 0;
#P hidden connect 128 0 126 0;
#P connect 126 0 124 0;
#P hidden connect 10 0 91 0;
#P connect 124 0 91 0;
#P connect 91 0 92 0;
#P connect 92 0 93 0;
#P connect 93 0 94 0;
#P connect 94 0 97 0;
#P connect 97 0 98 0;
#P hidden connect 50 0 95 0;
#P hidden connect 46 0 95 0;
#P hidden connect 47 0 95 0;
#P hidden connect 48 0 95 0;
#P hidden connect 49 0 95 0;
#P connect 95 0 96 0;
#P connect 33 0 34 0;
#P connect 32 0 34 0;
#P hidden connect 104 0 91 1;
#P hidden connect 10 0 97 1;
#P connect 95 0 99 0;
#P connect 98 0 95 1;
#P connect 36 0 37 0;
#P hidden connect 130 0 128 0;
#P hidden connect 131 0 129 0;
#P connect 59 0 60 0;
#P connect 60 0 62 0;
#P connect 61 0 62 0;
#P connect 59 0 62 0;
#P connect 59 0 61 0;
#P connect 119 0 123 0;
#P connect 64 0 65 0;
#P connect 127 0 125 0;
#P hidden connect 110 0 119 0;
#P hidden connect 109 0 119 0;
#P hidden connect 108 0 119 0;
#P hidden connect 112 0 119 0;
#P hidden connect 111 0 119 0;
#P connect 115 0 116 0;
#P connect 121 0 122 0;
#P connect 117 0 118 0;
#P connect 125 0 115 0;
#P hidden connect 10 0 115 0;
#P connect 116 0 117 0;
#P connect 118 0 121 0;
#P connect 119 0 120 0;
#P connect 65 0 66 0;
#P connect 64 0 66 0;
#P hidden connect 128 0 127 0;
#P hidden connect 129 0 127 0;
#P hidden connect 104 0 115 1;
#P hidden connect 104 0 121 1;
#P connect 122 0 119 1;
#P connect 68 0 69 0;
#P hidden connect 103 0 107 0;
#P hidden connect 104 0 105 0;
#P hidden connect 120 0 105 0;
#P hidden connect 56 0 105 0;
#P hidden connect 62 0 105 0;
#P hidden connect 66 0 105 0;
#P hidden connect 69 0 105 0;
#P hidden connect 74 0 105 0;
#P hidden connect 78 0 105 0;
#P hidden connect 81 0 105 0;
#P hidden connect 99 0 105 0;
#P fasten 107 0 112 0 905 654 914 654;
#P connect 58 0 57 0;
#P connect 57 0 56 0;
#P hidden connect 105 0 104 0;
#P hidden connect 113 0 104 0;
#P hidden connect 114 0 104 0;
#P hidden connect 104 0 103 0;
#P connect 107 1 108 0;
#P connect 107 2 109 0;
#P connect 107 3 110 0;
#P connect 107 4 111 0;
#P connect 71 0 72 0;
#P connect 73 0 74 0;
#P connect 72 0 74 0;
#P connect 71 0 74 0;
#P connect 71 0 73 0;
#P connect 76 0 77 0;
#P connect 77 0 78 0;
#P connect 76 0 78 0;
#P connect 80 0 81 0;
#P pop;

#100189
Mar 26, 2007 at 4:13am

*cringe*

how long have you been using max? that patch is hellish, I think you need more experience using the program.

#100190
Mar 26, 2007 at 4:19am

you are so helpful.

i’ve been using seriously it for maybe a week, thanks man.

#100191
Mar 26, 2007 at 4:21am

well, yeah, i mean, work through the tutorials. thats about as helpful as I can be, trust me.

#100192
Mar 26, 2007 at 4:31am

ok thats all fine and good. this assignment is due in a week – if you’re so experienced with max, and i’m clearly awful at it, can’t you at least see what i’m trying to do?

scrolling the box to decrement the number works. letting a metro decrement the number doesn’t work.

easy to fix for a pro, right?

#100193
Mar 26, 2007 at 4:43am

I know this isn’t immediately helpful to you, but I’m curious. Was this assignment intended to be done in Max? I’m not saying it can’t but done in max, surely it can. It just seems like an odd assignment to give in order to force you to learn Max/MSP in a week.

#100194
Mar 26, 2007 at 5:11am

don’t worry about it guys, i got it. i’m sorry i came.

#100195
Mar 26, 2007 at 5:13am

You have the output of the number box going back to the incdec.
Deleting that and also sending the initial “100″ to the incdec made it
work for me.

best,

Jeff

#100196
Mar 26, 2007 at 5:53am

Glad you found a solution. Don’t let this push you away from Max or the
forum/list.

Are you using actual robots?

#100197
Mar 26, 2007 at 7:55am

Quote: Jeff Kaiser wrote on Sun, 25 March 2007 23:13
—————————————————-
> You have the output of the number box going back to the incdec.
> Deleting that and also sending the initial “100″ to the incdec made it
> work for me.
>
> best,
>
> Jeff

yes that is it.

it would have been better not to use incdec IMO.
if you send -3 and make [+ ] with it, you also substract 3
from LIFE, no need to do “bang dec bang dec” to incdec.

unfortunatley there is no max manual for algebra yet, which is
why it is right to ask for help in the forum …

#100198
Mar 26, 2007 at 8:49am

How long have you been posting on forums? That post is helliish and
unhelpful, I think you need more experience over at AOL….

*wink*

On Mar 26, 2007, at 6:13 AM, jamez wrote:

>
> *cringe*
>
> how long have you been using max? that patch is hellish, I think
> you need more experience using the program.

v a d e //

http://www.vade.info
abstrakt.vade.info

#100199
Mar 26, 2007 at 3:02pm

yes we are using 2 real robots. these robots are to keep eachother alive for 5 hours, as well as encourage users to play with them. the robots will track you and follow you around the space, play with a ball, and “talk” (musically).

depending on user interaction the robot will react. if you play with it, it will laugh. if you steal his ball, it will cry. if you piss it off it will flip out. but eventually if no one interacts with it, it will die.

and.. if you thought THAT patch was hellish, i don’t want you guys to even IMAGINE the MAIN PATCH that this life sharing patch is a sub-patch for….. :S

#100200

You must be logged in to reply to this topic.