HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

And/Or Techtree-Requirements

08-21-2011, 03:12 AM#1
jondell
Hello, I'm making a tower/unit castle defense. I am allowing the players to choose between a builder or heroes to defend a certain part of the map. I have limited the type of units a player to train to help defend another by making it necessary to purchase certain types of towers to train better units enforcing that towers must be built if you chose a builder. I am wondering if there is a way to make the same units available through a certain hero level. Either through a trigger or tech requirements of some sort.
|
|
Example: "Footman" requires a "Guard Tower" or "Hero Level 3" to train
|
|
The key part is "Guard Tower" OR "Hero Level 3"

Thank you in advance for you time i hope i can get an answer real soon. (I am sorry if there is already a threat like this, i have tried my best to look for one. If there is a threat to this answer a link will suffice. Thanks =D)
08-21-2011, 04:52 PM#2
Anitarf
This is tricky. Normally, if you add multiple techtree requirements to a unit, they must all be fulfilled. What you could do, however, is to make a dummy unit that is named something like "Guard Tower or Hero Level 3" and then use triggers to create such a unit for a player when that player's hero reaches level 3 or when that player finishes construction of a guard tower, whichever happens first.
08-21-2011, 06:00 PM#3
jondell
Ya, that is my problem. i was hoping there was an easier way to do this but i guess not. If anyone has any other solutions to this that would be much appreciated. Thank you for your time.
08-22-2011, 04:30 AM#4
jondell
How would i go about making a dummy unit spawn when a certain building is placed?

I have the dummy unit created and the tower i want to make it happen, i just don't know what trigger set to use.
08-22-2011, 05:12 AM#5
Kam
Event - Building finishes construction
08-22-2011, 05:23 AM#6
jondell
How about for a hero level requirement? i have the buildings down. those work just fine but the hero level doesn't
08-22-2011, 08:45 AM#7
Anitarf
Here's a simple trigger setup that should do the job:
Trigger:
HeroLevelReq
Collapse Events
Unit - A unit Gains a level
Collapse Conditions
(Hero level of (Triggering unit)) Equal to 3
Collapse Actions
Unit - Create 1 Hero Level 3 or Guard Tower for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
Trigger:
TowerReq
Collapse Events
Unit - A unit Finishes construction
Collapse Conditions
(Unit-type of (Constructed structure)) Equal to Guard Tower
Collapse Actions
Unit - Create 1 Hero Level 3 or Guard Tower for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing degrees
This will create multiple such dummy units if players create multiple towers or level up multiple heroes, in that case you could improve efficiency by using a global variable array to remember for which players you already created the requirement unit.
08-22-2011, 08:50 AM#8
jondell
Thank you very much for the hero trigger! i couldnt figure best way to do that