• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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