• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How To Add Locust to units with GUI

Level 6
Joined
Feb 19, 2010
Messages
182
Well I have searched everywhere and found no way to do this in GUI so I felt like posting a tutorial for everyone... Here is how its done:


You first make a spell book like ability which can be found in items of spells of object editor.
Next part is adding locust to the spell book, you must add it to spell list by finding it and then adding it.


Now triggers, you must make a variable that is a unit to identify the unit you want to add locust too like this: Set Variable/what ever the name is = last created unit but for that to work you must first create the unit then do this below it.
Next part is going into actions - unit and find unit add ability then go find your spell book ability. Then your done it will work if you have followed my instructions and know a bit of triggering yourself.

Now onto the next part of removal of locust without jass...


Well first thing before I say anything else you can not fully remove locust from a unit without replacing it from using GUI, you can make it be attacked again but it is impossible to be selected ever again but at least you can still remove it or replace it if you want it to be selected again... You must find a correct event such as player 1 red presses esc/escape key then action remove spell book ability from variable/unit.

That's all, simple isn't it?
 

Attachments

  • picobjedit.JPG
    picobjedit.JPG
    101.3 KB · Views: 474
  • pictrig1.JPG
    pictrig1.JPG
    72.7 KB · Views: 571
  • pictrig2.JPG
    pictrig2.JPG
    64.8 KB · Views: 393
Last edited:
Level 6
Joined
Mar 22, 2009
Messages
276
I'm sorry but your tutorial if it is, takes a lot of things to do just to add that locust ability to a unit via trigger.

To add locust via GUI you can use
  • Custom script: call UnitAddAbilityBJ( 'Aloc', YOURUNIT )
OR
  • Custom script: call UnitAddAbility( YOURUNIT, 'Aloc' )
To remove locust use
  • Custom script: call UnitRemoveAbilityBJ( 'Aloc', YOURUNIT )
.
OR
  • Custom script: call UnitRemoveAbility( YOURUNIT, 'Aloc' )
.

Aloc is the rawcode of locust and YOURUNIT is your desired unit.
Using non BJs is recommended to fasten the trigger.
Much easier. :)
 
Level 6
Joined
Feb 19, 2010
Messages
182
As I said it is GUI not jass/custom script, you should read more... It might be easier for jassers but not gui'ers btw custom script is not gui...

you can do it in object editor but nobody seemed to know how to do it through triggers and I know about 5000 people who would love this which is not much but atleast there is a tutorial for adding locust in triggers now.

Also spellbook is needed unless you can tell me how to do it otherwise without the use of jass...
 
Level 31
Joined
May 3, 2008
Messages
3,155
As I said it is GUI not jass/custom script, you should read more... It might be easier for jassers but not gui'ers btw custom script is not gui...

you can do it in object editor but nobody seemed to know how to do it through triggers and I know about 5000 people who would love this which is not much but atleast there is a tutorial for adding locust in triggers now.

Also spellbook is needed unless you can tell me how to do it otherwise without the use of jass...

Those are JASS that could be use directly in GUI. This tutorial would not be approve cause it was way too simple and does not follow the tutorial format.
 
Level 31
Joined
May 3, 2008
Messages
3,155
It is still jass though as well I don't think its too simple and if it is mind explaining a way to improve it to being not simple

They're very easy, it isn't rocket science. Infact, most of the JASS are easy to be understand even with a simple common sense.

well I did follow tutorial format didn't I?

No!! just read the thread

http://www.hiveworkshop.com/forums/...t-tutorial-please-read-before-posting-119320/

http://www.hiveworkshop.com/forums/tutorial-submission-283/announcements.html
 
Level 6
Joined
Feb 19, 2010
Messages
182
If I follow the directions of how to make a proper tutorial on hive only that is will it have any chance of approval?

Also from what I read it seems I have correctly made this tutorial and I would like it if you could directly point out what I missed or its flaws because I missed it.
 
Don't be too overconfident MiniFrenzy. Users that use GUI also use the custom script. It's idiot to create a custom ability and use 3 lines of actions, when you can do it with only one line and no custom abilities. I don't get why someone that knew your solution and the very widely known solution of Custom script would prefer yours.
We are not attacking you, it's just something that most likely everyone knows about and there is no reason to make some things more compicated than they already are.
Finally, custom scripts are a fact, even for GUI users, because you will eventually want to destroy the leaks your variables create. So, it's common knowledge.
 
Level 6
Joined
Feb 19, 2010
Messages
182
What happens when they want to do it on a unit group? I don't see those in custom script but of course I am no expert and it is there most likely just never seen it but still this is a unique tutorial while proving locust can be added and removed through GUI which is all I wanted to do for people.

I know creating a custom ability is a bit stupid but maybe they need it for something else too, most people only know custom script for the leaks and not for the extra's that it provides.

BTW it is not common knowledge...
 
Level 31
Joined
May 3, 2008
Messages
3,155
If I follow the directions of how to make a proper tutorial on hive only that is will it have any chance of approval?

Also from what I read it seems I have correctly made this tutorial and I would like it if you could directly point out what I missed or its flaws because I missed it.

Most likely no as this was way too simple and have no use at all.

What happens when they want to do it on a unit group? I don't see those in custom script but of course I am no expert and it is there most likely just never seen it but still this is a unique tutorial while proving locust can be added and removed through GUI which is all I wanted to do for people.

I know creating a custom ability is a bit stupid but maybe they need it for something else too, most people only know custom script for the leaks and not for the extra's that it provides.

BTW it is not common knowledge...

Just use the pick all unit in group along with custom script and change it from trigger to getenum unit (hmm, cannot remember the exact command).

But there are tutorials for creation of dummy units isn't there while locust is basically a new of of invulnerability.

If I want invulnerability, I would just set the unit invulnerable instead of adding locust. Adding locust removing the ability to control units.
 
Level 6
Joined
Mar 22, 2009
Messages
276
It does have a use and its not way too simple, barely anyone knows about it, it seems that way anyways.

Please give us some uses as you have said so we have an idea where to use it. :)

All in all, good trick. But for me I will not refer this to be used by GUI users and newbies. It is much easier to teach them or to learn how to do it via single line rather than tons of clicks, creation of abilities, and etc. And maybe stop thinking of "what if they dont know how to write in jass or use custom scripts". When those event came maybe its time for them to learn something about custom scripts or jass. Yes be an open-minded one, never stop learning. That's why we have a search button.

Don't take us personally, we're just commenting and expressing ourselves. Chill :grin:
 
Level 6
Joined
Feb 19, 2010
Messages
182
Well some uses would be:
Want to use GUI and nothing else.
Prefer to do it this way because of a need for spell book anyways.
Less bugs in this way because you do not need a exact clarification like jass/custom script requires.
Easier to just create a single ability and 4 - 7 lines of actions then to keep screwing up on a custom script line.

Well actually it is much easier for them to be learn this way first before the advancement onto jass and since open minded and have a search button this tutorial will provide useful upon the days to come for that people that don't know how to do such things can easily just search and find it.

Here's proof of some more simple ones if you find my tutorial too simple then these I am about to list are about the same as mine basically...
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/torch-system-115032/
http://www.hiveworkshop.com/forums/...ials-279/creating-some-basic-abilities-32827/
http://www.hiveworkshop.com/forums/...orials-279/difficulty-system-easy-way-130486/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/making-grenade-type-spell-90985/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/starting-gui-64286/
http://www.hiveworkshop.com/forums/...279/creating-enterable-exitable-houses-62141/

Thus fully even though mine is pretty simple and easy, a lot of people do not know how to do this and didn't even know this would be possible. If I have offended anyone I apologize for that because I did not mean to be offensive, just merely showing examples of stuff that is simple like mine.
 
Level 31
Joined
May 3, 2008
Messages
3,155
Prefer to do it this way because of a need for spell book anyways.
Less bugs in this way because you do not need a exact clarification like jass/custom script requires.
Easier to just create a single ability and 4 - 7 lines of actions then to keep screwing up on a custom script line.

What's soo hard about it? It only took about 2-3 custom lines, rather than such a long 7-8 pointless line.

To top up with, what you did only work for 1 unit and 1 player.

Here's proof of some more simple ones if you find my tutorial too simple then these I am about to list are about the same as mine basically...
Torch System
Creating some basic abilities
Difficulty System - The Easy Way
Making a Grenade Type Spell
Starting with GUI
Creating Enterable/Exitable Houses

They might be simple, but they have a big usage in comparison to yours.

For example, the torch system could be used to enchances the ambients and surrounding in an rpg generic map that focus on dark surrounding.

On the other hands, yours have no use at all. Why should I add locust and then remove it since adding locust remove the capability to control the unit? If I want unit to be invulnerable, I could easily set the unit invulnerable and if no collission, I could easily turn off the unit collission.

Your's was inefficient as well. You got to use indexing system and more if it involves more unit and player. If you don't, it would screw up everything.

Thus fully even though mine is pretty simple and easy, a lot of people do not know how to do this and didn't even know this would be possible.

Cause this kind of setup does not serve any purpose at all.

Well actually it is much easier for them to be learn this way first before the advancement onto jass and since open minded and have a search button this tutorial will provide useful upon the days to come for that people that don't know how to do such things can easily just search and find it.

Please!! those are simple and you're making it sound like they're having down syndrome and cannot do such a simple stuff.
 
Level 9
Joined
Nov 4, 2007
Messages
931
I agree with Septimus on this tutorial, it just isn't suitable for teaching people the right way to add or remove Locust from units in GUI, one could argue that custom script is not GUI because its considered JASS, but still you have to start somewhere with the learning experience, and if it comes to the point that your map needs a system like this in order to come into fruition, then its probably time you started learning the JASS language.
 
Level 6
Joined
Feb 19, 2010
Messages
182
mine only takes 4 lines to set,remove, and add while only needing two events..... where are you coming up with 7 - 8 lines? It would seem mine is just almost as short as custom scripts, I'll add a MUI way soon just so it can be used better. I am not even close to making it sound like they have a problem but more of a way to learn something before the advance to even better stuff. Imagine your 10 opening the world editor for a first time and never seen programming and want a tutorial how to do gui locust add and removal.

The torch system is a example of how its basically like mine while providing what you said while mine provides a chance for new options in maps such as string command armies which would provide usefulness to some people including me.

I myself know this will be a extremely useful tutorial once I add the indexing way for gui'ers because they'd prefer to use this and not custom script well most likely anyways, As I said there was no tutorial for this and its unique providing a completely new tutorial for this site to help the non-jass people.

I can provide more examples of how there is no need for some different tutorials if you would like....
 
Level 31
Joined
May 3, 2008
Messages
3,155
mine only takes 4 lines to set,remove, and add while only needing two events..... where are you coming up with 7 - 8 lines? It would seem mine is just almost as short as custom scripts, I'll add a MUI way soon just so it can be used better. I am not even close to making it sound like they have a problem but more of a way to learn something before the advance to even better stuff. Imagine your 10 opening the world editor for a first time and never seen programming and want a tutorial how to do gui locust add and removal.

The torch system is a example of how its basically like mine while providing what you said while mine provides a chance for new options in maps such as string command armies which would provide usefulness to some people including me.

I myself know this will be a extremely useful tutorial once I add the indexing way for gui'ers because they'd prefer to use this and not custom script well most likely anyways, As I said there was no tutorial for this and its unique providing a completely new tutorial for this site to help the non-jass people.

I can provide more examples of how there is no need for some different tutorials if you would like....

Even if you're adding indexing, it was still useless. Why should some1 press esc 100 times to remove locust ability from 100 unit?

and for your information, GUI are not programming language.

I won't be bothering with it anymore, it would just be matter of time before it was graveyard.
 
Top