Search found 1164 matches

by Jector
Tue Nov 24, 2015 10:06 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Yeah, that's all over my head. My debug is to code without "h:" and watch the output to see what's gone wrong. The Head_A prop is visible on the statsheet. That should just leave damage or headDamage which should have been created with damage. And that other code likely had a flaw with the...
by Jector
Tue Nov 24, 2015 9:43 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

@@ @hitInHead [H: damage = arg(0)] [H: headHealth = Head] [H: threshhold = PHY] [H: headDamage = max(0,damage - Head_A)] [H, if(headDamage), code: {       [H: Head_A = max(0,Head_A -1)]    [H: Head = max(0,headHealth - headDamage)]    [H, if(headHealth >= threshhold && Head < threshhold): W...
by Jector
Tue Nov 24, 2015 6:20 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

have you tried removing it again with the new code. You get 'damage' input request when its undefined. with [H: Damage = 0] at the top that is taken care of. Tried that and I still get the 2 popups. Prompts for damage, enter it and hit OK, new prompt for damage again. that line will set ALL SELECTE...
by Jector
Sat Nov 21, 2015 1:58 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

<!-- this does nothing --> [Damage = (Damage + 0)] Without that, I get two sequential prompts for "Damage" that I have to fill in with the same damage number. I don't know why because I have near zero programming skill, but putting that at the beginning prompts a starting damage only once...
by Jector
Fri Nov 20, 2015 4:28 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Still nothing: [Damage = (Damage + 0)] [if(Damage > Head_A),CODE:{ [Damage = (Damage - Head_A)] [Head_A = (max (Head_A - 1, 0))] };{ [Damage = 0] }] [if(Damage >= Head): Head = 0 ; Head = Head - Damage] [if(HeadHalf == 0 && Head < PHY ), code: { [Wounds = Wounds + 2] [HeadHalf = 1] }] [if(He...
by Jector
Thu Nov 19, 2015 3:08 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Tried to get clever, but not clever enough. The damage works. "woundstate" properly sets itself to 0, 3, 6, or 9. But the rest doesn't set the state properly. [Damage = (Damage + 0)] [if(Damage > Head_A),CODE:{ [Damage = (Damage - Head_A)] [Head_A = (max (Head_A - 1, 0))] };{ [Damage = 0] ...
by Jector
Wed Nov 18, 2015 10:44 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Hm. Yep. Something interrupted that function. Got that sorted. Thanks again.
by Jector
Wed Nov 18, 2015 8:51 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Oh FFS. Now why is the previous damage code, that worked perfectly fine before, throwing a darn error now? This: [Damage = (Damage + 0)] [if(Damage > Torso_A),CODE:{ [Damage = (Damage - Torso_A)] [Torso_A = (max (Torso_A - 1, 0))] };{ [Damage = 0] }] [if(Damage >= Torso): Torso = 0 ; Torso = Torso -...
by Jector
Wed Nov 18, 2015 8:01 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Couldn't see that for beans. Thanks. This is the problem with coding when you don't know a darn thing about coding. >_<

Now on to trying to figure out the wound states and then discovering tables.
by Jector
Sat Nov 14, 2015 9:01 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

That looks like it works. Thanks, Alias. Do you see where the code breaks down for Head not looking at Torso being 0 and setting Head for 0? I'd really like to figure out what is breaking there so I can avoid it going forward. <!-- Should look at Torso, if it's 1 or higher rolls Head at D10-5, if it...
by Jector
Fri Nov 13, 2015 12:14 am
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

More oddness (to me): I've run this for armor generation and it's acting in a fashion I'm not expecting and I can't see my error. The code: [Torso_A = (D10 - 5)] [if(Torso_A >= 1): Torso_A = 0; Torso_A = (D4 + 3)] [h:Abdomen_A = Torso_A] [if(Torso_A >= 1): Head_A = (D10 - 5); Head_A = 0] [if(Head_A ...
by Jector
Thu Nov 12, 2015 4:40 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

I'm at a loss in how to do that. Getting it to use numbers between 1 and 9 and then where exactly to plug it in on the code. This won't even prompt for damage: [h:if(Wounds > 1), code: { [h:setState(strformat("Wounded_-% {(((floor (Wounds/2)) * 3)}"), 0)] [Wounds = Wounds + 0] [Damage = (D...
by Jector
Thu Nov 12, 2015 1:10 am
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

A brute force way to do it could be {(((floor (Wounds/2)) * 3)} but the big issue is that it would require me to create two superfluous states; a "Wounded_-0" which I could use a transparent PNG pixel for, and a "Wounded_-15" which would be a copy of my skull for the "Death&...
by Jector
Wed Nov 11, 2015 7:21 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Sorry. Was away at work and just got back to tinkering. You're right. I can't reproduce the original error in the code now that I've retried it with putting it back in fresh. Works like a charm. Thanks. I've gotten "Head" damage set up, which has half the health of other body areas, applie...
by Jector
Mon Nov 09, 2015 3:59 pm
Forum: Macros
Topic: Help with passing threshold triggers.
Replies: 37
Views: 3167

Re: Help with passing threshold triggers.

Hm. Both of our solutions are generating an extra wound if the area has been reduced to 0 and is hit again.

Go to advanced search