HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I'm outta ideas

07-12-2004, 12:43 PM#1
Zeal_
Well i need to know a trigger that when ever you build a specific building, you have to build in the radius of another building.what trigger could i use? i'll use an example
protoss buildings are built near phylons but the nexus is not. thats an example.

i need a trigger that can help me with this.

thank you in advance,
07-12-2004, 12:57 PM#2
johnfn
That would be pretty difficult. Im thinking something along the lines of this:

Variables:
CanUBuild - boolean - set to false

Events:
A unit begins construction of a building
Conditions:
(building under construction) is a (type of building that needs to be in the radius)
Actions:
unit group - for every (pylon type unit) on the map
If (building under construction) within range (500) of (picked unit) then
CanUBuild = true
else, end if
if CanUBuild = false then
unit - kill (building under construction)
Game - display to player (owner of (building under construction)) "Must build near a pylon..."
end if

Thats the general layout, you'll have to fix that to the WE. Of course that immidately destroys the building, you probably want to do something else.
07-12-2004, 01:06 PM#3
Zeal_
Alright i'll try it... i'll get back to you in 15 minutes.

Edit: Actually The condition of that type i cant find....... Could you clear that up for me?
07-12-2004, 01:54 PM#4
johnfn
I'm pretty sure its actually a unit comparison comparing the two buildings (buildings count as units)


Edit:
@Anitar- Yeah, thats what I meant.
07-12-2004, 02:21 PM#5
Anitarf
It's a unit-type comparison.
07-12-2004, 03:20 PM#6
Zeal_
ty. its greatly appreciated.

but. i have no idea which actions those are :\
so i'l try to find them.

and i'll change the kill" to pause. then i'll try to find a trigger to unpause it
07-13-2004, 09:33 PM#7
Zeal_
Could some 1 help me this trigger.

a unit is going to use a spell, and one of the buildings in your base will play an animation.

nothing is pre-placed so its prolly all gonna be variables.


and i still dont get that other ones plz you will be geatly appreciated.
07-14-2004, 05:52 AM#8
Anitarf
Events:
A unit begins construction of a building event - generic unit event
Conditions:
(building under construction) is a (type of building that needs to be in the radius) unit-type comparison
Actions:
unit group - for every (pylon type unit) on the map unit group - pick every unit in region matching conditionand do actions
If (building under construction) within range (500) of (picked unit) then general - if/then/else multiple functions
CanUBuild = true general - set variable
else, end if
if CanUBuild = false then if/then/else + boolean comparison (CanUBuild = boolean variable)
unit - kill (building under construction) unit action
Game - display to player (owner of (building under construction)) "Must build near a pylon..." game - display text (it's the first action under "game")
end if