• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help With Making Buildings Require Items For Upgrade?

Status
Not open for further replies.
Level 2
Joined
Jul 9, 2012
Messages
8
hey ive been out of map making for some time but recently returned to it and am coming along with my project nicely, however iv hit a snag i need buildings to require a certain amount of specified item(s) to get them to upgrade from a foundation type dummy building. Here is one of the things ive tried doing to get them to work i know its probably a noob mistake im making but ive tried several variations and triggers an to no a vale just wondering if someone would care to show me where im going wrong... :) Cheers DROPKICK :thumbs_up:


Untitled Trigger 003
Events
Unit - A unit Begins an upgrade
Conditions
(Unit-type of (Constructing structure)) Equal to Hovel level 0
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Matching unit) has an item of type Thatching) Equal to True
((Constructing structure) has an item of type Wooden Beams) Equal to True
((Constructing structure) has an item of type Stone Blocks) Equal to True
Then - Actions
Do nothing
Else - Actions
Unit - Order (Triggering unit) to Stop
 
Level 2
Joined
Jul 9, 2012
Messages
8
Can you design the trigger for me so that i can just edit [unit] and [item] then copy it in text, as im unsure as to how to apply behaviours and im not using a morph ability..?
 
Level 36
Joined
Feb 5, 2009
Messages
4,630
in what world did he even mention starcraft 2?
sometimes i think your moderation position gets to your head :p

the order you're issuing for the stop is incorrect. that would only apply when, for example, a unit is about to perform an action such as Attack, Move, Attack Move, any of the spells... but not researches :p

what you want is a method that actually stops the research (hmm that may be too obvious :p)
after checking, there doesn't appear to be an actual command for that. however, i believe this should work:

- Set the maximum research level of that upgrade to 0 (or, if you want the research to have multiple levels, set it to whatever the current maximum research level is and minus 1 via the arithmetic operator)

- Set the maximum research level of that upgrade to 1 again (or the current max research level + 1)

If that doesn't work, let me know. If that does work, let me know. Good luck :)

Also, since this is in the Introduction section, welcome to the hive :3
 
Level 2
Joined
Jul 9, 2012
Messages
8
Right you are Wazzz im using War3 not starcraft.. I couldnt make that idea you said work as there are only trigger functions for research and none in place for an upgrade like the scout tower > cannon tower for e.g.
I tried a different approach and here is what i came up with... (also in the past i have made something similar to this work for producing items using recipes but dont have access to the old maps!)
Would appreciate any additional help on this as its halted my designing of my take on the Teching side of my project...
:)


Untitled Trigger 003
Events
Unit - A unit Begins an upgrade
Conditions
(Unit-type of (Triggering unit)) Equal to Hovel level 0
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has an item of type Thatching) Equal to True
Then - Actions
Do nothing
Else - Actions
Wait 2.00 seconds
Game - Force Player 1 (Red) to press Escape/Cancel
 
Last edited:
Level 36
Joined
Feb 5, 2009
Messages
4,630
In what world did he not? Clearly not in his original post and the fact it was posted in Introductions means no game was implied.

1. Introductions is a section in the Warcraft 3 part of hive. If he wanted help with Starcraft, I am sure he would have posted in the Starcraft section.

2. The trigger work is nothing like that of Starcraft 2.

3. Rather than asking him what game he meant, you assumed that he was referring to Starcraft 2. On top of which, you discouraged the idea of him making a good Starcraft 2 map.


Back to the matter at hand, I believe the Wait command is set for too long. Setting it to 0.01 seconds should be sufficient (although I believe there should be better ways of executing the code, I think this way is sufficient enough, at least it is until a better solution is given :p)

I did think of forcing the Escape Key, but upon looking briefly and not finding anything, I figured it might not have existed :p
Glad you found it :3

Oh, also you will want to change Player 1 Red for the owner of the researching/triggering unit. It may be difficult to figure out how to do this, let me know how you go with just Player 1 Red though :3
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
1. Introductions is a section in the Warcraft 3 part of hive. If he wanted help with Starcraft, I am sure he would have posted in the Starcraft section.
It is section in the Off-Topic side of the site.

2. The trigger work is nothing like that of Starcraft 2.
Did not bother reading it as his problem specification would clearly not need any triggers in SC2.

3. Rather than asking him what game he meant, you assumed that he was referring to Starcraft 2. On top of which, you discouraged the idea of him making a good Starcraft 2 map.
It was not clear what game he meant as he posted it in the wrong section without any definite references to a game.
 
Level 2
Joined
Jul 9, 2012
Messages
8
So what would the unit type be in the trigger condition ive tried changing all the functions i have tried setting it as (triggering)) (ordered)) (constructed)) (matching)) (researching)) and not one of them work in the sense of allowing the upgrade to finish. the Else actions (Aka canceling the upgrade) play out with whatever building i try upgrading now... I still require further assistance with this asap
I muchly appreciate taking your time to help meee :D


Untitled Trigger 003
Events
Unit - A unit Begins an upgrade
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Hovel level 0
Then - Actions
Do nothing
Else - Actions
Wait 0.11 seconds
Game - Force (Owner of (Triggering unit)) to press Escape/Cancel
Game - Display to (All players) the text: Error: Do Not Have ...
 
Level 2
Joined
Jul 9, 2012
Messages
8
Tried and failed... :/ I dunno what else to say i cannot figure a way to upgrade a building requiring an item or even get specific buildings to cancel if they don't meet the requirements.. Sigh if you know anyone else who may be able to contribute any suggestions or solutions to my dilemma id really really appreciate it! :'(
 
Level 2
Joined
Jul 9, 2012
Messages
8
well i need diffrent buildings to require items for e.g
My Hovel Level 0 Needs Wooden Beams, Stone Blocks And Thatching To upgrade
So i must ensure that unit that is holding items is equal to (Hovel level 0)so in format the conditions must check that (Unit manipulating item) is equel to hovel level 0 and then check (unit manipulating item) item is equal to (wooden beams) etc etc
and the cancel thing is working fine its just i cannot make the editor detect what unit is using the upgrade...
 
Status
Not open for further replies.
Top