• 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] Exactly WHAT is custom script?

Status
Not open for further replies.
Level 3
Joined
Nov 5, 2006
Messages
32
I know that custom script is an action, but if you know how, can you post a few small commands with custom script and what you can do with it.

Also, is it sort of like inserting a small portion of JASS into something?
 
Level 3
Joined
Jun 8, 2006
Messages
37
It's a piece of JASS code put into a GUI action.
It allows you to do various things that aren't a specific action in the GUI.
most people simply use it to remove the most common memory leaks, like point leaks etc.

A basic Custom Scipt (for removing a certain point) would be:

Code:
Custom script: call RemoveLocation (udg_<point_var_name>)

It'd remove a point properly from a set variable, hence removing the leak. It's not to hard to understand once you've gotten a hang of the lines. It's basically memorizing a few lines.
 
Last edited:
Level 13
Joined
Jun 22, 2004
Messages
783
I have worked with JASS and ALMOST, as I said before, anything that can be done in JASS can be done in GUI with the correct understanding of the workings of the triggers. No offense intended in the last post or this one, by the way.


False, you shouldn't forget that GUI is built on jass, Jass features way more options that GUI does, and therefor not everything that you can do with jass is doable in GUI, for instance, try to reverse a unit animation and let it play backwards, thats undoable wtih GUI, only jass can do that.

Jass is a scripting language in comparison to GUI, which actually is just an interface, lines set up by blizzard to make the trigger editor more user friendly, but surely they did not include every script line that is available in jass.

To come back to the point, with a custom script, you can take 1 line of jass, fill in a command, and put in in a GUI trigger, this way you do not have to revert the whole trigger to jass.
 
Level 9
Joined
Oct 2, 2005
Messages
385
Well this is where GUI wins. the fact its just simplified version of Jass can be a good thing. Why bother writing 8 lines of code to make a unit move from one part the map to the next when you can just do it with 3 cammands in GUI? But I do agree most stuff can be done in GUI might require a bit more triggering but it still can be done. The only thing I really found Jass good for is spells otherwise I'll stick with GUI
 
Level 13
Joined
Jun 22, 2004
Messages
783
That example is a really an strange example to make, cause it doesn't take 8 lines in jass.

I myself mainly use GUI as well, but it's just a simple fact that jass is better and more effecient.
You can keep up the debate that "You" think GUI is better, but it just isn't and thats proveable in many ways, I would even call it inlogical to say that jass is not better, cause GUI is bassed on jass.
 
Level 8
Joined
Sep 13, 2006
Messages
431
you shouldn't forget that GUI is built on jass, Jass features way more options that GUI does, and therefor not everything that you can do with jass is doable in GUI, for instance, try to reverse a unit animation and let it play backwards, thats undoable wtih GUI, only jass can do that.

I understand that completely, and I thank you for clearing that up, but I was arguing the pont that paskovitch made in implying that GUI is not based off of JASS. I recognize that there are things that can only be done in JASS, partially due to bugs and partially due to the nature of the scripts, but to say that the two forms of triggers are unrelated is just plain wrong.
 
Level 8
Joined
Sep 13, 2006
Messages
431
That example is a really an strange example to make, cause it doesn't take 8 lines in jass.

...jass is better and more effecient...

...GUI is bassed on jass.

Amen. JASS is more useful than GUI, but for someone who is content without backwards animations and things like that, GUI makes a quick and effective alternative.

I personally hate to bother with JASS, so I typically just try ot find a way in GUI that, though it may not be as efficient, still works.
 
Amen. JASS is more useful than GUI, but for someone who is content without backwards animations and things like that, GUI makes a quick and effective alternative.

I personally hate to bother with JASS, so I typically just try ot find a way in GUI that, though it may not be as efficient, still works.

o, yeah? i want to see your mui spell in GUI! It must use at least one slide! YOu will see then how much is jass better then gui. Did you even knew that you can create trigger using jass (while ingame?)
 
Level 8
Joined
Sep 13, 2006
Messages
431
o, yeah? i want to see your mui spell in GUI! It must use at least one slide! YOu will see then how much is jass better then gui. Did you even knew that you can create trigger using jass (while ingame?)

I most humbly accept the challenge. Give me a day or two, as I am in the middle of finals at the moment. But I'll work on it. It may not be the most efficient spell ever, but it shouldn't leak or lag... anyway, to be continued...

P.S. Nope, I didn't know that, but thanks for sharin' :)

EDIT: Do you want me to use the cleaner JASS remove location or the GUI alternative?

EDIT: Well, I have a prelim done. It is, for all intents and purposes, MUI, but I need to test a bit to ensure that it functions correctly.
 
Last edited:
Level 9
Joined
Oct 2, 2005
Messages
385
Yea exactly what I meant why bother killing a snake with a shotgun and waist a bullet then kill it with a free stone? Its just a faster alternative and it might be efficient in control over your scripts but speed? leave that to the GUIers lol. But yea we should stop arguing since this isn't exactly what this thread was for lol.
 
heres what scripts are avalabile to you (in custom script section in gui, BUT so you dont use anyof other JASS functios)
so you are ONLY restricted to theseL

call RemoveLocation
call DestroyEffect
set somevariabletypes = null
and all functions that use bj_ in begining are avalabile to you (even if they are in jass)

that's what you may use, and belive me, you won't be able to make this MUI unless you use jass, becouse you are restricted to functions i've written above, and you dont have CreateTrigger(), so you can create triger with times each time you want, and yes YOU CANT USE WEU!!! it has many jass and imported custom functions that might even allow to create spell such as one i told you to make, so keep WEU away this time :p and your spell mustn't have any leaks, use leak checker if you want, i wont disallow that :p
 
Level 8
Joined
Sep 13, 2006
Messages
431
i mean, to make unit slide, you will have to choose some that would fit, you wouldn't use, for example "Town Hall" model for that, well, forget the grapphic, leave it functional

???? Explain what you meant with teh town hall model....

Lemme make sure i understand everything:
1. Multi-instance
2. Functional (no leaks,etc.)
3. Slide (like pushback, pull, etc.)
4. GUI

Correct?
 
Level 8
Joined
Sep 13, 2006
Messages
431
I think I am done with the spell. MUI tested (even online) with five simultaneous casts and it worked. Anyway, time for the most noobish question ever: how do I post the map? I only started posting on here like a week and a half ago and I have no idea.
 
Level 8
Joined
Sep 13, 2006
Messages
431
Well, i dunno if this will work or not, but here it is. MUI, slide, entirely GUI. Ummm, anyway, be nice concerning the triggers. They are not the cleanest, but they work. No leaks either, though I didn't put it through the checker.

Constuctive criticism appreciated, by the way...
 

Attachments

  • push.w3x
    26.6 KB · Views: 44
Last edited:
Status
Not open for further replies.
Top