| 07-15-2008, 12:46 AM | #1 |
Hello, I'm new to these forums, and I have a question regarding how to make a trigger that does the following:
I know that JASS is an advanced scripting language (or something of that sort) for Warcraft 3, but it's something I don't understand. Thus, I would prefer help via GUI commands. I've gotten the removing the hero part down, but I still have the following problems:
Here's what I've got so far: How would I fix my above problems? Examples along with explanations would be appreciated! |
| 07-15-2008, 07:15 AM | #2 |
You should really read my tutorial for begging, it will help. Also, you need some events .. |
| 07-15-2008, 08:57 AM | #3 |
There, I added in lots of spaces and bullets... |
| 07-15-2008, 09:14 AM | #4 |
MMm, maybe this way of think can help: Event - Unit sells a unit (a Tavern per example) Condition - Selling Unit is Tavern bla bla abl Action - Remove Sold Unit from tavern - Move Sold unit to some position in map Then, when we do repick: Event - A player types a chat message containing "repick" as an exact match Action - Remove hero that player has - Add the heroe the player had to all taverns so people can buy it - Give gold to player - Allow player to buy new hero |
| 07-15-2008, 09:26 AM | #5 |
A potentially easier way is by changing the availiability: Make unavailiable: |
| 07-15-2008, 01:12 PM | #6 |
Ok, Alex's actions came in help. The problem is, I do not know how to get those actions to work. This is the same problem as before, except I have a more efficient actions. I need help with the conditions and events still... |
| 07-15-2008, 01:18 PM | #7 |
You'll probably want to make a unit array. When a hero is selected, set the array slot of the triggering players number to the hero. When a player types "-repick" the condition is that the array slot for that player does not equal no unit. Then run the make availiable actions followed by removing the hero unit. |
| 07-15-2008, 01:22 PM | #8 |
The first trigger should can be something like this: Trigger: The second, depends on your map's architecture. I would advise you to use a global unit array, to keep track oh which hero the player has. |
| 07-15-2008, 01:49 PM | #9 | |
Quote:
Trigger: I'm not sure if you can re-add the unit to marketplaces after you remove it this way, so I'd try the code Alexander244 suggested instead. Then, the repick code is easy, it would look something like this (I'm writing this from my head, so actual code may be worded differently): |
| 07-16-2008, 12:05 AM | #10 | |
Quote:
|
| 07-20-2008, 06:36 AM | #12 |
Ok, I got the spawn trigger to work right. But the repick one, no so much...When I repick It removes the unit from the map, and removes all heroes from the hero tavern. I'm assuming the problem is the variables? If there are 16 heroes, so i set variable size to = 1? or 16? Or is the problem something else entirely? |
| 07-20-2008, 10:48 AM | #13 | ||||||||||||
Well, the 'Variable size' (hence known as 'Array size') should be for each player, so if you haver 12 players, it should be size twelve. Sorry, but i failed to mention the variables i used: Variables:
The problem you had was either that you mixed up the variables, or you didnt realise what exactly they were (my fault ) |
| 07-20-2008, 11:05 AM | #14 |
On repick, you'll need to set the availiability of the hero to n+1, where n is the number of times the player has had a copy of that hero. So just set it to some massive number, and you're sorted. |
| 07-20-2008, 01:36 PM | #15 |
What? The avallibility is never changed, it just has the training limited, then un-limited. Why would you use that? The hero is already removed from the game, ie destroyed for ever, so they have 0 of that unit, making them able to build another one. |
