| 10-13-2008, 05:27 AM | #1 |
For those who are curious about my last thread about working with my stupid Puzzle, I chucked a fit at it because I managed to make a complete mirror of the GUI in Jass and it STILL didn't work. Not sure which one is at fault. Alrighty, as the title states - I have no idea where to start with the trigger I'd like to make. What I want to make is... - a script that creates events/triggers that pick up units taking damage - a script that destroys the created events/triggers when that unit dies I have no idea how to start this, and any help would be appreciated. Even if there's a GUI solution, I'd like it in Jass (but not vJass). Thanks ahead! |
| 10-13-2008, 06:03 AM | #2 |
I believe it is called a damage detection system... |
| 10-13-2008, 06:06 AM | #3 |
Well, in general, you need: 1. The initial trigger, which should pick all units on the map at the moment. 2. Another trigger, which would pick units entering map area. 3. Timer event, for cleaning up trigger and re-registering units. You can learn something from Griffen's damage detection - http://wc3campaigns.net/showthread.php?t=101865. |
| 10-13-2008, 06:31 AM | #4 | ||
Quote:
Find me a damage detection system that's both friendly towards people with low-to-moderate experience AND not written in vJass. Quote:
|
| 10-13-2008, 10:45 AM | #5 |
In Grim's script look at the function Swap, or look into Anitarf's ADamage system, he also cleans up his events. Edit: the only way to make that code look friendly to you is staring at it. for a long time. without drooling. |
| 10-13-2008, 11:38 AM | #6 |
Blargh, forget I asked. Seems I can't find a plain Jass solution. I'll come back to this one day, though. |
| 10-13-2008, 06:52 PM | #7 | |
Quote:
grim's solution looks to me like a 'plain' jass solution. The only functions you have to look at are Swap and Init, and, although they use vJass at two tiny parts - the func[] array and the private keyword - you should still be able to understand it, and be able to make it into 'plain' jass. |
