| 09-01-2004, 07:55 AM | #1 |
Hi! I got some question, if any1 knows... well 1) any1 knows how to order a building/tavern to train a random hero? 2) How can i make my units gain gold when killing an enemy? (like td mods) I tried : [player-bounty blabla gain ON for player(#)] But didn't work as i thought. 3 and most important) How cai i apply my upgrades to another player's units. Imagine i finished an upgrade and i want it on my allied's units. How can i do that? Is this possible? 4) I can't use my spells against my allies! I want to do it as they were mine! 5) The players in my server can play as player10, and player10 is a computer! how can i disable that!? Ok, no more. Thanks people!! pd: Yes, i'm new here... i like this place very much. And yes, i'm not good enought writing in inglish. I'm Argentinian ;) that's why. c ya. |
| 09-01-2004, 02:28 PM | #2 |
2) In Object Editor there is a section under every unit that allows gold to be awarded to the killing player. Code:
i) Stats - Gold Bounty Awarded - Base ii) Stats - Gold Bounty Awarded - Number of Dice iii) Stats - Gold Bounty Awarded - Sides per Die ii) Adds to the base gold awarded depending on the number of dice a unit has. iii) Adds to the base gold awarded depending on the sides per die a unit has. If you want maximum usage of the bounty system then use this formular as a guidence. Code:
G = Gold Awarded. N = Gold Awarded for Number of Dice S = Gold Awarded for Sides per Die B = Base Bounty Awared. X = Unit's Dice Y = Unit's sides per Die [u] [/u] G = B + N.X + S.Y 5) In Scenario>Force Properties check the box on the top left hand corner called "Fixed Player Settings". Bare in mind that this also restricts players from choosing races and colors, etc. Note: Inorder to have fixed player settings it requires custom forces to be on. I tried to do 1), but there seems to be no way of making the tavern hire heroes. I'm not sure about 3). 4) is more about spell editing. Using "targets Allowed". Not all spells can be made to target allies. Hope this helps. ![]() |
| 09-01-2004, 03:44 PM | #3 |
1st of all, you need a integer variable. On the trigger editor, click the orange x, then the green x, name the variable, click the scroll bar then go down to integer, then click ok and click ok again. Trigger: Code:
Just make the event and conditions to whatever.
Actions
Set integer variable = Math - Random # between 1 and (# of heros in total)
If integer variable = 1
Then Train 1 Drow Ranger from Tavern <gen>
Else Do nothing
If integer variable = 2
Then Train 1 Beast Master from Tavern <gen>
Else Do NothingJust keep doing that 4 all the heroes. (I'm not sure if Code:
Train hero from Tavern <gen> |
| 09-01-2004, 03:47 PM | #4 |
In the object editor, go down to targets (it's the last 1 in stats). Then just check off allied and friend (i'm not sure which 1 you need so check off both). That should let you target your allies. Another way you could do this is uncheck enemy. |
| 09-02-2004, 11:36 AM | #5 |
It doesn't work, there is no way to order the tavern to hire heroes, well no way with the UI atleast. Buggs me a little. Maybe through JASS there is, try asking people in the JASS forum. |
| 09-02-2004, 11:49 AM | #6 |
native IssueNeutralImmediateOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId returns boolean With that native you can order a unit to buy a hero from a tavern. Move close enough with the unit and then use: call IssueNeutralImmediateOrderById(udg_my_player, udg_my_tavern, 'Npbm') udg_my_player should contain the player for which you want to buy, udg_my_tavern should contain the tavern unit and the last parameter is the 4-letter-code of the hero you want to buy (in this case the brew master). |
| 09-02-2004, 12:13 PM | #7 |
You could create a unit with 100% transparency and locus ability next to the Tavern then use the Jass order code AIAndy said to hire a unit from the tavern, then, if you liked, you could change the ownership to whom ever you desire. ![]() |
| 09-03-2004, 11:22 AM | #8 |
wo! Lots of answers! I appreciate it. The fact is that i worked it out the same way you answered. I expected an easy way, too much triggers may lag a little, you know. Spadez, the [G = B + N.X + S.Y] helps me, thanks. I was wrong 'bout gold awards, it works good. i mean [player - turn gives bounty on for (player)] Duck, i tried your way, but i'm looking for an improved way. Right now i'm setting [targets allowed] for each spell, i couldn't find another way. ;/ I was able to disable player10 (computer)! just as spadez said. How was i supposed to know? world edit still has strange things 4 me ;] A question: Can i upload my mod?? Still i can't apply my upgrades to my ally. That is taking me too much time... i can solve it. Thanks to all!! pd: It helps me a lot knowin' i'm making a mod to play with mates like u, guys. I'm glad with your help! truly! SET HowIsMyEnglish? = VALUE ;] :8 |
