| 04-30-2006, 03:26 AM | #1 |
Pretty much i want this spell to choose a field farmer which it randomly chooses from all the field farmers on the map and then to reveal that area to the player whos unit casted the spell. (like the orc far seer far sight) This is what i have but i dont know if it is correct.. Trigger: Random Reveal
|
| 04-30-2006, 03:32 AM | #2 |
Well, for one you could merge the two actions into one, replacing the need for udg_farmer. Also, I am pretty sure that unit groups leak, in which case you will need to destroy that group as well. Finally, the order that you give is for the unit who casts which isn't always the best thing in the world. Instead, create a dummy unit which the reveal ability, give it a 1 second life timer, and order it to cast reveal. I believe there is a function that alllows you to set the visibility of a rect. You could use that and remove the need for a reveal ability. Just have the rect have coordinates relative to the random unit. In gui, its under the visilbility tab. |
| 04-30-2006, 03:42 AM | #3 |
thnx but how would i order the unit to cast the spell at a point... for some reason the trigger that casts at a point only allows the use of the default spells.. eg Orc - Far Sight |
| 04-30-2006, 03:48 AM | #4 |
The order is for the spell it's based off of. So if you base a spell off of Far Sight, use the Far Sight order. |
| 04-30-2006, 03:49 AM | #5 |
Yes, units in entire map will leak. Entire map might leak too if it uses GetWorldBounds(), but I think it uses the function that returns bj_mapInitialPlayableArea. You can check that with convert to custom text. Position of Farmer also leaks a point. To order the unit to cast the appropriate spell, use the spell that you based your custom on, or if you changed the order string, to the spell with the same order string. |
| 04-30-2006, 03:50 AM | #6 |
Well those aren't technically default spells. They are default order strings. As I stated though, you could remove the need for that. In the actions menu, look through the visibility tab. One of them there shows area to player. When you have to choose a rect, choose convert points to rect. I don't know how the gui of it looks but what you should do is set the boundaries of the rect to be offsets of the random unit's position. |
| 04-30-2006, 03:54 AM | #7 |
ok so ive based it off of far sight.. would anyone be able to give me a look at what they think the trigger should look like because im not that savy on preventing leaks and such |
| 04-30-2006, 09:46 AM | #9 |
nah its not working yet guys any other suggestions? |
| 04-30-2006, 10:04 AM | #10 |
What is the ability random reveal based off? Does the casting unit have an ability based off of far sight? |
| 04-30-2006, 10:44 AM | #11 |
no the casting unit does not but i set up a function like a dummy/invisible/spellcaster unit that does.. and lol i forgot to put mana in it... now it has mana but i just tested it and it did the spell on a different unit not a field farmer |
| 04-30-2006, 10:48 AM | #12 |
My trigger would, if you replaced (casting unit) with the dummy unit, cast it on a field farmer. Post your current triggers. |
| 04-30-2006, 10:54 AM | #13 |
ok i fixed it.. forgot the matching player rather then triggering player... But there is one more thing... its multiplayer and there are 10 players max so 1 field farmer for each so i want the ability to work on not just my own because ive tested it now and it ownly works on my controllable field farmer |
| 04-30-2006, 11:06 AM | #14 |
Post your current triggers, because mine what I suggested would work on all. |
