• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Predefined local variables declaration

Status
Not open for further replies.
Level 11
Joined
Dec 31, 2007
Messages
780
Well, i post this here because i want to have some feedback. I've been messing with some of warcraft3 files and modifying normal gui functions to add some JASS things to make my life easier.

For example i added RemoveLocation() to GUI functions (nothing crazy so far coz JNGP already has that)

But later, i decided it was time for me to have easy ways to declare things like

JASS:
local unit Caster = GetTriggerUnit()

without the need to type it over and over again. So i decided to add this things into a GUI function like you will see here

1-2.jpg


this, Converted to custom text looks like

2-2.jpg


and this is how they appear to me

3-2.jpg


As you can see I have JNGP and it is MANDATORY to have it in order to be able to use variables (because JNGP allows you to use custom scripts anywhere)


If you guys think this might help somebody post some positive feedback and will make a tutorial for people to make this on their own.


Q: If you managed to get this far with GUI don't you think its time to move to JASS?

A: Perhaps it is. But i'm just too lazy xD

Q: If i add this to my map and use it. Will other people be able to open my map?

A: No, unless they have the same files imported as you do.

Q: How can i do to use those integers?

A:
  • Game - Display to (All players) the text: (String((i)))
Thats why i said it's mandatory to have JNGP or the variable "i" will not appear for you to use.

Q: How will this thing help me?

A: Local variables are awesome against global ones. Just search for a thread that speaks about that.

Q: Would you add more declarations to this?

A: Perhaps i will if somebody asks for them. I haven't added arrays for i.e.


I wait to hear something from you guys ;)
 
Level 11
Joined
Dec 31, 2007
Messages
780
anyway, should i make a tuto about this?

Still i haven't found a way to make it with editable fields like other things in gui. If i find a way to make it that way i'll surely make a tutorial :p

Why am I not learning jass?

Because i dont really think im gonna go much further with wc3 modding and sc2 is already out. Perhaps i'll stick to it or perhaps i'll quit making maps :/
 
Status
Not open for further replies.
Top