| 12-30-2006, 12:32 AM | #1 |
ERUIKA!!! Insted of being lazy and asking I tried to write my own trigger. I can't test it now though so I'm gonna ask if it looks like it will work. First a few things you should know: A spell called build barracks is incorporated to build a barracks. The cooldown time for build barracks is 45 seconds. When it is cast the price of what a barracks would cost is deducted through triigers (I know how to do that). The "disable barracks" and "rework" triggers are intially off. I want the disable and rework triggers to allow players to cancel building buildings so it is more like command and conquer.When build barracks spell is cast the trigger will go something like this: Event: An ability is cast. Condition: Ability is equal to Build Barracks equal to true. Actions: 1. Wait 45 seconds then create barracks for triggering player at target location. 2. Enable "disable barracks build trigger" 3. Take 500g and 150w from triggering player. This is so it has the "Command and Conquer build sort of thing. Now hot to cancel it: Event: A chat is sent( or whatever it is I know its there) saying: cancel barracks. Action:1. Disable "build barracks" trigger 2. Enable "rework barracks trigger" 3. Give 500g and 150w to triggering player 4. Reset cooldown for "build barracks" (I've seen this done but I am not sure how) Heres the rework that should reset it. Event: None Condition: None Actions: 1. Wait .1 seconds 2. Enable "build barracks trigger" 3. Disable this trigger This is purely a shot in the dark and I'm asking you uys because I can't test it. So if you could tell me if this would work or if it wouldn't that would be cool. If it doesn't would someone tell me why and what I can do to fix it. I'm so proud I attempted to write my own. |
| 12-30-2006, 01:26 AM | #2 |
Did you mean Eureka? You need to post the exact code, go to the top of the trigger, right click the first item, and hit Copy as Text, then paste it. Since you did not do this, I am not sure, but the first trigger will not work if that is (Target Point of (Ability)). Target Point of (Casting Ability) is a global variable within the game, so whenever a ability is cast, its reset to the target point of that ability. You have a 45 second wait, so unless absolutely no abilities will be used within that time, the trigger will fail. To fix this you must either create a global variable to be used for each trigger session, or use local variables. Local Variables are made with Custom Script and are variables that will exist within only 1 trigger session, there should be at least 1 tutorial in the tutorials section. |
| 12-30-2006, 01:33 AM | #3 |
Yeah I ment eureka...lol. So I'll se about the umm what where they...wait... oh yeah local and global triggers but other than that how does it look? And about the actual code... I can't get it now but when I'm able I'll put it down. |
| 12-30-2006, 02:18 AM | #4 |
The "Build Tiny Town Hall" abilty is rather useful, and it seems like you could use it, though I could be way off. It allows any unit to build any specific building, even if it isn't a pesant. Maybe that'll help. |
