HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Everything you always wanted to know about custom text but were afraid to ask

09-22-2002, 06:38 PM#46
weaaddar
True I forgot about that but in most cases an Array won't work in an event becuase it is acting as an Array of Pointers to things instead of An array of Things.
09-23-2002, 01:22 AM#47
Guest
I was making a blizzard.j parser. To generate HTML for the functions and such. I got half way done.

As of right now, I have an empty function reference. All the function group and functions are listed. But, there's no info.

Attached is the parser and the HTML it generated. You need add your on blizzard.j cause it's illegal for me to include mine. If you delete the HTML it will regenerate it when you run the parser.

FYI - THIS WILL GENERATE OVER 600 HTML files!

Most files are less than 1K.


Also, get the full effect, use !Function Reference.html first. This will direct you to the function group, then the function you wish to see.

I wrote the parser in C# so if you want to run it you need the .NET framework.

LOL! I bet someone has already done an HTML JASS2 Function Reference and it's posted in this forum.

File Size: 303 KB
09-26-2002, 07:53 PM#48
weaaddar
Nice not very useful but nice. What would be nice is if you made a program that works like a .net compiler and tells me what should go inside the () from parsing the files..
09-26-2002, 08:58 PM#49
Guest
I've been really busy lately. But, the parser was just so I didn't have to write a 600 pages of HTML. I would have used something dynamic. (I would have used PHP.) But, I needed 600 HTML pages to use the HTML help workshop. This will allow me to include dynamic help in my script editor.

http://www.wc3campaigns.com/forums/s...&threadid=3837
(^I am such a noob^)

I guess this could also be used if someone wanted to start a JASS2 webpage. You would still need to detail the functions though.

The dynamic help would allow you do do searches and suggestive instant help. But, It needs pure HTML to fuel it. So, i wrote the parser. PHP can generate the pages, but, it would have been far too slow.

Before any of that, I need to finish filling in the function info for the help files. If anyone would like to help me, let me know. As of right now, it could be at least 2 weeks before I code again. :(

Meantime, I just wanted to share what I had.
09-26-2002, 11:23 PM#50
Vaderman
I was wondering if someone could write an event that activates a trigger by a nonletter hotkey such F5 or the arrows buttons if it is possible. If not could tell me how to do the same system with dialogs?
09-28-2002, 01:30 PM#51
DKSlayer
Hey dude,
Here is a thred all about dialogs. I have not read it but I would think this is the place you want to go. Also you might find your button thing in there. I will look for it anyways and post here when I find it.
http://www.wc3campaigns.com/forums//...=&threadid=842
09-28-2002, 11:51 PM#52
Guest
I doubt it DK!

I asked the same question in the thread you pointed him to. Weedar doesn't know, I don't know, nobody know the function keys. :(
09-29-2002, 12:11 AM#53
weaaddar
The problem comes really down to the fact there is no way to tell. We just got lucky that the Codes happened to be like The ASCII key code. And we got even luckier that DrDoom was scaning some files and found 512 to be escape But everything else will have to be discovered painfully with guess and check.:/
09-29-2002, 02:09 AM#54
Vaderman
Not quite what i'm looking for. Dialogs would pause the game temporaly and could be fatal in a capture the flag type game.
09-29-2002, 12:05 PM#55
Guest
Quote:
And we got even luckier that DrDoom was scaning some files and found 512 to be escape

What files?

Can I write a parser for it? :)
09-29-2002, 06:22 PM#56
weaaddar
commandstrings or commonstrings and probably not sorry.
10-14-2002, 12:04 AM#57
Scio
This is a little off from what you guys are talking about, but
how do the EVENT_UNIT_HIDDEN and EVENT_UNIT_DETECTED events work,
I cant seem to get them to do anything ingame, I set up a trigger
to run on those events and displaythe text "Hidden" and
'Detected" but nothing happened. I've tried the Unit-Hide action as well as windwalk, and invisibility. I'd appriciate any help
10-14-2002, 03:13 PM#58
DKSlayer
I have used these before but I am at work without editor installed so can't check. I will reply when I get home.
10-15-2002, 09:21 PM#59
Guest
Question about using a variable array in an event using JASS...

Situation is this: Units will randomly move from point to point on a map. There are 121 regions defined on this map, laid out in a 11 by 11 grid. Using a little trick I picked up from Arkguil's TD, I'm using unit mana to tell the unit what region to go to. What I'd like is an extremely streamlined event that only fires when the unit enters the region that has the array index equal to the unit's mana.

I know this is doable with a condition check, but then I'd need 121 events to check on each region...

Code:
function InitTrig_Enter_Region takes nothing returns nothing
    set gg_trg_Enter_Region = CreateTrigger(  )
    call TriggerRegisterEnterRectSimple( gg_trg_Enter_Region, udg_RegionArray[R2I(GetUnitStateSwap(UNIT_STATE_MANA, GetEnteringUnit()))] )
    call TriggerAddCondition( gg_trg_Enter_Region, Condition( function Trig_Enter_Region_Conditions ) )
    call TriggerAddAction( gg_trg_Enter_Region, function Trig_Enter_Region_Actions )
endfunction

udg_RegionArray is an array of regions. I convert the Mana value to an integer and use that as the array index. My question is - will this work? And if not, is there an easier way to do this rather than having 121 events?
10-15-2002, 10:31 PM#60
DKSlayer
Ok I am lost forgive me I am at work.
You have a trigger that is activated when any unit walks into any region? You want it to make sure that the mana # = to the REgion #? Do you have where it already walks around randomly?
If so all you need to write in the condition is.

function takes integer Mana, integer RegionEntered which integer, returns boolean
if Mana = RegionEntered then
Return(TRue)
else
Return(False)
Endif
endfunction

This will not work like it is. It is just to get you thinking. I am not sure if I totalyl understand. I you wouldn't mind sending me the map I could Find the Fix. My email is in profile.