| 08-30-2003, 08:31 PM | #1 |
I have a list of questions that I have gathered over the last few days, and here they are: 1. I have a secret character (actually a number of them) that are unlockable by getting a certain amount of kills as a certain unit. For example Player (1-12), gets 150 kills, using a Unit A (and only unit A), they are sent a message with the code for the secret character. How is the best way to set that up? 2. I want to have an armory that includes lots of different items for sale (duh). Swords do a specific effect, axes do a specific effect, bows....etc. What I want to do is make it so that If a person has a sword, they cant have an axe or bow. If they have an axe and pick up another axe, if the item is better they drop the old one, if the new item is worse they leave it. How do I do that? Id like to do the same with armor, shields, and helms. 3a. I want to set it up so that the ranged items you can buy add to your attack range. I cant do the replace/hide unit way of doing this because I would have to duplicate every hero in the game, at least 3 times (3 levels of bows available). How can I go about that? How can I set it so that if a person has a human bow the range bonus is 100, elven bow the range bonus is 175, and crossbow the range is 250. I had thought about giving every unit a second attack that is enabled with these items, but that would only work for one. 3b. Is there a way to only allow ranged units to use the bows, and only melee units to use the melee items? Ergh I think there were one or two more questions, but I cant remember them right off hand, so Ill get these answered first. I appreciate anyone who can offer some help on these, cuz they are quite hard I think. EDIT: Gah I knew there was more to it. Revised a question and added another. |
| 08-31-2003, 01:43 AM | #2 |
1. Easy enough, just send a message once a person gets 150. Turn on the proper trigger so that when they type the password, they get the special unit. Make sure you set up a way to check that only the person sent the message can type the pword and get the hero. 3b. Best way for this might be to assign a custom value of 1 to all ranged units and 2 to all melee units. Then, depending on the value, you can keep the bows from going to melee units and vice versa. If you are already using the custom value, depending on how your map is set up, you can use food produced or food used, if those aren't important to your map. 3a. The only way I can think of to do this is just check what items the unit is holding. Possibly you could first check to see if they are a ranged unit or a melee unit. Then, for example a ranged unit, you would check to see if the bow they are buying is a lvl 4 bow, then you would check for bow 1-3. If they have that, then drop bow, add new bow. If the bow is lvl 5-10, then you wouldn't do anything. Basically you'd have to check for each type of bow that is weaker or stronger then the bow they are trying to pick up/buy. Same with armor. |
| 08-31-2003, 01:54 AM | #3 |
1. I know how to tell the person the code, Im asking how do I keep track of the kills from one specific unit and further seperated by specific players. Thanks for the other answers though, do you have a more trigger in-depth answer to get me started? That is really what Im asking for, an example trigger for each, so that I can go from there. |
| 08-31-2003, 02:47 AM | #4 |
Here, try this. Code:
Events -
Unit - A unit Dies
Conditions -
(Owner of (Dying unit)) Equal to (The Computer)
(Owner of (Killing unit)) Equal to Player 1 (Red)
(Killing unit) Equal to (Your Hero)
(Unit-type of (Dying unit)) Equal to (Footman)
Actions -
Set KillsP1 = (KillsP1 + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KillsP1 Equal to 150
Then - Actions
Trigger - Turn off (This trigger)
Game - Display to Player Group - Player 1 (Red) the text: Congratulations. Yo...
Else - Actions
Do nothingMake a trigger like that for each player. I hope this works/helps you. |
| 08-31-2003, 07:19 AM | #5 |
Allanon once again you rock. Thanks for your help. Do you have any thoughts on how to make items that add to the units attack range? Thats the only thing still giving me trouble. I think everything else in this thread is pretty much solved. |
| 08-31-2003, 08:43 AM | #6 |
Events - Unit - A unit Dies Conditions - (Owner of (Killing unit)) is in SecretHeroGroup equal to False (Owner of (Dying unit)) Equal to (The Computer) Or - Any conditions are true - (Owner of (Killing unit)) Equal to Player 1 (Red) - (Owner of (Killing unit)) Equal to Player 2 (Blue) - (Owner of (Killing unit)) Equal to Etc... (Killing unit) is a hero equal to True (Unit-type of (Dying unit)) Equal to (Footman) Actions - Set Kills[Player number of (Owner of (Killing unit))] = (Kills[Player number of (Owner of (Killing unit))] + 1) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Kills[Player number of (Owner of (Killing unit))] Equal to 150 Then - Actions Player - Add (Owner of (Killing unit)) to SecretHeroGroup Game - Display to Player Group - Owner of (Killing unit) the text: Congratulations. Yo... Else - Actions Do nothing SecretHeroGroup is a Player Group variable, holding every player that has got +150 kills. If you never decrease the Kills amount in any trigger, you can remove the "Add to player group" and "If player is in player group" action & condition, as it won't be needed then. I revised the trigger a little to have it react on several players. |
