| 12-11-2004, 05:24 PM | #1 |
Ok I was thinking of making a selectable merchant that deal only for the players that solve quests for him. But how to disable other players (that dont do quests) to buy from the same shop ? |
| 12-11-2004, 08:28 PM | #2 |
Well I tried to edit the Select Hero/Unit abilities. I changed the allowed targets field to allies only, but I had no luck with it. It would still select any hero that went up to it. Wish I could help more. |
| 12-11-2004, 08:30 PM | #3 |
You could set a boolean variable to true when they do the required quests. Then you could use: Code:
[color=Orange]Event:[/color] Unit - (the merchant) is selected [color=Orange]Condition:[/color] Boolean Comparison - (the boolean variable) equal to False [color=Orange]Actions:[/color] Selection - Clear Selection for (triggering player)[color=Yellow]///Maybe not triggering player maybe something else///[/color] |
| 12-14-2004, 06:24 PM | #4 |
Perhaps this might work but i'm not at my computer so i can't actualy test it. I was thinking instead of removing selection why don't just stop the player from bying what he needs (when he clicks buy, player (without permission) could get a message "You havent done...." and simply not give it to him, what he wishes to buy). |
| 12-14-2004, 07:11 PM | #5 |
I'm not sure if you can stop a purchase before it's completed. I know you can detect it, but to cancle it... You can always display the message, remove the item, and refund the player. |
| 12-15-2004, 12:14 PM | #6 |
Guest | There is a way. 1. First you will have to make a unit called the name of the mission ( the name doesn't really matter but will make it look better if it's the name of the mission). Give it locust and no model so no one can see it or harm it. 2. Then you must go to the item section of the object editor. 3. Find the items that you don't want the players to buy unless the have completed the mission. 4. Find Techtree - Requirements and set it to the unit you have just created. 5. Finally you will have find the trigger that you complete the mission with. Then just create the unit from step one somewhere on the map. Then it should be finish. ![]() |
| 12-15-2004, 08:50 PM | #7 | |
Quote:
A very nice idea... This could be of use for many things. However, is there a way to make the unit not show up on the minimap? Not that thats required but just to improve upon your idea some. Or wait... Does the locust ability do that? |
| 12-16-2004, 01:07 PM | #8 |
Guest | Yes it actually does. |
| 12-16-2004, 07:38 PM | #9 |
Another much quicker way is to do the following: Event: Merchant is selected Condition: Allowed[playernumber of triggeringplayer] = false Action: Make ______ item unavailabe for triggering player. (I think this action is only for WEU) |
| 12-16-2004, 07:52 PM | #10 | |
Quote:
Or you could just deselect the merchant it if the player number = false, so there is no way of selecting it to buy it |
| 12-16-2004, 08:38 PM | #11 | |
Guest | Quote:
That way is not idiot safe because if you are fast enough or/and use hotkeys it is possible to buy anyway. |
| 12-17-2004, 03:08 AM | #12 |
heh sounds like something in my rpg... anyways you'd do like unit enters within x of merchant create dialog show dialog player picks dialog yes player does quest player returns to merchant set player= merchantquest1 unit owned by merchantquest1 enters x of merchant change ownership of merchant to merchantquest1 |
