Would World Editor Unlimited mess with JASS

Terrabull

Veteran Member (Done that)
Reaction score
38
topic
I put a JASS script into my map (specifically blade.dk's maxunitstate) and I know it worked in the demo map, but when it's in my map, it appears to do absolutely nothing.
Is this possibly the problem, or is it probably something else?
 

kingbdogz

The Edge of Eternity is upon us.
Reaction score
123
this could be the problem


We have no idea what the script is therefore no one can figure it out. Did you edit the script to fit in your map? if so then i have no idea lol
 

Terrabull

Veteran Member (Done that)
Reaction score
38
Code:
constant function MaxStateModifierId takes unitstate u returns integer
    if u == UNIT_STATE_MAX_LIFE then
        return 'A000' // Rawcode of the Max Life Modifier ability.
    elseif u == UNIT_STATE_MAX_MANA then
        return 'A001' // Rawcode of the Max Mana Modifier ability.
    endif
    return 0
endfunction

function SetUnitMaxState takes unit whichUnit, unitstate whichUnitState, integer newVal returns boolean
    local integer c = newVal-R2I(GetUnitState(whichUnit, whichUnitState))
    local integer i = MaxStateModifierId(whichUnitState)
    if i == 0 then
        return false
    endif
    if c > 0 then
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 4)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 3)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 2)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    elseif c < 0 then
        set c = -c
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 7)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 6)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 5)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    endif
    return true
endfunction

That is the code I copied in, I changed nothing about it for my map, because it works like it is in the demo map.

Code:
Life
    Events
        Player - Player 1 (Red) types a chat message containing life as A substring
    Conditions
        (Substring((Entered chat string), 1, 4)) Equal to life
    Actions
        Set i = (Integer((Substring((Entered chat string), 5, (Length of (Entered chat string))))))
        Custom script: call SetUnitMaxState(udg_u, UNIT_STATE_MAX_LIFE, udg_i)

I use the last line in my map to call the function, I use nothing else from this map. In my map it looks something like this:

Code:
(setup-code which I don't have memorized and isn't related)
    Set sl = HP
    Set tu2 = (Last Created Unit)
    Custom script: call SetUnitMaxState(udg_tu2, UNIT_STATE_MAX_LIFE, udg_sl)

according to logic it SHOULD work
 

Matemeo

New Member
Reaction score
20
I believe, though I may be completely off-base, as I have no clue about this system. That you need abilities, Max Life Modifier ability, and Max Mana Modifier ability. As A000 (as defined in the system) is usually the first custom ability, and A001 is the second. (hence 000,001), Perhaps you need to read the documentation better, or I could be way off. :) gl

Yell if anything else comes up.

EDIT: And yes, you really should Not use WEU, Newgen world editor (easily findable via search) is a much better Editor overall, even if one does not indulge in the pleasures of being a jass Warrior.

:p
 

Terrabull

Veteran Member (Done that)
Reaction score
38
I'm trying to remove the WEU centric stuff that is forcing me to continue using WEU. I started this project over a year ago and got it tangled to much in WEU to get myself out of it and use another editor easily.
I already have to programs, but for the moment, I'm stuck w/ WEU.
And thank you for your suggestion about checking the custom values, I think that's the problem, because I've made several custom abilities, I hadn't thought of that.

You were right, I'm double checking the documentation and I see now that that's what I didn't do. Thank you!
+rep
 

Matemeo

New Member
Reaction score
20
I'm trying to remove the WEU centric stuff that is forcing me to continue using WEU. I started this project over a year ago and got it tangled to much in WEU to get myself out of it and use another editor easily.
I already have to programs, but for the moment, I'm stuck w/ WEU.
And thank you for your suggestion about checking the custom values, I think that's the problem, because I've made several custom abilities, I hadn't thought of that.

You were right, I'm double checking the documentation and I see now that that's what I didn't do. Thank you!
+rep

No problem, glad I could help. /bow
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top