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

[JASS] Im new in Jass help please

Status
Not open for further replies.
Level 19
Joined
Aug 24, 2007
Messages
2,888
I want to learn how can we create our own function like
function killitem takes item targetitem returns nothing
call RemoveItem(targetitem)
endfunction

And need a shortcut to it like "call killitem(blabla)" that does the killitem function with blabla item

I will use it for damaging anyway

AND

Need a program for Jass like JassCraft but Jasscraft shows syntax errors even in correct triggers which I can use in game (recipe system of Diablo-dk works great in game but jasscraft gave about 90 errors)
 
Last edited:
Level 9
Joined
Aug 10, 2007
Messages
92
Well, you just made a function :p

If you want that function to work in all triggers, you move the function to the map header or put it inside a library if you use NewGen.

JASSCraft syntax should work fine unless you use NewGen commands...
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
hi purple I didnt know you know jass :D
AND
Arkan show it in a example please, Its the second thing I tried to make in jass, first was creating unit ordering it to move a point then destroy it
I posted this tread in same 10 minutes when I started learning jass :D

Best help you can give me would posting a map contains a basic custom function
like killing an unit

EDIT: Oh okay I puted it in map header and it worked is there anyother way but Map header for this I want to make another trigger that adds functions(OPTIONAL)
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
A trigger that adds functions?

JASS can't write itself, if that's what you want.

And there's no point in making custom functions that just wrap natives, such as KillUnit, as they're slower and redundant.

Functions are more useful for longer and/or more complicated scripts, and of course for holding your code to be executed by the actions and conditions of a trigger, from initialization, (called from the main function) etc.

And yeah, I know JASS, Need_O2. In fact, I lurk more here than any of the other forums, by far.
 
Status
Not open for further replies.
Top