HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Automated Custom Spells HELP!

10-19-2003, 05:44 AM#1
LucaTurilli
Well, I'm using the frozen throne world editor, and I'm not too noobish to map editing, but still learning some of the harder triggers. Anyways, I desperatly need your help. I have made a custom spell for my tower defense, and I want it to be activated, or automatically casted when a unit comes within a distance of: say 400.00 of it. Here is what I thought would work

Event:
Every 2 seconds of game

Condition:
Unit owned by player brown is within range of 400.00 of unit type Slumber Tower

Action
Unit Issue (Unit or something that goes here) to (my custom spell here) unit within range.


Now, all would go well, but I can not get my spell to appear in the list of options the action menu gives when issueing an order, it specifically gives you certain spells, is there anyway to add my spell to this list?
10-19-2003, 05:55 AM#2
MaliceDR
It sounds like you're at least mildly familiar with the trigger editer. Being just a little bit on the advanced end, I to am at a loss as to how to get this to work. Converting the trigger into JASS doesn't help at all, for the trigger doesn't use the the four-digit ability codes either.
10-19-2003, 06:02 AM#3
BananaTwist
I can think of two things:

1. based your spell on heal, and make it do damage and stuff. Then it would have autocast.

2. Using triggers create a region around the tower and make it a variable. then when a unit enters that regiion tell it to attack it with the spell.

Btw, i don't know what's wrong, it shud be on the list.
10-19-2003, 06:08 AM#4
MaliceDR
The problem is the process of telling the tower to use the spell. Custom spells don't show up on the order list.
10-19-2003, 06:19 AM#5
Grater
If I understand your problem correctely theres a really easy solution. The order string to activate an ability is different and quite seperate to the name of the ability. Custom abilities have the same order string as their base ability.

So if this ability is based of "Sleep" (for arguments sake) then just use
"Undead Dreadlord - Sleep"

For an ability like "Roar (Neutral Hostile)" you would just use the closest option:
"Nightelf Druid of the Claw - Roar"
10-19-2003, 06:21 AM#6
Supra God CrK
i know how you can do this. instead of actually making a whole new spell just instead make your spell off of one that you don't use. find the spell that the units use to cast sleep and edit it directly(you can even edit the name). it will than appear in the list to choose from. hopefully you don't use that spell too. if you do you will have to base it off another spell. maybe make a dummy spell than use triggers to actually put the unit to sleep.
10-19-2003, 06:23 AM#7
MaliceDR
Ah, okay. You have my thanks, Grater. And I'm sure you have LucaTurilli's as well.
10-19-2003, 03:15 PM#8
noobelite
Also, if the order string is not on the list(if they all are in the list then nm), you can convert it to jass and type in the order string. You can get the order string for an ability by looking in the ability editor.
10-19-2003, 05:07 PM#9
LucaTurilli
I thank you all for your help, yet I've thought up editing the dreadlord-sleep, but the thing is, in my Tower Defense, the towers upgrade and abilities are supposed to increase in power, meaning I would need more than 1 sleep spell. I'm not really familiar with JASS either. Ah well, thank you all for your help.
10-19-2003, 05:12 PM#10
Supra God CrK
so than make your tower into a hero. that simple. base it off of a hero you don't use and than when it gains a level let it upgrade it's spell like the dreadlord's.

another thing you can do is quite easy as well. give the unit all of the sleep spells. everyone don't be shy go ahead and make them all into normal abilities. just be sure that you base them off of spells you don't use. now go to map intialization and go to make a new action. under the part that says player choose to disable the spells you won't be using yet. and leave the one spell that you do use. now if you used any spells that don't actuaklly put units to sleep you can do it through triggers. there is a trigger for making a unit sleep. than just put a wait action and wake it up. easy. now when ever you upgrade your tower make a trigger that disables the spell you were using at the time so it is no longer available and enables the next level sleep spell. it will work. and there you have it. oh and don't forget to make a trigger for all the spells that casts it when they come into range.
10-19-2003, 08:24 PM#11
AllPainful
If you want the spell to be Autocast EVERY time it attacks (meaning mana doesn't matter) then the easiest way to do it is:

Make a new ability based off "Orb of Slow" ABILITY (Not item) and change the ability to cast your custom spell. Then give the "orb" ability you just made to your tower. Change the % in the "Change to Hit" fields to what you want the change to be that the spell is cast. so you could do things like have your ultimate tower have 5% chance of casting doom each time it attacks and things like that.

Another nice thing about this is you don't to worry about "Custom spells not showing up for triggers" because your not using any triggers.

And as for your upgraded towers, becuase your not using triggers theres no problem with using custom spells, so you can make as many of these orb abilities as you need with no worries..

THIS IS THE BEST WAY. For 1 reason: No triggers, and we all know less triggers = less lag.

Other advantages to this:
1. Does not use mana
2. You can set the % chance that the tower will cast it
3. No triggers required (can't say that enought)
4. To adjust lenth of time between casts just adjust attacking speed of tower.
5. I believe (although I haven't tried it) that you can give the 1 ability 2 different spells.
10-19-2003, 08:59 PM#12
STOPOT
DID U ADD YOUR SPELL TO THE TOWER?
10-20-2003, 05:30 AM#13
LucaTurilli
Allpainfull, I thank you so much, words can not describe the relife you have brought me. Thank You!
10-20-2003, 07:22 AM#14
AllPainful
Glad to be of assistance.