| 07-04-2006, 04:39 AM | #1 |
For some strange reason while I was looking through the search, I couldn't find anything that directly related to this problem. And when I did, someone said it was so outdated that it should get deleted. So, why not directly ask: How do you make a GUI triggered spell Multi-Instancable? And(they are probably the same or just because I feel like it), how would you do the same with JASS code? |
| 07-04-2006, 06:47 AM | #2 |
Try to not use waits and similar stuff, that could do the thing. With jass you can use local variables and gamecache...You gotta read some tutorial about jass better... |
| 07-04-2006, 07:22 AM | #3 |
you can make the globals locals I think, Vex made a tut on this If I remember right. But it's something like this: local unit udg_Hero = GetTriggerUnit() where "Hero" is your global variable |
| 07-04-2006, 07:22 AM | #4 |
To make a GUI spell multi-instancable, all you have to do in my opinion is make all of your globals into locals. Example: Not Multi-instancable: (I used a global unit, Target) Trigger: Multi-instancable: (I use a local unit Target) Trigger: Weird Spell
I kept the same spell, but where the target was needed, i converted to custom text, found the line which each of the other lines was refering to, copied it, and pasted it into a custom script, changing the udg_Target to Target. Thats a good way to start. EDIT: Added a line to nullify Target |
| 07-04-2006, 07:27 AM | #5 |
Would that not leak at all? |
| 07-04-2006, 07:31 AM | #6 |
No, not from what i can see of. EDIT: I surpose you could set Target to null because its dead now, and it is a local. I will change it. |
| 07-04-2006, 07:32 AM | #7 |
Trigger: Weird Spell
|
| 07-04-2006, 08:22 AM | #8 |
Prehaps this kind of stuff should get stickied for future reference... Thanks a lot you guys. |
| 07-04-2006, 08:47 AM | #9 |
Simpler, like thunder_eye said: Trigger: ![]() Custom script: local unit udg_TempUnit = GetSpellTargetUnit()![]() Wait 5.00 seconds![]() Animation - Play TempUnit's attack animation![]() Wait 2.00 seconds![]() Unit - Kill TempUnit![]() set TempUnit = No UnitAnd naw, it shouldnt get stickied since there are tutorials about it. If you wouldve searched you wouldve found this: http://www.wc3campaigns.net/showthread.php?t=34204 |
| 07-04-2006, 09:04 AM | #10 |
Well, pardon me. It's too late now, isn't it? Besides, I wanted this to be direct, not with a bunch of other things in the way. |
| 07-04-2006, 10:27 AM | #11 | |
Quote:
Yea you could trick the editor with udg_name, but you can only do that 1 with variable. I dont think its easier anyway, its a long method for a short result. |
| 07-04-2006, 11:01 AM | #12 |
Basically, it is not really possible to make a multi-instancible GUI spells because in the end, the customs scripts and locals are actually jass, u still have to know Jass to make a GUI spell multi-instancible, kinda ironic. But i can suggest that you learn jass, it is seriuosly much faster, but other than that, i can find no other way other than those TideHunter) and infared had suggested : Custom Scripts |
| 07-04-2006, 11:14 AM | #13 |
Funny is that custom script is JASS, so if you're gonna use custom script that much, you can just learn JASS instead. |
| 07-05-2006, 06:18 AM | #14 |
Actually, I kind of already knew that Multi-Instancability had to be done in JASS. I just wanted to confirm it. I've read some of the basic tuts for JASS. I sort of understand it, I guess. Although, I can only learn so much in a day. So, I'm trying to learn nice and slow, otherwise everything I read to myself goes into one ear and goes out the other. Yes, and I already know that custom script is JASS. Thanks for saying it though, everyone. |
| 07-05-2006, 07:47 AM | #15 |
Back when I started making my arena map, I didn't use Jass, but my spells were still 100% multi instanceable, so it's quite possible to do in GUI - possible, but of course using Jass is way more optimized. I started using Jass scripts for memory leak destruction long before I started using local variables. |
