| 09-13-2006, 12:09 PM | #2 |
Im not sure, but i think the problem is that you are using (Casting Unit) in the triggers. I reccommend using (Triggerimg Unit). Its easier, and faster, and aint lost after a wait. Also, wait commands is inaccurate, maybye you should run a timer and deal the damage when it expires. Ill try make the spell just as you have your triggers, and then i try figure it out. EDIT: Sry im a bit lazy right now, may you just give me a map with the spell, and ill see what i can do? |
| 09-13-2006, 12:12 PM | #3 |
| 09-13-2006, 03:40 PM | #4 |
Ultra Ninja Edit: I did some tests, and found out some really weird behaviours while using "fake local-global variables": Test Map: - Cast Banish on Mountain King This means, you must not use a global variable and turn it into a local, like that: JASS:local unit udg_spelltarget = udg_spelltargetglob JASS:local unit spelltarget zeroXD is correct too. In order to prevent funny problems with Waits, use as much "Triggering Unit" as you can. |
| 09-14-2006, 09:46 AM | #5 |
How do you use timers for waits anyway? I've been hunting around the JASS tuts but it all looks like gibberish to me. |
| 09-14-2006, 10:44 AM | #6 |
I think it should work the same way you used the Trigger: Trigger - Run Mind Crush FX <gen> (ignoring conditions)Trigger: Countdown Timer - Start Timer mind_crush_timer with an Exiration Time of ((Distance between temppoint and temppoint2) / 600.00) secondsand give the Mind Crush FX Trigger and event Trigger: Time - mind_crush_timer ExpiresIf you want to use JASS, make a new Trigger, put in the GUI-Function you want to JASS and turn that trigger into custom scripts. There you will see something like JASS:call blabla(udg_spellcaster,blabla,blabla) Trigger: Custom script: call blabla(spellcaster,blabla,blabla)Trigger: Custom script: local unit udg_spellcasterTrigger: ![]() Custom script: local unit spellcaster = udg_spellcasterglob
![]() ...
![]() ...
![]() Custom script: call blabla(spellcaster,blabla,blabla)Trigger: ![]() Custom script: local unit spellcaster = udg_spellcasterglob
![]() Custom script: local unit spelltarget = udg_spelltargetglob
![]() ...
![]() ...
![]() Custom script: call UnitDamageTargetBJ(spellcaster,spelltarget,udg_Real2,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_UNKNOWN) |
| 09-14-2006, 06:04 PM | #7 |
The problem with the global->local trick is that it can only be done with one variable, do it with multiple and they will all somehow share the same memory adress. |
| 09-15-2006, 01:27 AM | #8 |
The problem with doing it that way UnMi is that i want this spell to be multi-instancable. So i need it to use a local timer, also as far as i'm aware local variables can only be used inside a trigger, not transferred from trigger to trigger, so i can't have the pause or whatever outside the trigger, as that leaves a possibility for the two global variables i use to transfer the target and caster from trigger to trigger will be overwritten mid-cast and cause all kinds of havoc. |
| 09-15-2006, 02:36 AM | #9 | |
Quote:
Not with the local handle vars thing you were asking that other day. |
| 09-15-2006, 07:45 AM | #10 |
Wha? |
| 09-15-2006, 09:44 AM | #11 |
... If you want to make a multi-instancable timer, you will have to use 100% JASS. It's not hard to implement though, all you would do is copy paste. The problem, as zeroXD mentioned, is that Wait actually eats some delay, thus delaying the damaging point too. |
| 09-15-2006, 10:37 AM | #12 |
I'm already using 100% JASS, i figured it'd be easier to just make the trigger in GUI, convert to JASS and then switch the bits i needed to be locals and so on into what they should be. |
| 09-15-2006, 11:03 AM | #13 |
Uh, so where was your problem again? >>; |
| 09-15-2006, 11:20 AM | #14 |
I don't know how to use a local timer to activate the actual damage function. Ideally i'd prefer if it did a 'wait until target has buff Mind Crush' as that assures that the damage will only occur when the bolt actually hits as opposed to when it should hit. |
| 09-15-2006, 08:49 PM | #15 | |
Oh, now I see what you meant by Quote:
|
