| 08-11-2005, 08:53 AM | #1 |
I'm making a triggered ability for CaQT and I need some help here. What I'm trying to do is get the spellcaster, spelltarget and spelltarget's owner (player 1 for instance), store them into variables (arrays actually, but..), then set a timer. Once the timer runs out, I want the spelltarget and player 1 to be picked and an action is done to them. The problem is, I need this trigger setting to run for quite a few abilities (let's say a hundred or more) at the same time. If I store the owner of unit and the unit into arrays, then: 1. how do I reference to them with a timer (once the timer runs out, how will the trigger now which unit to pick?) 2. Would it be possible to avoid using variables at all? And how? EDIT: Well, if it helps: I want the trigger to change ownership of spelltarget to spellcaster player. Once the timer runs out (or the spell is dispelled), I want the trigger to return spelltarget to original owner. It's a regular unit ability, so it has to be multicastable. |
| 08-11-2005, 11:54 AM | #2 | |
This is easy done in JASS. You don't need to store the owner. ( Owner of unit ) And you need 1 game cache variable. Here name Cache Quote:
This shoud be placed on global script when the spell executes do this Custom Script: call SpellGo() |
