HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do I add custom functions?

08-25-2002, 08:44 PM#1
Guest
I want to write some functions to use in convertred triggers, but don't know where to put them. If I just write them inside the trigger window the editor barks at me. I guess it expects a function starting with Trig_ or something. But if I want to add a function like this:

function NumberOfPlayers takes nothing returns integer

where do I put it? Of course I should be able to access my variables inside the function.

Can anyone help me?
08-26-2002, 06:05 PM#2
Guest
Oh, come on people. Haven't anyone tried to use custom functions? I find that hard to believe.

BTW, can someone move this thread to the map development forum? I think it belongs there.
08-26-2002, 06:57 PM#3
Guest
Ok, it seems I can put custom functions into triggers after all. The problem is that the error messages are not very descriptive, hard to figure out what's wrong with the script.

Now I need to learn a bit about the functions in blizzard.j and common.j files. There is a shitload of functions/variables, but no comments. How do people learn about that stuff?
08-27-2002, 02:34 AM#4
wacko
my question is for example when i change
bj_MELEE_STARTING_GOLD = 750 to something different i get some stuff about blizzard.j being corrupt. What do i have to do to make it not say that.
08-27-2002, 05:12 PM#5
weaaddar
did you notice that it said Constant? Meaning you can't change it!!