Aller au contenu

Photo

Lightning > Chain Lightning


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Kesaru

Kesaru
  • Members
  • 130 messages
I'm trying to change Lightning and Chain Lightning so that Chain Lightning is a passive ability which transforms Lightning to use it's effect. I'm really lost on how to do this though.
I've done similar things with many other abilities already, but the problem with this is that the two spells use completely different scripts with completely different format.
In the past, I'd just changed the first ability to have a "HasAbility" line that adds the now passive spell's old effects to it's own. But I can't do that here because, as I said, Chain Lightning uses a completely different format from Lightning to achieve it's effects.
Anyone know how I could do this?

Modifié par Kesaru, 23 mars 2010 - 07:55 .


#2
DodgeMoreLightning

DodgeMoreLightning
  • Members
  • 30 messages
If HasAbility, runscript Chain Lightning, else run Lightning?

#3
Kesaru

Kesaru
  • Members
  • 130 messages

DodgeMoreLightning wrote...

If HasAbility, runscript Chain Lightning, else run Lightning?

I tried using RunScript, but apparently it's a console only command.

#4
DodgeMoreLightning

DodgeMoreLightning
  • Members
  • 30 messages
I haven't tried this, as I'm busy trying to make grease fire not suck, but here are two ideas that might help.

Idea one:
In the file where you handle Lightning, if the caster has the CL ability, call HandleEvent(ev, your_CL_script). Your CL script will check for Lightning's ability ID instead of Chain Lightning's, but the code will execute CL.

The second idea is similar: In the file where you handle Lightning, either change the ability ID of Lightning to Chain Lightning in the event itself or raise a new event with copies of the relevant data except the new ability ID will be Chain Lightning's and you'll add anything CL needs to obtain from the event to it (the more likely option). Then you call HandleEvent on that new event pointing to some CL code.

Hope those ideas help in some way. Good luck!

Modifié par DodgeMoreLightning, 30 mars 2010 - 02:57 .