Je souhaiterais faire en sorte que la télékinésie puisse être offensive dans oblivion;
je ne parle pas ici de PushActorAway mais bien de bouqins volants faisants des dégâts lorsqu'ils percuttent la tronche des pnjs.
Je ne viens pas les mains vides, je possède déjà un script (en fait deux) assez longs pour ce qui est recherché...mais bon (inutile de préciser qu'ils ne sont pas de moi...)
Mon problème est extrêmement simple pour toute personne habitué à gérer du script:
rajouter une référence player et le différencier de actor dans le script qui va suivre pour éviter que le bouquin ne m'éclate la geule des qu'il est trop près de mon perso...(autobuté par sa propre télékinésie ça fait minable...)
scn CMTelekinesisDamageSpellScript ref actor ; the actor being hit float Vmodified ; the velocity variable being modified long Wmodified ; the weight variable being modified Begin ScriptEffectStart Set actor to GetSelf Set Vmodified to CMVelocity * -1 ; makes velocity negative Set Vmodified to Vmodified / 5 ; divides the velocity by 5, change this to increase or decrease damage Set Wmodified to CMWeight / 8 ; divides the weight of the object by 8, change this to increase or decease damage Set Vmodified to Vmodified - Wmodified ; adds modified velocity with modified weight to make the final damage if CMObjType == 33 set Vmodified to Vmodified - 3 elseif CMObjType == 34 set Vmodified to Vmodified - 2 elseif CMObjType == 20 set Vmodified to Vmodified - 1 elseif CMObjType == 26 ; for the torch set Vmodified to Vmodified - 3 elseif CMObjType == 22 set Vmodified to Vmodified + 3 elseif CMObjType == 25 set Vmodified to Vmodified + 1 endif actor.modav2 health Vmodified ; removes health from actor, change "health" to another actor value to give a different effect to the object if Vmodified < -5 ; if damage is more than 5 then knock down actor, decrease -5 to make the knock down less often, increase -5 to make the damage more often (0 will be all the time) Player.PushActorAway actor, 10 ; knock down actor, decrease 10 to make knock down more subtle, increase 10 to make actor fly back further (100 is max) endif [/b][/size]
Si toutefois ce thème à déjà été abordé je m'en excuse et je vous pris de me faire savoir où est le topic...
Merci d'avance pour vos réponses et idées...
Modifié par SpiritusRector, 26 novembre 2010 - 17:13.