| 10-16-2002, 12:12 AM | #61 | |
Guest | Quote:
I want a trigger that activates whenever it walks into the region that corresponds with its current mana value...however, since the GUI doesn't allow you to use a Region variable in the "Unit Enters Region" event, I'm at a loss how to do it. The condition is difficult to do as well, as I'm not sure if there's a fast way to get the index of an array based on what value is in that index...especially with 121 entries in the array. --- addition --- I just realized I'm a first-class idiot. (pseudocode) if Entering Unit exists in region RegionArray[R2I(Mana of Entering Unit)] problem solved... sigh. |
| 10-19-2002, 11:18 PM | #62 |
Guest | Is there a script utility that allows you to "copy" variables between maps? Or does custom text offer a way to transfer Variable data between maps? I don't see how since I can't import a script. Thanks! |
| 10-21-2002, 07:21 AM | #63 |
Hmm okkk... just gettin seriously started with jass (and spent a few hours reading through all the threads relating to it)... 1) Just how powerful is the language? For example, could you... compact SuperIKI's dialog engine into a class? 2) What are the basics of the language, for example 2b) how is variable scope handled? Global and local-function only? Or multilevel in a function? 2c) Does Jass use function prototypes? Would that eliminate some of the enable-trigger problems I saw discussions on? 3) Could you feasibly write the triggers outside of the WE, in the *.J file, and import them directly into the map, bypassing any WE limitations/bugs? erm...*runs out of questions* 4) Who on the forums has taken the most CS courses :D My programming background is through C, C++, VB, and VC++ (primarily C++)...learning DirectX, openGL :D |
| 10-21-2002, 03:35 PM | #64 | |
Quote:
1) no. Classes don't exist. This is worse than pascal. 2) Look at blizzard.j and common.j for that. How to get them? Search the forum. 2b) Global and local-function. 2c) I think it doesn't. Maybe it does, but nobody knows how. If it would, the dialog engine would be much better. 3) Yes. Just make an empty trigger and paste your JASS code there. |
| 10-22-2002, 08:03 AM | #65 |
Thx for the answers dude... heh worse than pascal :bgrun: Well after all it is for a game after all so i'm happy with what we get :D Two more questions: 1) Can you create functions? I understand that currently we can only edit current ones in the *.j files 2) Are more obscure functions such as "RegionAddRect" feasible for use on b.net for dynamic triggers etc, or does it just depend and some are too laggy for general use (same goes for the add action/condition/etc) |
| 10-31-2002, 07:36 PM | #66 |
1) You can create functions, It depends where but yes, I ahve made many for stuff I am doing. 2) You can use those functions on bnet, they have to be located in your map though, yet no prob there. 2b Previous) like SuperIKI said Varables are local and global. Now if you do JASS in the map using a custom Text Trigger, than You can only define local's in that trigger, You can set globals up using the WE Variable set thingy. But I like to have my triggers self contained. So you will have to pass the variable as arguments in your functions. Holler if you need anything else. Also I am working on a FAQ and if anybody would like to help me please post a whole bunch of questions on JASS and AI in this thread. Even if they have already been answered. http://www.wc3campaigns.com/forums/s...&threadid=4867 Thanks |
| 11-20-2002, 01:49 AM | #67 | |
Quote:
Umm, well according to what Weaaddar told me once, dialogs doesn't pause the game in multiplayer. It could still be a problem for the player to use while the rest of the players ran around though. |
| 12-09-2002, 05:29 AM | #68 |
this should now be inside the new JASS forum.. |
| 12-30-2002, 04:05 PM | #69 |
Moved this to the AI/JASS forum. If it becomes active again I will restick it. Thanks DKSlayer |
