Jump to content

Need a script? Maybe I can help.


fg109

Recommended Posts

  • Replies 272
  • Created
  • Last Reply

Top Posters In This Topic

@AwesomeSkyrimDude

EOF == 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 by tunaisafish
Link to comment
Share on other sites

@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

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 by AwesomeSkyrimDude
Link to comment
Share on other sites

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 by avenger404
Link to comment
Share on other sites

@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

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...