Jump to content

The last poster wins


TheCalliton

Recommended Posts

Where is a Werne, when you need one ?

Have slight scripting trouble with an old project of mine and could use a hand.

*Werne materializes*

 

Please state the nature of the scripting emergency. :geek:

Link to comment
Share on other sites

Nature Old Oblivion private Project (want to finalize it)

Subject Scripted Spell Spell
Need a special script for that spell:

Spell does a effect, lets call it "scripted effect01" when cast.

When the spell is cast again it shall make "scripted effect02"

on the 3rd cast it shall do "scripted effect03"...ect. no (random variable)

If a special number the spell is cast, the spell is removed from players spell book.

The last part I can do, but with the scripts and numbers how to call them in a row there i got the trouble since I'm not a great scripter like you.

Link to comment
Share on other sites

Nature Old Oblivion private Project (want to finalize it)

Subject Scripted Spell Spell

Need a special script for that spell:

Spell does a effect, lets call it "scripted effect01" when cast.

When the spell is cast again it shall make "scripted effect02"

on the 3rd cast it shall do "scripted effect03"...ect. no (random variable)

If a special number the spell is cast, the spell is removed from players spell book.

The last part I can do, but with the scripts and numbers how to call them in a row there i got the trouble since I'm not a great scripter like you.

Can't say I know much about scripting in Gamebryo, but I can take a stab at it. And I don't know if you want the effects to be in a certain sequence, or if you want them at random, so I'l explain both.

 

The random effect is an interesting thing, something I learned when editing "go fetch this" quests in FONV. You can get a random effect (or in case of those quests, money) by putting your spell effects into a leveled list and setting it to choose an effect randomly. Don't know if that's the case in Oblivion though, you can try.

 

How to get the effect on a target instead of player is unknown to me, but there are plenty of spells to examine that.

 

Then there is the "remove it after a certain number of uses" which is not complicated. You need tokens for that - invisible, weightless items that get added to the player when he uses that spell. Implement a check in the script that counts the number of tokens and if there is, let's say... 23, it removes the spell and tokens. You can use that for certain effects on certain number of casts.

 

An oversimplified and dirty version would be:

scn YourSpellScript
 
;If you want a random effect
addspell YourSpellEffectsLeveledList ;Don't know how to affect the target instead of player so this is likely incorrect
player.additem YourSpellToken 1 1
 
;If you want certain effects on each cast
if Player.GetItemCount YourSpellToken == 0
      addspell effect01
ElseIf Player.GetItemCount YourSpellToken == 1
      addspell effect02
ElseIf Player.GetItemCount YourSpellToken == 2
      addspell effect03
ElseIf Player.GetItemCount YourSpellToken == 3
      ;You get the picture
;Once you reach 23 (number at which the spell is removed), you use the below part, just with ElseIf instead of If
 
If Player.GetItemCount YourSpellToken >= 23
      player.unequip YourSpell
      player.removespell YourSpell
      player.removeitem YourSpellToken 23 1
      Message "Oh snap, you overdid it! :o"
EndIf
As I said, I don't know how to affect the target, but I do know how to randomize the effects of an action by putting them into a leveled list, and how to initiate a certain effect on a certain number of casts. Hope this helps. :wink: Edited by Werne
Link to comment
Share on other sites

Thanks a lot Werne! i think that dirty version should do. I can work up the rest.

it is a scripted effect are mostly on player. I have those scripted effects mostly done.. it more than 50, similar but different effects that i want to cast that way in a row. Very similar than a wand of wonders.

Edit : @Lv000

Might be a good idea to go to a place either far away from civilization or to a place where there is much noise and much so called civilization cold drinks and much music.

Edited by SilverDNA
Link to comment
Share on other sites

No ideas,just looking at the cat :teehee:

 

It's quite an adorable cat, yes :tongue:

 

 

Edit : @Lv000

Might be a good idea to go to a place either far away from civilization or to a place where there is much noise and much so called civilization cold drinks and much music.

 

 

I was thinking something along those lines too.

 

I only have 4 friends to invite so it won't be a big thing. Maybe somewhere in a nice place in nature, a grill, drinks and music.

Edited by Iv000
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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