• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Builder Paging

Status
Not open for further replies.
Level 5
Joined
Jul 11, 2007
Messages
152
I have a survival based game and what I really want to add on to it is a second page of building options for the builder you start out with. Also he needs to be able to switch back and forth between them fairly easily. I've seen this before so I know it can be done but is there an easy way in GUI?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
If thats the case you could use 2 units, and when you use a ability it replaces beetwin them.

You could also (I think) use spell books with the Build Tiny Castle ability.
Im not sure about this though and im not going to test it since im going to sleep.

Good night
 
Level 5
Joined
Jul 11, 2007
Messages
152
Yes Elfsilvers got it right and I'll check out the 2 unit switching next
Or maybe a 2nd builder menu? That'd be the best
The tiny castle works for only the castle itself so I could change it for another but it'd only be good for 1 unit not another page
 
Last edited:
Level 6
Joined
Nov 28, 2007
Messages
203
nah, you don't need an item for a spellbook. you can do like this: make the builder have the spellbook ability and put the buildings that you want it to have as abilities (this should be able to do with the "Build Tiny Castle" item ability) and put spellbooks inside the other spellbooks so you can have as many buildings as you want :D
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
For some reason it seems to me that in every thread I post someone later on copies exacly what I said, changes the words and posts again... this is starting to annoy me :wthumbsdown: (not that anyone cares).

A Spell Book is a ability in the Item Abilities that has its "own" menu and allows you to put up to 11 other abilities into it.

If you ever played RPGs, most of them have one.
 
Level 6
Joined
Nov 28, 2007
Messages
203
For some reason it seems to me that in every thread I post someone later on copies exacly what I said, changes the words and posts again... this is starting to annoy me :wthumbsdown: (not that anyone cares).

A Spell Book is a ability in the Item Abilities that has its "own" menu and allows you to put up to 11 other abilities into it.

If you ever played RPGs, most of them have one.

oops, didn't read ur post b4 >.< soz :p
 
I'm sorry to say that the use of Spellbook and Build Tiny xyz won't work, because they all share the same order id. Which means, if you cast one of the builds only one of them will be build. Always.

It is indeed possible to make it with Spellbooks, but only by removing and adding the wanted Build Tiny xyz ability. (Not tested, but should work)
 
Level 5
Joined
Jul 11, 2007
Messages
152
I've been trying the spellbook > build (my unit instead of Castle) but it's not working as well as I'd hoped.
It ignores how many resources the building costs and it constructs even if the builder goes to do something else
Therefore you can make unlimited of them without time or cost constraints.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Of course, its a ability after all.
If you want to use it, you would need to use triggers.

A simple example:

  • Unknown
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current gold) Less than 100
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Unit - Pause (Triggering unit)
          • Wait 10.00 seconds
          • Unit - Unpause (Triggering unit)
 
Level 5
Joined
Jul 11, 2007
Messages
152
New problem unfortunately. If the spellbook has more than one build (building) everything works fine except for when placing the building it turns out to be whatever is first in line in the spellbook.
 
Level 11
Joined
Aug 25, 2006
Messages
971
You cant change order ids for abilities. It says you changed it, but its lying. It will still use the same orderid! There are only a few abilities that can actually change order id's Channel & spell book.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Extra Spellbooks

Is it possible to make a whole new spellbook for each building, and just force player key when the spell book is opened???

That way the spellbook ID's inside your builders spellbook will make it seem as if you ordered it to build a different building

*spellbook1
Is displayed to the user as the secondary menu

*spellbook2
There is one for every extra building, and is inside spellbook1

*building spell
Each spellbook2 has one of these, and the force-key action makes it seem as if there isn't a second spellbook
 
Level 5
Joined
Jul 11, 2007
Messages
152
I don't even get how to change the OrderIDs... I see them in the ability menu but am not sure how it all works together and how come spellbooks work for regular spells but not building spells then?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You cant change order ids for abilities. It says you changed it, but its lying. It will still use the same orderid! There are only a few abilities that can actually change order id's Channel & spell book.

Thats only the case if you make an action "Unit - Order unit to [cast your spell]".

If the player casts the spell changed IDs DO work.

And Maddawg101, try changing the "Text - Order String - Use/Turn on".
 
Level 5
Joined
Jul 11, 2007
Messages
152
So I've been messing around with the
Data Base Order ID, Text Order String Use/Turn on, and Text Order String Activate
None of them work as I wanted them to. The closes I got was when the Data Base Order ID was build and then I had 2 build menus but the same buildings in both
So to recap I have three abilities, spellbook, build buildingA, build buildingB
I can open the spellbook and both icons are there but unit being actually made is always whatever ability comes first in the spellbook.
I hope that makes more sense
 
Level 12
Joined
Aug 20, 2007
Messages
866
Nobody really answered my question,

But I know for a fact if you do what I said (spellbook ID's change w/o problem)
Then you could at least get a menu that has more than one building (it probably won't be too pretty, but it'll show up + can be used)
 
Level 5
Joined
Jul 11, 2007
Messages
152
Well the thing is you can only really use one building each time so you could keep doing spellbooks inside of spellbooks but at the end thered only be one building.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Exactly

One spellbook per building

This way when you build it, it builds only that specific one in that spellbook

Here

THE first spell book, is for the user to see

Then, you wanna build buildings, SO

You create ONE MORE spellbook, give it a random Order ID

Add a "Build Tiny Castle" (or whatever your custom build spell is)
To the last created spellbook

So now, you have the spellbook that shows up to the player
One inside of that
And the custom abile inside the second one

Now we create YET ANOTHER spellbook

Add your second build spell to it

NOW

When the user clicks the spellbook thats shown to him, there are two spellbook icons, when he clicks either one of them, there is ONLY ONE build ability in it, BUT he can use it w/o worrying about it not working

The point of the second level of spellbooks is to separate the build spells
_______________________________________

I'm not 100% sure if you can, but you can use a GUI function called "Force Key", so when the user opens the second layer of spell book, it automatically starts the spell inside, making it *seem* as if there is only one spellbook

I'm not sure, but maybe you can check for the spellbook open using starts the effect of an ability, but I really don't know

The user could still technically see the second menu if they click "cancel"

Anyway, the point is it IS possible to separate the building spells without messing too much with the Order ID's

_________________________________

I like Dragoons way of doing it, simply adding the desired spell
But, he wasn't 100% clear on how to do it
 
Level 12
Joined
Aug 20, 2007
Messages
866
Can I see it?

Could you by any chance send it to me???

I really wanna see it, I have never seen a secondary menu b4 :wgrin:

You could post it here if you'd like, just go to "Manage Attachments" in the reply menu, click it, go to browse, find your spell and click upload :thumbs_up:
 
Level 5
Joined
Jul 11, 2007
Messages
152
Its not really a second menu inside of the other one because having two different build menus is just as good because I can switch between them with a dummy unit. So I like it better, because with the second menu there was still problems of showing the cost of buildings and although I could subtract with triggers the two menus is great. :wsmile:
 
Level 12
Joined
Aug 20, 2007
Messages
866
Oooooooooooooooh

I see

You just added a second build spell ??? (Like Orc + Human instead of just Human)
 
Level 5
Joined
Jul 11, 2007
Messages
152
Nope I got really pissed and ditched what I was doing halfway through then the unit switching worked better than I hoped.
 
Level 9
Joined
May 27, 2006
Messages
498
People... There is a very simple method to solve this problem. Just make an AOE spell with short casting range inside a spellbook, when you use the ability, a dummy unit appears and starts building. Just add few actions that will force the casting unit to stay and build...

(Hope no one said that before? Didnt read the whole thread [cause some posts were just a wall of text])

@GhostWolf
Changing Order ID`s doesn`t work when a player is casting a spell. I tried it, created few abilities based on the same one, when i clicked on one of them, the rest activated too...
 
Level 12
Joined
Aug 20, 2007
Messages
866
@Raft

You know when you go to build a building, the target on your cursor is the building???

That was the effect I wanted to see, you could probably just do regular AoE's, but those have spell targets, making it look fake
 
Level 9
Joined
May 27, 2006
Messages
498
@Eleandor
Yes, thats exactly what i mean. You just use the AOE, to let the player know how big the building is and to determine the place, where he wants to build.

@Herman
I know there is a faded model of building you want to build, thats the only thing that i cant do this way... ;P But everything else works.

@GhostWolf
As far as i remember, its in "Unit - Order unit to (...)" :p
 
Level 5
Joined
Jul 11, 2007
Messages
152
Replacing units works for me and I'm not all that excited to go back and try the other variations. Raft_pl that sounds really complicated but it'd be awesome if you got it to work. Herman I'm still working out some problems but I'll upload a good version here soon.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
If you will do raft's idea without trying to show a faded building its really easy.

Event: A unit startes the effects of a ablity
Actions:
Set Point = point target of ability being cast
If/then/else
If - ability equal to building1
Then - create 1 dummy for (owner of (triggering unit)) bla bla bla
give last created unit BuildingItem1
order last created unit to use BuildingItem1 at Point (here you can make him use the original items with diffrent buildings, which shouldn't be bugged like normal abilities)
Now you can add some stuff so it will look as if the unit is actualy building it
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hm

Heh, if I wanted the map to seem more like your the manager, I'd have the unit building it a locust, and he spawns from somewhere

That'd be really cool, like having the building commissioner order where the structures will be built, and you could also make more than just one building

You could have like, a whole mess of towers and such

The possibilities are endless :wgrin:
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hmmmm

Yeah that'd be a real pain in the ass

Well, that wouldn't lag too much, for some reason if you use boolexprs in .01 sec triggers, it's as if it was turned off

I use those kinds of triggers all the time for movement
 
Level 12
Joined
Aug 20, 2007
Messages
866
I guess

I think you would need to use an outside program to mess with that part of WC

I don't really have a clue other than that
 
Status
Not open for further replies.
Top