Items that teach Abilities

  • Thread starter Thread starter Luminescence
  • Start date Start date
L

Luminescence

Guest
Hello,

I'm new to this whole Map Editor thing, and was wondering if anyone knew how I could program an item that, when clicked, bestowed a custom ability onto the hero that uses the item.

If anyone knows some good Item and Ability tutorials on the net that I could read, that would be great. Thanks a lot.
 
I can't think of any tutorials on that topic (Conan did write a Channel tutorial; you can search for that, but it doesn't sound like that's what you need. I can help you though. However, I need to know if it's a custom item or not. If it is, it becomes slightly more complicated.
 
Hey, thanks for the speedy reply. Yeah, it's a custom item that I'm basing off of the "Greater Mana Potion" item (so that it's consumable). I'm basically trying to create an item that, when clicked, teaches the Hero a custom Summon spell. I also want to make it so that this spell can be forgotten and replaced by another one down the road. I've tried messing around for a couple of hours, but the best thing I've done so far is that the Hero clicks the item, and then Summons the creature right away :(

Thanks for your help.
 
Well, you need to do a few things. First, you need to create a dummy ability, which in case you aren't familiar with the term, is an ability that does nothing. I recommend basing off a potion ability. Just set every field that says "Data - xxxxxx" to 0. Also set the the field "Stats - Casting Time" to 0. Next, you need to create a trigger that actually gives the unit the ability. The trigger should look like this:

Code:
Events:
     Unit begins casting an ability.
Conditions:
     (Ability being cast) equal to <your dummy ability>
Actions:
     Add <ability to be learned> to (casting unit).

As for that action, I'm not sure that that's exactly what it is, but you get the picture.

By the way, I'm giving you some rep for your manners. It's a great attitude. :)
 
Haha I was confused at first when reading this... But realized that when he uses the item, he wlil have it setup to cast the dummy ability.. firing the trigger. That's pretty nifty. :D
 
Yeah, pretty nice SilverHawk, you did this in your CTF map?
What would be even cooler is if you set the item automatically be used right when it enters your inventory. You can do this without triggers - just look at tomes :cool:

-Demonfaze
 
Thanks again Silverhawk--this is Luminescence under a different name, since I never received the confirmation e-mail for my other account.

Your code worked :) Now the only thing I have to figure out is how to keep this summon spell from triggering other summon spells I have in the Hero's ability tray at the same time--for some reason when he has both this custom summon spell and the Water Elemental summon spell, it summons both :( Could it be because I based this custom spell off of the Water Elemental one? If it means anything, I made sure to delete any "strings" that led to the Water Elemental spell, so I'm not sure what's going on.

By the way, I suppose I'll ask this just because it came to me: 1) Is there a simple code for having a summoned unit automatically replace an older summoned unit of the same type? And lastly, 2) does anyone know a code for forgetting abilities?

I'm sorry for including 3 questions in a single post, I just figure I should get them all out of the way at once. If no one answers, I'll try finding them using the Search option. Thanks for helping a newb out, guys.

-Lucent (formerely Luminescence)
 
Demonfaze said:
Yeah, pretty nice SilverHawk, you did this in your CTF map?
What would be even cooler is if you set the item automatically be used right when it enters your inventory. You can do this without triggers - just look at tomes :cool:

-Demonfaze

Yes, that's where I got it from. And who knows, I never thought of that before, and now I might do it.

Anyway, yes a hero cannot have two or more abilities with the same order string. I don't know for sure if changing it will affect the ability. I do, however, know for sure that you cannot have two or more abilities based off of the same one. Perhaps try basing it off of one of the Beastmaster's abilities.

The easiest way is to base it off of an ability that does this automatically, but there is a way if for some reason that isn't possible.

Yes; use the "Unit - Remove Ability" action.

Hope all that helps. :D
 
"I don't know for sure if changing it will affect the ability." --Nope, it won't, I tested it not too long ago.

-Demonfaze
 
Hey again,

Thanks for all of your help. My map is steadily coming along and I am learning many things quickly. I've managed to successfully design several complicated (or so I like to think :D ) triggers that do wonderful things.

Anyway, I have another issue with Summoning. I managed to find a perfect Summon spell to base my custom one off of, because it automatically kills the previous Summon when you summon a new creature of the same type.

Here's the problem: The way my game is going to work is that players will be getting a lot of different kinds of summons...but if the player possesses two or more summons that are based off of the same one (i.e. Summon Bear), when the player presses one summon, it summons them all.

Thus, my question is: Is there a way to prevent this from happening? I deleted all the strings I could find, and it's still happening. Is there a way to ensure that, no matter how many different summons I create for my map, activating one will never also activate some other one? Plus, I need to be able to have all my summons disappear when the player summons a new copy (so that you don't have two of the same creature fighting at once).

I hope this wasn't too long/complicated, but I'd appreciate any advice. I'll be working on the problem for now, and if I discover anything new, I'll let you guys know. Thanks,

Lucent
 
Q: Is there any way to prevent summoning all monsters from spells based off the same ability?
A: No. You must base the ability off of different abilities.

Q: How to make summons disappear when another is summoned?
A: You can do one of two things if you can't find another "perfect" ability. 1) Make the duration as short as the cooldown so that when the ability has cooled down, the summon dies. or 2) Make a trigger that picks every unit of type (unit that is summoned from the ability being cast) and remove them. Run it when a summon ability is cast.

Hope this helps :cool:

-Demonfaze
 
Thanks again, I appreciate it :) I added to your rep, if it means anything.

And when one problem gets solved, yet another pops up. Now, for some odd reason, ALL of my summons stopped working. That is, I click on the ability, and no creature pops up. I made sure the Data field says "1" and that I've specified which unit to be summoned. This even includes my character's default ability, Summon Water Elemental. Every Summon just suddenly stopped working. What did I do? :(
 
Never mind, ignore the above post! I figured it out on my own ;) It turns out my code for getting rid of duplicate summons was bogus, and was actually getting rid of the NEW summoned creatures.

I'll have to keep experimenting in order to get the Trigger I want. Thanks again.
 
Thank you very much for the rep point :cool:.
If you run into problems with your trigger, just post it and I'll be happy to fix it. ;)

-Demonfaze
 
Err im not as good as demon but... ill try
did you make any triggers that remove summons or someting because the trigger might remove the other unit as well if you name them the same or something.
I cant see your object editor so this is what i recommend, click on your custom spell then compare its fields to a real w3 summon, that usually helps me see wth i did wrong.
Make sure the unit you are summoning is still there an that u did not delete/replace it
If no of these work, one of the more advanced members can help you
-Hope I helped
Omg lol demon posts FAST!actually scratch that, you both post fast
 
"Omg lol demon posts FAST!" --That's why I'm called "The Machine."
43.60 posts per day :D

-Demonfaze
 
Hey, long time no post :p

So I've made significant progress on my map (in part thanks to you guys who helped me :) ) and am now in the process of designing several custom abilities.

One ability I want is a spell that gives all allied units a temporary magic barrier with a certain percentage chance of reflecting spells back at enemy casters (thus nullifying the damage that would've been done to the allied units). I've searched the forums for a while and couldn't quite find anything to help me, so I'm risking a request for help. I've also messed around with the editor and I've come up dry.

I'm pretty sure I'll need some complex triggers for this one, unless there's an ability that reflects spells that I overlooked? Thanks again for your help.
 
you could probebly use an anti magic sheild and then use triggers to make it do all the above but it will be very complicated.. :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.
  • Ghan Ghan:
    That sounds like an adventure.
  • The Helper The Helper:
    400 users all online all looking at latest content
  • The Helper The Helper:
    I wonder how all these bots that sit on the lastest content page get passed anubis or maybe they did not but they are just registering on whos online
  • The Helper The Helper:
    showing up on whos online not registration
  • Ghan Ghan:
    The first gate is stopping all the bots that don't execute javascript.
  • Ghan Ghan:
    That's the main thing with Anubis - no Javascript, no site. Typically you can still get the site to load without Javascript.
  • The Helper The Helper:
    I remember the whole javascript thing, question - how many real people disable that?
  • The Helper The Helper:
    Hell I guess I could go back on the stats to know that - we probably capture that and we know the before and after
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top