| 09-19-2008, 07:55 PM | #1 |
I sat down to try and sharpen my JASS back up to a working standard only to realize how out of the game I am. My intent was to write a simple trap ability, that when used at a point would place an invisible trap down. Then use a timer to detect when a unit comes within 200 units of that trap, check if the unit is an enemy/neutral and then use a dummy caster to ensnare that unit. The problem I'm running into is whether or not to use a timer system (like TT). TT describes that its only to be used for rapid timers <0.1sec expiration time, which wouldn't be necessary for my implementation (probably .3 - .5 would be fine). Also as I side note I was interested in writing it using the xe modules, which is a whole other level of questions I run into. |
| 09-19-2008, 10:06 PM | #2 |
Check out other Timer Systems is my advice. |
| 09-19-2008, 10:23 PM | #3 |
In your advice? What advice? |
| 09-19-2008, 10:55 PM | #4 |
| 09-20-2008, 12:04 AM | #5 |
No don't use that. That's 2 years old. Use Vexorian's TimerUtils library in the Code section of the Resources. |
| 09-20-2008, 03:29 AM | #6 |
Would it not be simpler to just use a summoning spell with 0 duration, to summon the trap wherever. Make the trap a unit with no movement and 200 range. Catch when the trap attacks (or damages if you're that way inclined) and then trigger the ensnare, remove trap, done? |
| 09-20-2008, 04:10 AM | #7 |
That is the easiest approach for non-timed traps. Just give the trap a 1-1 attack (if you want to trigger the damage all yourself) and detect its attack, then do stuff. |
