• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

help with jass...

Status
Not open for further replies.
Level 2
Joined
Jun 29, 2013
Messages
13
ok so earlier i asked a question about transporting from island to island with boats with no luck. thried everything via WE like making zeppelin into a boat etc...

i decided to try making my own jass, to order boats to transport units.
i must say im still new to jass, and programing in general, but i read alot of scripts, and did alot of tutorials blabla...

so my idea is to do every step in this transporting through command like:

1. AI makes units (first cmd)
2. Boats load them (sec)
3. Wait for attack order(third)
4. Send them to other island
5. Unload
6. Suicide units

First command about making units i have no problem making constant same units for every time i issue command, thing is i want to make waves like Grunts were first wave, then next time i issue same command to make wave 2 raiders etc.. (is that possible ? :) )
Second command is first to count if there are any available boats for them to transport
JASS:
function count_boats takes nothing returns boolean
    if ( not ( CountLivingPlayerUnitsOfTypeId(BOAT, Player(2)) >= 1 ) ) then
        return false
    endif
    return true
endfunction

function add_units_to_group takes nothing returns nothing
    call GroupAddUnitSimple( GetEnumUnit(), BOATS )
endfunction

function add_boats takes nothing returns nothing
    call ForGroupBJ( GetUnitsOfTypeIdAll(BOAT), function add_units_to_group )
endfunction

i declared BOATS in global as group../

Tricky part i want to do is for ai to recognize a wave is done building then load them. something like when harass_length = attack_index [unit_count]...

Other funcs i can work, but the second is most problematic for me.
If u have some time to explain is this even possible to do, and how to do it.

I APOLOGIZE FOR POSTING HERE, I MADE ANOTHER THREAD ABOUT THIS IN A SECTION WHERE IT BELONGS, PLEASE DELETE THIS!
 
Status
Not open for further replies.
Top