| 02-08-2005, 04:14 AM | #1 |
How do you declare globals? ive tried this: Code:
globals
unit kodo
endglobalsAlthough it doesnt seem to work. Also i dont know where to put the code, some where ive seen says to put it before all functions, but it still doesnt work. |
| 02-08-2005, 08:57 AM | #2 |
You must use the Variable editor in the GUI to define globals. You can access it from the Trigger Editor. Then you can access the defined variables with a udg_ prefix in JASS scripts. For example, you define a unit named "kodo". You can refer to it as "udg_kodo". |
| 02-08-2005, 09:26 AM | #3 |
then what is this all about? http://jass.sourceforge.net/doc/globals.shtml |
| 02-08-2005, 11:12 AM | #4 |
It's for AI scripts, where you can very well declare global variables that way. Btw, I also replied to your bnet forum post (Mi-Go = me). More specifically, you could declare global variables that way also in the map script, but the GUI does not support it (there is no place to put custom variable declarations). Perhaps you could suggest to rkhoo that it would be added. |
| 02-08-2005, 11:13 AM | #5 |
it's about jass scripts. the thing is that World Editor makes that part automatically. if you really want to edit it. you must extract war3.j (i think that's it, been a while) from your map and edit it, and put it back. and keep in mind it will be overwritten if you ever save in world editor. so that is far too much trouble. |
| 02-09-2005, 06:01 AM | #6 |
well thanks, bah guess i go back to old variables :D |
| 02-09-2005, 02:24 PM | #7 | |
Quote:
|
| 02-17-2005, 09:04 PM | #8 |
I had the same probleme... So you can't declare gobal array? |
| 02-17-2005, 10:15 PM | #9 |
Just check the "array" box when the dialog for making a new variable comes up... |
| 02-18-2005, 03:42 PM | #10 | |
Quote:
F***ing french editor ^^ Thanks |
