• 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.

[Trigger] WE Crash

Status
Not open for further replies.
Level 8
Joined
Oct 26, 2008
Messages
387
Ok, so i used,


  • Custom Script - set udg_L2 = AddLightningEx("FORK", true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 70)
This function, now what i did was set a string to LEAS which is the aerial shackle lightning, like this

  • Set ML_Lighting = LEAS

Then i did this..


  • Custom Script - set udg_L2 = AddLightningEx("udg_ML_Lighting", true , GetLocationX(udg_Point), GetLocationY(udg_Point), GetLocationZ(udg_Point) + 70, GetLocationX(udg_Point2), GetLocationY(udg_Point2), GetLocationZ(udg_Point2) + 70)
and then i set the points to their perspective points, and when pressed OK the world collapsed :( Any ideas?

PS: What i want to do, is a spell that will need to use lighting effects, but i want which lighting effect is going to be used to be Customizable by the user, so i thought to use a string variable, and then call that variable inside the function... I am thinking this might have caused the problem.. is that it?
 
Level 16
Joined
May 1, 2008
Messages
1,605
In your second custom script you use "udg_ML_Lighting". Try to use it without the " ".
The problem should be this: The AddLightningEx function takes a string as lightning, which you added to the variable. But in the second script you
use the variable name as a string, which is wrong (At least that's the only wrong thing I can see so far)
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
In your second custom script you use "udg_ML_Lighting". Try to use it without the " ".
The problem should be this: The AddLightningEx function takes a string as lightning, which you added to the variable. But in the second script you
use the variable name as a string, which is wrong (At least that's the only wrong thing I can see so far)

This.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Yes I agree, the editor shouldn't crash nor did the game when I tested it before, but as the given scripts I only can see this mistake.

The thing I didn't understand was "and then i set the points to their perspective points".. but first he should fix the error I told him
and if the editor still crashes, then he might have another problem.
 
Level 8
Joined
Oct 26, 2008
Messages
387
zzZz sorry for my bad english regarding the coding science, i still dont know the terms perfectly..

I meant, that, when you edit the custom script then you CLICK (pressed xD) OK button, to save it into the trigger, thats when it crashed. About points i mean i set them as udg_ML_Point instead of what there is writen here.. when i CLICKED ok, thats when it crashed... yeah i dont know about JASS, so i remove the " " and have the variable as it is.. thanks! Maybe it was a random crash i dont know gonna test and let you know!
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I can't believe that was the reason xD Since you're already using a custom script, use locals for all those values (GetUnitX, GetUnitY, etc.) and use the locals instead :p It will shorten your script and, hopefully, avoid that sucky bug.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Well I had to type this for the crash:
  • Custom script: set udg_SuperExtremeLightning = AddLightningEx("LEAS",true,GetRectCenterX(gg_rct_MyFirstSuperUltraRect),GetRectCenterY(gg_rct_MyFirstSuperUltraRect),GetLocationZ(udg_SuperCloseTooImbaLocation),GetRectCenterX(gg_rct_MySecondUltraLocation),GetRectCenterY(gg_rct_MySecondSuperUltraLocation),GetLocationZ(udg_JustAnotherLocationFromHell))
 
Level 16
Joined
May 1, 2008
Messages
1,605
I remember you Boom 1-2 years ago, always talking in GUI :)

Sure because no one of you pros taught it (at this time) [BIG! thanks to watermelon1234 and ap0calypse they allowed me to flood them with jass pms] and because hive still accept GUI like this .. the spell section is flooded with it so no one will ever try to learn it, since GUI is that supported.

Also its a fault of all this wannabe jass pros, who upload jass submissions by coding them as much as complicated, by thinking they are the best just because they coded some bullshit you don't need in 90% of all cases anyway and when other people see it they just think "what the fuck" because these people don't make it easy for new coder!
 
Level 16
Joined
May 1, 2008
Messages
1,605
You never asked me! For your info I taught mag96, padawan of mine he was.

It's really bad that we hadn't this discuss for 2 weeks, because I had to delete my private massages because my box was overfilled, but I remember to see some pm's from you and too you =)
If or if not isn't the point actually, the point is hive should start too stop supporting GUI. Everyone know it's bad but still everyone wanna use it :'(
 
Level 8
Joined
Oct 26, 2008
Messages
387
No, we should handle this by using jass and/or vJass! Wondering when its f**king time, that people forget this useless piece of GUI shit ._.

  • Game - Display to (Dr. Boom) the text: U Mad Bro?
I will give you 1 simple question. Answer it for me, and i will sit my ass down and learn JASS.

WHY, should i dedicate, HOURS, to LEARN, a CODING, LANGUAGE, which SPECIFICALLY, targets WC3, which is for MANY YEARS NOW, a DEAD GAME?

I am not wrong, GUI is practically the same thing as JASS, only in ENGLISH which is MORE USER FRIENDLY, thus the purpose of GUI's existance.
So why would i (check above statement about jass) when i can do the exact same stuff with GUI.

And please, dont give the performance crap, i am done debating about the performance issues. So, answer my question, and i promise you i will start working on JASS and my first spell will be sent to you for reviews. Deal?
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
  • Game - Display to (Dr. Boom) the text: U Mad Bro?
I will give you 1 simple question. Answer it for me, and i will sit my ass down and learn JASS.

WHY, should i dedicate, HOURS, to LEARN, a CODING, LANGUAGE, which SPECIFICALLY, targets WC3, which is for MANY YEARS NOW, a DEAD GAME?

I am not wrong, GUI is practically the same thing as JASS, only in ENGLISH which is MORE USER FRIENDLY, thus the purpose of GUI's existance.
So why would i (check above statement about jass) when i can do the exact same stuff with GUI.

And please, dont give the performance crap, i am done debating about the performance issues. So, answer my question, and i promise you i will start working on JASS and my first spell will be sent to you for reviews. Deal?

Oh my god.. is learning for the sake of learning really THAT bad these days? Furthermore, you will not only be learning JASS and coding for WC3, but you will learn programming practices, standard applications and general programming. In a world like this, a little of this knowledge can never hurt..

Then, your statement saying "GUI is practically the same thing as JASS", is false.. Not only is it false, but also is it total bullcrap. JASS is a programming language. GUI is only stacking up events conditions and actions. It is nothing like a programming language for it makes absolutely no use of functions, parameters, return values etc, to sum up only a few of the BASIC things in programming..

And if you don't want to hear about the performance things, fine. But dont ever, ever.. EVER say anything like "GUI is the same as JASS" again, because those things can piss off people, like it just made my blood boil a little..
 
Level 16
Joined
May 1, 2008
Messages
1,605
Sorry hadn't any time so far to answer this, so let me get into it:

Maestros said:
WHY, should i dedicate, HOURS, to LEARN, a CODING, LANGUAGE, which SPECIFICALLY, targets WC3, which is for MANY YEARS NOW, a DEAD GAME?

1) Sure you have to learn it like you learned GUI when you started. Or you wanna tell use, that you opened the editor the first time, you already started too make good GUI structs?

2) Warcraft 3 is a dead game? Isn't it odd to post this sentence on hive, since the hive is based on Warcraft 3? You should ask yourself why people still coding spells and libraries, creating new models and icons and release their new creations by uploading maps all the time.

3) Jass specifically targets Warcraft 3. To answer this I wanna use another quote of yours:
GUI is practically the same as Jass
This means that GUI also targets Warcraft 3, when it should be Jass, but you still use it, so you just countered yourself.

GUI is practically the same as Jass
This quote isn't true at all. Warcraft 3 is based on jass (you got it!), but Blizzard recoded Jass into Crap-Jass to make it possible to release GUI. So GUI is based (not always but a lot) of a crappy script.
>> Yixx said the other points to this and I don't want repeat them <<

... only in English which is more user friendly ...
Well Jass is in English only too, so your argument leaks here and about the more user friendly: It depends! GUI users say, that GUI is more user friendly because they learned to use it. Jass user (and even vJass user (but we don't discuss this here)) say that Jass is more user friendly and has a better overview as GUI, because they learned Jass.


Also how should I argue why you should use Jass, if you already reject the "performance-argue"? That's the biggest point at all and I'm not talking about "it executes the actions faster as GUI", but also leaks are a part of performance and GUI has thousands of leaks. Also the overuse of variables (which you need for any good spell) just don't increase the map size, but they also reduce the performance.
Just pick 5 good GUI codes spells, copy them into one editor and see 1) how many triggers you have to use and 2) take a look at all the bunch of variables. Your spell (which is good I like it) use 4 triggers and a lot of variable. Code it with jass you just have to use one trigger and no variables (not udg_ based)

Another points for me is that you write Jass a lot faster then you click through GUI! I remember my GUI time, when ap0calypse told me that sentence I was like "yes sure and pigs fly" and when I compare it now, its fucking true.

In addition GUI have useless functions and not accurate calculations in cases of range and distance.

There are more options, but since my English isn't the best, you should get a look into JassHelper, there you see what some GUI triggers returns a bunch of this you don't wanna have and don't need to use.


======

Okay maybe I gone a bit to far when I said that hive shouldn't support GUI anymore (anyway they never will stop with supporting it), but such this problem of the thread creator "that the editor can crash when you enter a to long Custom script" just made me angry.
As based GUI user will always say for himself, that GUI is better for him and he stay good with it, like a based Jass user always say, that Jass is the best. Other people can tell you more about using GUI or using Jass, because I'm no super pro in this and it's 0:00 and I'm tired =)

Edit: Sorry for causing this thread to be 85% off topic. Also sorry for the words "to" and "too", I don't know when to use what =S

Greetings and Peace
Dr. Boom
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I have to say that GUI sucks, but without GUI, there would probably 5 maps around there. GUI was actually made for people who like and need the basic user interface to understand what does what, and how things works. It lacks performance, has leaks, it's way slowly and has several limiations BUT has something JASS doesn't have: IT'S USER FRIENDLY.

Here's the point where you see that smartest people isn't always the "friendliest" people.

I think we all should always suggest the best methods, even if they're out of the user reach at the time. It's like seeing a kid trying to take a tree down with scissors, while we know there's a Saw or an Axe right next to him. I don't help people who's stuborn and doesn't want to learn how to do things right and how to optimize things just because "it's jass and it's too hard and scares me and i'm not a pro on this... blah blah"
 
Level 16
Joined
May 1, 2008
Messages
1,605
Well, I don't think GUI is that much user friendly. The only disadvantage for Jass user friendly is, that you have to use a tool (JassHelper) for it.
When you make a GUI trigger, you see where you have too place the events, the conditions and the actions. In Jass, okay you don't see it, but is it so difficult too remember a revers order? Actions > Conditions > Event (Init)

For creating a new action, you have to think first of all what action you want create. In GUI you click "new action", select unit, select Unit - Kill Unit and select the unit you wanna kill. In Jass you just type "call KillUnit()". When you start too write it, JassHelper even shows what you have to write, or what other actions with "kill" exists! (Okay you have too know for your own that you have to write "call" in front of it, but is that the big deal?

Also I never said that you can handle jass in the same second you start with it, nor you did with GUI. Sure you have to learn it, but for this reason the hive exists dudes.. ask! ask! ask! when you have a problem.

Spartipilo said:
whats your naive language?
It's German
 
Level 8
Joined
Oct 26, 2008
Messages
387
Sorry hadn't any time so far to answer this, so let me get into it:



1) Sure you have to learn it like you learned GUI when you started. Or you wanna tell use, that you opened the editor the first time, you already started too make good GUI structs?


No friend, but its been over 5 years now so back then i was younger, wc3 wasnt as dead as it is now, and i had more more timy.


2) Warcraft 3 is a dead game? Isn't it odd to post this sentence on hive, since the hive is based on Warcraft 3? You should ask yourself why people still coding spells and libraries, creating new models and icons and release their new creations by uploading maps all the time.


I can post this sentence anywhere i want, because its my opinion.And since it referres to wc3, its only natural i post it on hive. I shouldnt ask my self what you want me to, cause i already know the answer. People still create/upload because they like it. But they too know its pointless in the end, because wc3 its never gonna be updated, its always gonna have the problems it has now, and year by year its getting emptier from active players.[/COLOR]



3) Jass specifically targets Warcraft 3. To answer this I wanna use another quote of yours:

This means that GUI also targets Warcraft 3, when it should be Jass, but you still use it, so you just countered yourself.


Yeah, but JASS is a coding language. I am interested in studying Computer Siences, if i wasnt, we wouldnt be having this discussion. But JASS is a language which i can only use here, as for the GUI, it came easier to me when i first stated wc3, than to learn a computer language, and thats why since then i havent learnt it.


This quote isn't true at all. Warcraft 3 is based on jass (you got it!), but Blizzard recoded Jass into Crap-Jass to make it possible to release GUI. So GUI is based (not always but a lot) of a crappy script.
>> Yixx said the other points to this and I don't want repeat them <<

Hmmm ok, if you say so, you must know better


Well Jass is in English only too, so your argument leaks here and about the more user friendly: It depends! GUI users say, that GUI is more user friendly because they learned to use it. Jass user (and even vJass user (but we don't discuss this here)) say that Jass is more user friendly and has a better overview as GUI, because they learned Jass.



Yeah but that is not objective. Your argument falls into human behaviour. Noone is ever going to say that what he does is crap. But objectivly, GUI is more user friendly,
A.) because it was made for this purpose
B.) because everything is specific, you only have to put the "functions" in order. Its easier to "select" Triggering Unit, than to learn "GetTriggUnit()" Or whatever the JASS func is.




Also how should I argue why you should use Jass, if you already reject the "performance-argue"? That's the biggest point at all and I'm not talking about "it executes the actions faster as GUI", but also leaks are a part of performance and GUI has thousands of leaks. Also the overuse of variables (which you need for any good spell) just don't increase the map size, but they also reduce the performance.
Just pick 5 good GUI codes spells, copy them into one editor and see 1) how many triggers you have to use and 2) take a look at all the bunch of variables. Your spell (which is good I like it) use 4 triggers and a lot of variable. Code it with jass you just have to use one trigger and no variables (not udg_ based)


Ok then.



Another points for me is that you write Jass a lot faster then you click through GUI! I remember my GUI time, when ap0calypse told me that sentence I was like "yes sure and pigs fly" and when I compare it now, its fucking true.


I Cannot disagree here! But in GUIs defense, you cant make syntax mistakes in GUI :)


In addition GUI have useless functions and not accurate calculations in cases of range and distance.

There are more options, but since my English isn't the best, you should get a look into JassHelper, there you see what some GUI triggers returns a bunch of this you don't wanna have and don't need to use.

If someone could give me a link about this JassHelper or something else like JassCaster ive been reading in some tutorials, i would be gratefull!



Edit: Sorry for causing this thread to be 85% off topic. Also sorry for the words "to" and "too", I don't know when to use what =S


Since the problem in the thread is solved and since i am the thread starter i am not offended by the course this thread has taken!


Greetings and Peace
Dr. Boom


Bakata Makata Sakata Se! Abe la bi de!
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
B.) because everything is specific, you only have to put the "functions" in order. Its easier to "select" Triggering Unit, than to learn "GetTriggUnit()" Or whatever the JASS func is.
WHAT? do you think opening a damn list and going all the way down to trigger unit is faster then writing GetTriggerUnit() ? Also, if you have at least a very minor knowledge of the GUI you will know that it has to be Triggering Unit, so its not even you learning GetTriggerUnit just not being dumb.
if you dont know every single native in Jass(thats maybe not even possible) just get JNGP with TESH, done
 
Level 8
Joined
Oct 26, 2008
Messages
387
JASS:
function MF_Cast_Conditions takes nothing returns boolean
   returns GetSpellAbilityId == 'A000'
endfunction

JASS:
function MF_Cast_Actions takes nothing returns nothing
     local unit tempUnit = GetSpellAbilityUnit
     local integer Key = GetUnitPointValue(tempUnit)
     local unit array Target[Key] = GetSpellAbilityUnit
     local unit array Caster[Key] = GetTriggerUnit
     local location array TargetLoc[Key] = GetUnitLoc(Target[Key])
     local location array CasterLoc[Key] = GetUnitLoc(Caster[Key])
     local real array Target_HpInit[Key] = GetUnitState(Target[Key], LIFE)
     
endfunction

Show me the error of my ways!
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I''ve never worked with UnitIndexer, but I think you don't need everything to be an array. These are locals. If you're working with Globals, then yes, make them array to assing each unit a value based in the Custom Value, but being locals, there's no need to create an array where you're just using one value, tough, so far, it depends in what you want to do with these values

JASS:
     local unit Target = GetSpellAbilityUnit()
     local unit Caster = GetTriggerUnit()
     local real targetx = GetUnitX(Target)
     local real targety = GetUnitY(Target)
     local real casterx = GetUnitX(Caster)
     local real castery = GetUnitY(Caster)
     local real Target_HpInit = GetUnitState(Target, LIFE)
// Do your thing
     set Target = null
     set Caster = null
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
The point value of a unit is fixed, in the object editor.
The custom value (GetUnitUserData(u) in JASS) of a unit can be set during the game. However, I would recommend not using it, and instead use a UnitIndexer, they occupy the Custom Value of a unit for you, but instead of just assigning one, they give each unit a /unique/ custom value, giving awesome possibilities, for instance to use integers instead of units as arguments and return values.

Another possibility is when you need every unit in the map to have certain properties, and you wish to use a struct to define these, you dont need to allocate one for every unit. Just use structType(GetUnitUserData(myUnit)).stamina = 0. for instance.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
wrong. We can use the command line to create .txt, and thus .j files, furthermore we can compile them using JassHelper via commandline, and I am almost sure that there MUST be a way to inject the new .j file in an MPQ file with the command line

However, I agree with you, it is a hell of alot easier, if you are actually referring to "GUI" as a Graphical User Interface, and not the abbreviation that is incorrectly used to denote the process of creating simple triggers in the world editor

(I personally despise the name "GUI" as a GUI is any graphical user interface, and therefor it WE is also a GUI, to only give a single example)
 
wrong. We can use the command line to create .txt, and thus .j files, furthermore we can compile them using JassHelper via commandline, and I am almost sure that there MUST be a way to inject the new .j file in an MPQ file with the command line
You cannot click 'New Trigger' and Edit>>>Convert to custom text by using standalone jass...everything first in GUI click and transform, then edit :)...
 
Status
Not open for further replies.
Top