| 08-16-2009, 02:02 AM | #1 |
Greetings. I'm trying to make a peon who can use a Spellbook ability to switch to other types of peons. My visualization of this was that I'd have a handful of Channel abilities in the Spellbook and when the peon casts one, I give him a Chaos ability that turns him into the kind of peon that matches the Channel. How this turned out: So far, the Channel ability works, causing a trigger to give the peon the appropriate Chaos ability. The Chaos ability works, turning the peon into the new peon type. How it doesn't work: The new peon has the full build list that it's supposed to have, but it cannot actually build any of the buildings. It allows me to choose where to put it, and the peon walks up to the location and then stops without building. At this point, I want to assure you that all the peons are Orcs. Also, the new peon has the Spellbook ability as it should, but there's nothing in the Spellbook at all; all of the Channel abilities have disappeared. So, who knows Chaos pretty good? How did it cause these funny little quirks, and can they be worked around? I'm hanging on to using Chaos here because I anticipate the players to 1) Use the peon extensively, probably in a control group (like Ctrl+1), and 2) use the Spellbook to swap between peon types often. I understand that there are different ways to swap units, purely using triggers for example, or multiple morph types, but triggers won't keep the control group, and using morph abilities would mean I would need a separate morph ability for every combination of peons (so, lots of abilities). First and foremost, I want to get Chaos to work if possible. Any knowledge you can provide would be great. The night elf would love you: ![]() Thanks. |
| 08-16-2009, 08:27 AM | #2 |
Try doing something silly with UnitMakeAbilityPermanent() on the spellbook and/or the repair ability. Edit: You could easily generate all of the necessary abilities to use Raven/Bear form for the switch instead by using the ObjectMerger and a .lua script. |
| 08-16-2009, 12:14 PM | #3 | |
Quote:
Got the same probleme, when I want to make a copy of the acolyte. It only constructs the fundament (had nothing to do with chaos) Same probleme occured with the peon and the nightelven builder, but peasant worked fine --> only blizzard's peon, bizzard's wisp and blizz's acolyte can built in their special way, own builders can only built like a peasant (Not confirmed by others; only personal experience) |
| 08-16-2009, 12:38 PM | #4 | |
Quote:
I don't think that's really true. The explaination is likely to be that human units do not build after laying the foundation, while Peons and Wisps do. Humans repair instead, which is an ability. Only with humans can the building be finished by a unit other than the one that started it. |
| 08-16-2009, 01:31 PM | #5 | ||
Quote:
Woooooosh! <-- sound of that going over my head. EDIT: Ah, I think I understand. You mean to generate the abilities and save them in the map, not to generate them on the fly in-game. That still winds up with a lot of abilities; I'm interested in a solution that uses as few resources as possible. And yet, night elf love, for trying: ![]() EDIT: Quote:
EDIT: Alas, I wasn't able to fix any of it with UnitMakeAbilityPermanent(). I'm starting to get the feeling that I'll just need to trigger the exchange and let the players feel like I hate them for not preserving control groups. |
| 08-16-2009, 02:00 PM | #6 |
Just use a shitload of bear form morphs with UnitMakeAbilityPermanent(). |
| 08-16-2009, 03:07 PM | #7 |
Hmm, I do have a stated desire to avoid having a shitload of abilities. |
| 08-16-2009, 03:23 PM | #8 |
Morph abilties dont seem to change cerain fundamental behaviuours based on the unit's race. You can check that here, where a phoenix egg morph ability keeps chaging the workers unity type, but only when they return to their original form, they can build. |
| 08-16-2009, 03:28 PM | #9 | ||
Quote:
Quote:
|
| 08-16-2009, 07:11 PM | #10 |
Morph abilities require you to define the starting and ending unit, whereas Chaos allows you to just define the ending unit. So I'd have to have a morph for each pair instead of one for each ending. |
| 08-17-2009, 12:37 AM | #11 |
You can do some weird things with chain morphs. Try it sometime. |
| 08-17-2009, 02:12 PM | #12 |
Do you mean, for example, having a morph ability from one basic peon to each of the other types, and then morphing first to the basic peon and second to the desired peon? Sounds doable... although I'm worried about queued actions interfering. It will require experimentation. |
| 08-19-2009, 01:38 AM | #13 |
Dark Conversion is also pretty neat. |
| 08-19-2009, 02:08 AM | #14 |
Hmm, you're right! I had discounted that ability because the race restriction has been a problem in previous maps, but as all the builders are one race in this one, it might indeed be a good solution. Cheers! I'll go play with it. |
| 08-19-2009, 02:46 AM | #15 |
Try adding the buildings to the starting peon unit type's build list. I ran into a similar problem in power towers: the secondary forms can only build structures in the primary form's build list. Just put them last so they don't cover others in the build menu. |
