Im trying to use the following formula in my script:
2^(-1.55-1.5x)
Where x is: <script[item_force_stun].flag[variables.base_strength]>
My attempt:
- adjust <[target]> speed:<[2].power[<script[item_force_blinding].flag[variables.base_strength]>.mul[-1.5].sub[1.55]]>
I know the [2] is wrong and the .mul[a].sub[b] as well though I have no idea how to do this correctly. Is there a doc that shows how to do this? Couldnt find it
#(JustinS) "Complicated" maths in denizen
50 messages · Page 1 of 1 (latest)
(JustinS) "Complicated" maths in denizen
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
I mean this just looks wrong
<[2].power[<script[item_force_blinding].flag[variables.base_strength]>.mul[-1.5].sub[1.55]]>
You don't have to one-line this, you can do some calcs separately and then put it all in one tag, it helps with readibility
How do I do the 2 to the power x though
I dont get that
How do I write an integer
Tag parse results for <element[2]>: https://paste.denizenscript.com/View/122998
2
I tried <element[2] but that gave an error:
https://paste.denizenscript.com/View/122999
Tag parse results for <element[2].sub[1]>: https://paste.denizenscript.com/View/123000
1
you have 1.mul...
so again
element 1
oh no
<script[item_force_blinding].flag[variables.base_strength]>.mul[x] doesnt make sense
you also have an uneven number of brackets here
multiply the base_strength with x
the base_strength flag is a decimal
Tag parse results for <element[2].power[<element[-1.55].mul[0.75].sub[-1.55]>]>: https://paste.denizenscript.com/View/123001
1.308124631434331
im talking about syntax
oh the mul[x] should be inside the <>
Yes, you never add a subtag to a bracket
yeaa
So... <element[2].power[<script[item_force_blinding].flag[variables.base_strength].mul[-1.5].sub[1.55]>]>
ooooooh that works
in the opposite way that it should
its giving the player a speed boost but it supposed to slow them down lol
Oh I got it wrong
the standard is 0.1 not 0.5
Ill just divide everything by 5
<[2].power[-1.55].sub[<[1.5].mul[<[x]>]>]>?
(def-fiyed numbers for slightly more readability)
thats what its supposed to be
oh wait, not this
that's gonna math poorly
what you wrote is
ye
Resolved
Thread closed as resolved.
<[2].power[<element[<[-1.55].sub[<[1.5].mul[<[x]>]>]>]>]> should work if you needed to one-line it?
oh
Thread Reopened
Thread was manually reopened by @opaque steppe.
cut you off