Custom Script Question(s)

Zanderist

New Member
Reaction score
5
So I've been able to recreate Bogrim's triggers with no problems what's so ever.

I want to know what the code is translated to us humans.

What do things like Call and Get mean?

What are the other commands?

For example.

local unit u = GetSpellTargetUnit( )

Local unit, I'm guessing means the immediate unit getting effected.

u of course is the variable.

As for GetSpellTargetUnit.

I see that broken up into a string of commands.

Get - I don't understand this, does it mean "retrieve this data"

And then so forth

Spell - A spell is being used on

Target - what the triggering unit's action is being directed towards.

Unit- this is further discrimination for the script because I can see the word unit being replaced with structure or doodad.


Another question I have which might be a little easier to answer is, how do I create a ring around something.

For example the trigger in Elemental TD where you select a unit and type in "-range xxxx" a ring is created around the unit that has the diameter of the x values.

How do I create a ring trigger?
 

mylemonblue

You can change this now in User CP.
Reaction score
7
get basically means what you just said. It retrieves data for what you request.

Call is kinda like "summoning" a function/whatever. IMO.

To get circles and rings, you're going to need some basic math. Daelin had a (GUI) way of doing it, but it translates basically the same in JASS. Math wise anyway.

http://www.thehelper.net/forums/showthread.php?t=54065
His system of using JASS to make shapes (Noids, circles, spirals, etc)

http://www.thehelper.net/forums/showthread.php?t=41263
Static shapes in GUI. Explains the functions and the math invlolved too.

Oh EDIT: local is defining a variable specific to that trigger, sort of like 'Set variable' in GUI, except Set Variable is globally used and thus generally is not MUI, whilst locals are.

you can refer to global variables like this: udg_variable (Where udg means 'User Defined Global')

EDIT EDIT: Have you read Daelin's JASS tutorial yet? He explains the basic vocab of JASS so well. It even made sense to me! WHo woulda thought?
http://www.thehelper.net/forums/showthread.php?t=28292
 

l1lshadow

New Member
Reaction score
4
JASS:
constant native GetSpellTargetUnit          takes nothing returns unit

This command gets the target of the spell casted, only works if event has to do something with if spell is casted or channels, etc.

"local" declares a variable that is only accessible to the function.

The "unit" after "local" declares that the variable being declared by "local" will contain the type of "unit" which of course holds units.

"GetSpellTargetUnit( )" itself is a function, each word itself does not necessarily mean that it does a certain thing, if you were to do "GetMoveTargetUnit( )" it wouldn't work because it is not a function.

Sorry if I confused you I haven't played or coded Warcraft III in a long time =].
I suggest reading JASS tutorials posted by the guy above if you do not get the language.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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