local the global varible

X.Terror.X

New Member
Reaction score
10
hey sorry for me to ask it on this but irealy couldnt find it on the tutorial forum i guess im unexperianced with finding the thing i want mabye can give me some hints how ifind the easyest way what i want

but my question was whats the custom script of localisizing the global varible i thought it was something like this but it didnt worked out
im not very good with jass/ custom cripts

Custom script: Local integer udg_[my varbile name]

thanks for the help anyway
 

Rushhour

New Member
Reaction score
46
I'm not familiar with this MUI global locals, but in Jass "local" mustn't have a capital letter
so try "local integer udg_[my varbile name]
(your variable name ofc without [] )^^
 

X.Terror.X

New Member
Reaction score
10
thanks alot :rolleyes:

mabye u know something about this too

ive been looking in jass forums google and gui forums to see if anything like this is posted there but it keeps making errors and i can't find it

Code:
Custom script:   call RemoveInteger (udg_n)
 

X.Terror.X

New Member
Reaction score
10
ok this is strange when i post it apart in a trigger
Custom script: local integer (udg_n)
i can enable him

when i post it in diffrent trigger

Actions
Code:
Custom script:   local integer (udg_n)
    Set n = 1
    Unit - Order (Triggering unit) to Move To ((Position of (Triggering unit)) offset by 1000.00 towards (90.00 x (Real(n))) degrees
)

i cant enable it and cant be saved with them on this is strange :X
 

X.Terror.X

New Member
Reaction score
10
ok but how to local the integer
i think i want to use the integer longer for that trigger and i dont wanna use array since that will be alot of work
the local works in a empty trigger but when adding it in the trigger
(see excample) it says line 325 exspected a code estatement
 

Komaqtion

You can change this now in User CP.
Reaction score
469
And... Why use a global integer anyways ? :S
Why not just simply use a local one ?
 

ZugZugZealot

New Member
Reaction score
33
Adding "udg_" to the name of a variable doesn't make a variable a global. It's merely a format that Blizzard uses for variables made in the variable editor. Blizzard has game globals as well "gg_" the whole purpose is to avoid variable name conflictions.

Perhaps you mean declaring global variables outside of the variable editor? In which case you'll need a higher level Jass compiler such as Jasshelper for doing global blocks. Which can't be declared inside "actions" (functions).

JASS:
globals
   integer number
endglobals
 

X.Terror.X

New Member
Reaction score
10
u mean create a varible with custrom script?
i just learned this from kindof a tutorial thought that would be nice idea to add

and im using the same varibles in diffrent triggers to set the angle
so if varible is 1 90 decrees shoot
if varible 2 180
ect
so i dont know if i bug it

i just wanted the global to be local in the trigger
i hope u understand what i mean my english grammer isnt so good
 

Romek

Super Moderator
Reaction score
964
Shadowing local/global variables no longer works. It was 'fixed' in one of the patches.

I guess that means you can no longer do this:
Trigger:
  • Custom Script: local unit udg_Unit // ....
    • Unit - Kill (Unit)
 

ZugZugZealot

New Member
Reaction score
33
So you mean being able to select local variables in the GUI functions?

Trigger:
  • Actions
    • Custom script: local integer value
    • Unit - Create value Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
If this is what you mean, it can't be done.

This is the only way to use locals in GUI.
Trigger:
  • Actions
    • Custom script: local integer value
    • Custom script: call CreateNUnitsAtLoc( value, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
In which case, you may as well just use Jass, which I highly encourage people to use Jass. ^_^
 

Romek

Super Moderator
Reaction score
964
> [ljass] local integer value[/ljass]
[ljass]local integer udg_value[/ljass]

And yes, you're correct.

Simplified; this won't work:
JASS:
globals
   integer udg_Hello
endglobals

function Lol takes nothing returns nothing
   local integer udg_Hello
  // Do stuff
endfunction
 

X.Terror.X

New Member
Reaction score
10
jass is still to hard for me
thats a problem what i face now
how ideal with this
i made this local integer varible for each integer
but i got a trigger like this


Code:
Unit - Order (Triggering unit) to Move To ((Position of (Triggering unit)) offset by 1000.00 towards (90.00 x (Real(([COLOR="Red"]The Local Varible[/COLOR])))) degrees)

how do i input the local varible into my gui code? i tried get string handle ID i thought that whould be the one that fixed it but i have no idea now
so normaly u pick the global varible out the list but u cant since its a local varible
and i have no intrests in doing it al into jass since i want to change it if i want it
 

X.Terror.X

New Member
Reaction score
10
My problem is im not a jass user i have not enoug experiance for that

the first option is if i use locals with custom script i have no idea how to get those local putted in when i make a GUI trigger like explained 1 post up

the 2nd option is making a global local but that is been fixed i hear and doesnt work anymore on warcraft

the 3th is making a global but gives the chance the triggers will glitch with each other

so i want to know how i can fix the chance of glitching
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, you should use your 1st option there ;)
And, if you want (And don't want to learn how to use only JASS yet) you can download EGUI, which offers the opportunity to use JASS in any GUI action ;)
 

Romek

Super Moderator
Reaction score
964
> And, if you want (And don't want to learn how to use only JASS yet) you can download EGUI, which offers the opportunity to use JASS in any GUI action
UMSWE adds that too.
So, get newgen, enable UMSWE, and use the locals where you need them.
 

X.Terror.X

New Member
Reaction score
10
so where can i download a trusted EGUI newgen? :banghead:
instead looking all trough google i have no idea what im looking for
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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