| 08-26-2004, 07:18 AM | #1 |
A long time ago someone posted a spell called Call Dragon. Basically, a unit would cast the Call Dragon ability, a dragon was created--a special effect added to it's chest using the unit that casted it, and then the caster was removed. Obviously, this gave the illusion that the caster mounted the dragon. Then, the dragon had a dismount ability, which would simply destroy the speciall effect and create a new caster unit, and the dragon would fly away. Well, this thread is long gone so i'm stuck trying to figure out a good way to trigger this myself. I've got it down, up to the part where the caster "mounts" the dragon. The only thing is i'm trying to make it multi-caster friendly. The bug i'm facing is this: a caster, or multiple casters casting it at the same time, can cast the spell flawlessly. But then, you try to do it again with a caster or multiple casters casting it at the same time, and the dragon is created, and it moves to the casters location, but nothing happens after that. THEN, when you cast it AGAIN, it works on the new caster(s) AND the spell triggers for the old casters, allowing them to "mount" the dragons. Lol, I hope that's not to confusing. Here's the triggers (Event/Condition not included): Set Caster[CDragonINT] = (Casting unit) Unit - Create 1 Dragon for Neutral Passive at ((Position of Caster[CDragonINT]) offset by (1000.00, 200.00)) facing (Position of Caster[CDragonINT]) Set CDragonUnit[CDragonINT] = (Last created unit) Set CDragonINT = (CDragonINT + 1) For each (Integer A) from 0 to 10, do (Actions) Loop - Actions Unit - Order CDragonUnit[(Integer A)] to Move To ((Position of Caster[(Integer A)]) offset by (20.00, 20.00)) For each (Integer A) from 0 to 10, do (Actions) Loop - Actions Wait until (((Rect centered at (Position of Caster[(Integer A)]) with size (200.00, 200.00)) contains CDragonUnit[(Integer A)]) Equal to True), checking every 0.20 seconds For each (Integer A) from 0 to 10, do (Actions) Loop - Actions Animation - Change CDragonUnit[(Integer A)] flying height to 0.00 at 100.00 Wait 1.50 seconds For each (Integer A) from 0 to 10, do (Actions) Loop - Actions Special Effect - Create a special effect attached to the chest of CDragonUnit[(Integer A)] using units\undead\KelThuzadGhost\KelThuzadGhost.mdl Set CDragonSFX[(Integer A)] = (Last created special effect) Unit - Change ownership of CDragonUnit[(Integer A)] to (Owner of Caster[(Integer A)]) and Change color Unit - Remove Caster[(Integer A)] from the game Animation - Change CDragonUnit[(Integer A)] flying height to (Default flying height of CDragonUnit[(Integer A)]) at 100.00 Set CDragonCasterP4[CDragonINTP4] = No unit Set CDragonUnitP4[CDragonINTP4] = No unit Set CDragonINTP4 = 0 Because of that wait bug in loops and such, it had to be more complicated then it should be. Any advice on this would be very much apreciated. Thank you! |
| 08-26-2004, 08:41 AM | #2 |
wrap the triggers in code also variables wont set it for the unit that casts it, if someone casts again that variable is overwritten and wont work. also try using, pick all players and do actions, then use picked unit as triggering unit |
| 08-26-2004, 02:02 PM | #3 | |
Quote:
Thanks for the help! But I have a few questions. I feel a bit stupid asking this, but i'm still a noob. What do you mean by wrap the triggers? When someone casts it again and the variable is overwritten, the old caster is overwritten, so it shouldn't make a different, right? Or is that not what you mean? Last, but not least, use pick all players/units for what? I have to be careful with that, because I don't want the old dragons coming towards the unit or anything. |
| 08-26-2004, 03:49 PM | #4 |
I and a few other ppl made that spell |
| 08-26-2004, 04:00 PM | #5 |
mmk, here is the thread...for some reason my last version of the map isnt in there that I saw...it had an edit mdl of an archer that made it not walk, hmm....for now just dl my map and then read the very last post and do what it says and it will look fine http://www.wc3campaigns.com/showthre...light=mounting |
| 08-26-2004, 04:27 PM | #6 |
When I want to script that a sound is played in game, it almost always doesn't work, even if with the script-order "Set Sound-Volume of <Sound> to 100%" before the order "Play <Sound>". What to hell is my problem??! -RealMods- |
| 08-26-2004, 04:50 PM | #7 |
Haha, well I had hoped to do it myself but whatever it takes. Thank you much! Edit: Wow, that map is actually the original map where I got the idea. How funny. The problem is, it's not multi-caster friendly. That's where my troubles lie. Thanks anyway, but my question still needs answering. Edit2: ahaha! I actually got it working, it was that dumb wait until rect contains unit trigger. Thanks for the help and all. |
