[Spell] Need help with creating "build" via "spellbook"

Level 2
Joined
Feb 17, 2017
Messages
4
I want to create a building option via spellbook. I made spells based on "Build Tiny Scout Tower" for the custom buildings i made, and i also made a spellbook for them. But every time i try to create buildings with my worker, he builds the same building. Example - I made a tent, campfire and well. And whatever building i choose to build, it always builds the first spell in spellbooks data (In my case - campfire). I tried changing the order of the spells, then it builds the other first spell, no matter what building i click. If someone could help me, i would be more than thankful. I haven't set any triggers, i used object editor. And i haven't changed any options of the made spells except what unit will they create, and what spells should my spellbook have.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,328
Changing orders of the spells does not work. There are only a few spells you can change the order id (channel and spellbook for example)
 
Level 11
Joined
Jun 2, 2004
Messages
849
You might want to keep these as items (unless you're using items for something else). As mentioned, their order ids will conflict as regular abilities and you'd have to do something crazy like putting them into individual separate spellbooks or go nuts with dummy abilities.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,328
Dummy abilities are probably no option, because you need the green/red sqare that indicats where you can build it.
 
Level 2
Joined
Feb 17, 2017
Messages
4
Hmm, so should it be better that i create all those buildings as items and build them from items? It would fit in into my map and it's style, i was just wondering is it possible to build things up via spellbook kind of a option. Thanks guys.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Dummy abilities may still be an option.
Instant cast abilities can be used to automatically add your desired build structure ability and press some hotkey to activate the targeting.

Xonok and i were experimenting with it for a while.
The only problem arises when there are too many icons in your ui chart that the build strucure is not shown even if you remove the dummy ability.
 
Top