ChampionOfHircine Posted April 21, 2012 Share Posted April 21, 2012 That's exactly what I was looking for. Unless I missed a video somewhere between the first one and here they're not exactly the same. The first didn't show what you did from 1:21 - 1:44 in this one. That's what I was confused about. Really appreciate the help. Thank you. :D Link to comment Share on other sites More sharing options...
tunaisafish Posted April 21, 2012 Share Posted April 21, 2012 (edited) @AwesomeSkyrimDudeEOF == Event or Function. Your while loop may be perfectly formatted, but the compiler is telling you that you have not put the code inside an EOF. (I wish they'd used another acronym for this instead of EOF, as in CS it generally means EndOfFile.) Edit: wiki updated: Papyrus compiler Errors Edited April 21, 2012 by tunaisafish Link to comment Share on other sites More sharing options...
AwesomeSkyrimDude Posted April 21, 2012 Share Posted April 21, 2012 @Tunaisafish Ah okay. And yea the person I mentioned it to said they were used to it having a different meaning to, they probably should have chosen something else. Link to comment Share on other sites More sharing options...
fg109 Posted April 21, 2012 Author Share Posted April 21, 2012 @avenger404 Are you sure you copied the script correctly? It works fine for me. Again, the script is: Scriptname Example extends ActiveMagicEffect Event OnEffectStart(Actor akTarget, Actor akCaster) float Damage = akTarget.GetActorValue("Health") - 1 akTarget.DamageActorValue("Health", Damage) EndEvent It should be leaving NPCs with only 1 health. As for the NPCs not casting it, I forgot about that. Since to the NPCs, having it as just a script effect means the spell does no damage, they would normally not use it... So I guess just have the spell settings be what they are normally and add a single line to the script: Scriptname fg109TestME02Script extends ActiveMagicEffect Event OnEffectStart(Actor akTarget, Actor akCaster) Utility.Wait(0.25) ;wait a bit for the spell's normal effects to be applied float Damage = akTarget.GetActorValue("Health") - 1 akTarget.DamageActorValue("Health", Damage) EndEvent @AwesomeSkyrimDude Yeah, tunaisafish had it right. It does mean Event Or Function. Link to comment Share on other sites More sharing options...
tunaisafish Posted April 21, 2012 Share Posted April 21, 2012 @fg, Just wanted to say what a great script surgery you've got going here :thumbsup: I was thinking that you'd been on 99 kudos for far too long. It turns out that I could have fixed that myself. Oops sorry, I thought I'd done that long ago. Link to comment Share on other sites More sharing options...
AwesomeSkyrimDude Posted April 21, 2012 Share Posted April 21, 2012 (edited) Loop still not working. I think its format problem now, if I could see some examples that would be cool. Edit: This is the error message I get required "(...)+ loop did not match anything at input 'While'", I was getting a lot more but I got it down to just this one. Containing an if statement within a loop shouldn't be a problem right? Edited April 21, 2012 by AwesomeSkyrimDude Link to comment Share on other sites More sharing options...
avenger404 Posted April 21, 2012 Share Posted April 21, 2012 (edited) What spell did you modify? Or did you create a new one? Cause I'm trying to modify a copy of Chain lightning ( like the effects, should I create my own and add scripts to that?) The spell works properly, but the script is NOT taking effect. It's just applying the damage created in the spell menu where you add the MGEF's. The script is not being applied. I put the script in the MGEF section correct? Edited April 21, 2012 by avenger404 Link to comment Share on other sites More sharing options...
Phnx Posted April 21, 2012 Share Posted April 21, 2012 @Phnx There is no such thing as an OnGameStart event... I don't have fore's idles, so I don't know whether or not what I tell you will work. The game already plays idles when the player isn't moving. Why not add fore's idles to the possible idles it can play? Go to: GamePlay -> Animations... -> Actors\Characters\Behaviors\0_Master.hkx -> ActionIdle -> NPCIdleRoot -> NonCombatIdles and add the idles to the IdlePlayerRoot. If that doesn't work, then I guess you can try scripting. Instead of using a quest script, I would use a magic effect script. This is because you can put conditions on a magic effect to determine when it will run, so you can copy all the conditions that were on the IdlePlayerRoot. So use this for the magic effect script: Scriptname PlayRandomIdle extends ActiveMagicEffect Idle Property MyFNISspellc1 Auto Idle Property MyFNISspellc2 Auto Event OnEffectStart(Actor akTarget, Actor akCaster) int RandomPercent = Utility.RandomInt(0, 99) if (RandomPercent < 50) akTarget.PlayIdle(MyFNISspellc1) else akTarget.PlayIdle(MyFNISspellc2) endif EndEvent and add the magic effect to an ability, and the ability to the player.Thank you very much for the help! I've tried both your suggestions but had no luck, yet. Seems the game doesn't like playing new idles via scripts. :( Link to comment Share on other sites More sharing options...
Linky1 Posted April 21, 2012 Share Posted April 21, 2012 Hey there :)Im making blood spells that do helpfull things at the cost of health, and I cant do it since spells cannot do things to yourself and another person without scripts. For excample I have a command creature spell I made, on target. But I now cant do anything to myself (like take health away) without scripts. If you could tell me the script to take away 60 HP when spell is cast ill be really greatfull :) Thanks :) Link to comment Share on other sites More sharing options...
scrivener07 Posted April 21, 2012 Share Posted April 21, 2012 Big thanks fg! With your advice I was able to pull off this awesome mod. Got all my OnUpdates working and token activating. Wish I had more kudos to give ya. Link to comment Share on other sites More sharing options...
Recommended Posts