Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

long time not coming here in need of help.

hope you all feel good.

 

I am working on a script which should cast random spell on an event.

At first i was looking for "when attacking" but it seem more complex so i am doing with a cast when hitting the target.

 

However, with spells that are "aimed" it works fine, but i wish to use it with a "target location" spell and the spell doesn't cast.

 

If someone can help me a bit please.

 

Here is my actual code.

He is attached to a 1h sword.

 

 

  Reveal hidden contents

 

I assume that the "actor" and the "target" are needed for Aimed spell but, i wonder what needs a "target location" one to be cast.

 

Hoping for your help.

Edited by Chronepsys
Posted (edited)
What do you mean exactly by 'target location', a conjure spell, a rune spell or something else made by you that requires a target to function correctly?.


* When the function 'cast' is used on actors, the spell casted will always be in front (0 degree in Z axe) of the actor, you can't direct /aim where the spell will be casted to, this works ONLY on objects / non actors.

So, the function:



Spell1.Cast(akCaster, akTarget)


will never work if you expect for the actor to cast the spell to a specific 'akTarget'.


** The only circustance were 'akTarget' will work when used on actors is when the spell is directed to the caster itself as the target, for example:



Spell1.Cast(akCaster, akCaster)


where the second akCaster is the akTarget.


If you need the actor to fire a spell when you are using a specific weapon, then you don't attach the script to the weapon, but to the actor through the weapon (while the weapon gets equipped).


If you are aiming for something like the 'Bloodskaal' projectile effect, then you have taken the wrong approach.

Edited by maxarturo
Posted

Hi Maxarturo,

 

Ok, i understand so that the spells with which the script works are only working by luck...

 

You, right about bloodskall. I first looked for same script, found them on the net but no try gets work.

So i came back to this script which gave me more result.

 

In very first place, i was planning to make a script that cast a spell when a power attack is triggered.

One spell for forward, another for backward, again another for left, a fourth one for right and a last one for standing.

 

I guess i must go back after "bloodskall" type of script and work about to understand why i did not get result with them before.

Will you be ok for me to come back here asking you help in this, when i will be lost ? (and i know i will :pinch:)

Posted (edited)
Hi Chronepsys.


Yes, no problem, just keep in mind that, if I don't reply immediately is because I work like crazy and I've a very f***** up work schedule, but I'll reply the minute I've some free time in front of my pc.


Also, if you want some assistance you need to tell me with what kind of weapon you are trying to achieve this, because if you will be using the 'Bloodskal' scripts, that set up works ONLY with 2h sword weapons and will not work with any other weapon.

Edited by maxarturo
Posted

Yes i read about this.

 

I am working on a 1h Sword.

I'll post here the script i found when i get time to.

 

Don't worry about when you answer, there is non need to do quick.

 

Thanks.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...