• 🏆 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!

Removing commands, Patrol, Move?

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2018
Messages
41
I've tried using a temporary unit variable
call UnitRemoveAbility(TEMP_UNIT_STRT, 'Stop')
but i get an error

then just
call UnitRemoveAbilityBJ( 'Patrol', GetTriggerUnit() )

but i believe maybe these commands have codes like a regular ability does
ex:
UnitRemoveAbilityBJ( 'A087', GetTriggerUnit() )


Does anyone know the codes of "move, patrol, stop" or knows how to find them?
thanks in advance.
 
Level 11
Joined
May 16, 2016
Messages
730
1. Do a backup map file because i have no guarantee it doesn't break a map.
2. Here is a file you must import in the map.
3. Rename it as Units\CommandFunc.txt inside the import manager
If success then you will have only Move button. Hero "Red Cross button" is moved to up so you have a giant free space. You can provide your success with a screenshot here.
 

Attachments

  • CommandFunc.zip
    455 bytes · Views: 53
Level 13
Joined
May 10, 2009
Messages
868
Move and Patrol consist of only one ability, which is: 'Amov'.
call UnitRemoveAbility(YOUR_UNIT, 'Amov')
Keep in mind that you won't be able to add that ability back to a unit.

EDIT: Stop is only removed if both "Attack" and "Move" abilities are removed. Also, attack ability can't be given back to a unit either.
'Aatk' and 'Amov'
 
Last edited:
Level 3
Joined
Mar 1, 2018
Messages
41
oh yes it works. really interesting. thanks for the info now it makes sense.

Aatk and Amov store all those commands so thats why i cant just remove some and leave others.


Sorry if its unrelated but do you guys know how to loop more than 2 vars in the same condition loops (more than integer A and B)?


For each Integer A (1 to 6) loop
if then else
item type in inventory slot (int A) equal to etcX
then
For each Integer B (1 to 6) loop
if then else
item type in inventory slot (int B) equal to etcY
then
For each VarC (set nr) loop
if then else
item type in inventory slot (varC) equal to etcZ


now on the last and 3rd variable, I was trying to use an array but i dont know how to set it up so that it loops throught it. I allways get asked for a value.
I'm thinking maybe i set VarC = 1 in the start and for each loop it does VarC = VarC + 1

would that work as my "Integer C,D,E,F" loops? :p
 
Status
Not open for further replies.
Top