| 07-18-2007, 07:10 PM | #1 |
Does anyone know the list of natives that DON'T work when used in a JASS AI. I know about ExecuteFunc but i don't really know any others. If anyone knows, please tell me... i'll give rep! ![]() |
| 07-18-2007, 07:25 PM | #2 |
In general, the functions that are available for an AI to use are in common.ai |
| 07-18-2007, 07:50 PM | #3 |
i meant compatible common.j functions. |
| 07-18-2007, 08:31 PM | #4 |
I worked with this question and all the functions except the ones related with triggers works fine, because you can't have triggers in AI scripts. |
| 07-18-2007, 08:33 PM | #5 |
thanks. I wasnt too sure if that was the case or if it was for something else. + REP |
| 07-19-2007, 01:45 AM | #6 |
What doesn't work in ai scripts are: 1) Functions that take callbacks (that means triggers, timers, ExecuteFunc, as well as ForGroup -> you can work around it with a FirstOfGroup loop) 2) Functions returning a string (I2S -> can be manually implemented, SubString ...) The AI scripts seem to use a different base offset in the string table, so you get random strings returned. |
| 07-19-2007, 02:40 AM | #7 |
ok then. Thats weird that strings dont work... but they arent that needed anyway. Though a a ForGroup would be useful. Well, +REP |
| 07-19-2007, 02:49 AM | #8 | |
Quote:
JASS:function Rawr takes nothing returns nothing //blah blah blah local group g = CreateGroup() local unit f call //Whatever GroupEnum... function you need to fill your group set f = FirstOfGroup(g) loop exitwhen f == null //do what you want to the units here call GroupRemoveUnit(g, f) set f = FirstOfGroup(g) //other stuff you may wanna do endloop //cleanup endfunction |
| 07-19-2007, 05:37 AM | #9 |
I think TSA is just takin precautions if there is an JASS A.I contest... Well you can check human.ai files etc. AMAI .ai files as well -Av3n |
| 07-21-2007, 12:46 AM | #10 |
actualy, yes. AND im making an AI Editor and a targeting system that picks the best unit to attack based on all parameter. |
