Jump to content

Minor Scripting Help


Draveziovas

Recommended Posts

So, I'm taking my first foray into the wonderful world of Oblivion scripting, and I've run into a minor problem.

 

What I'm trying to do is make a spell that:

 

A)Checks if the player has any of a specific Mod arrow

B) If not Add 6 Mod arrows to the Player inventory

C)Equips said 6 arrows

D)Otherwise, do nothing

 

Now, A, B, and D I've accomplished. It's C that's giving me problems.

 

 

scn 1RegBullet

begin scripteffectstart
  if player.GetItemCount 113bullet == 0
  player.additem 113bullet 6
  player.equipitem 113bullet
  endif
end

 

So, this is what I've got now.

 

THe problem is it gives me all 6 bullets, but it only equips one bullet, and the other 5 occupy a seperate inventory slot, necessitating I manually equip them, defeating the point, plust that one bullet acts weird, occacsionally becoming an item I can't unequip.

Link to comment
Share on other sites

You'll need to add one bullet, equip it, and then add five more (the adding five bit might have to be done the following frame). It's one of Oblivion's "undocumented features".

 

Also, avoid item names that begin with a number as they can often cause scripts to bork - rename 113bullet to something else.

Link to comment
Share on other sites

You'll need to add one bullet, equip it, and then add five more (the adding five bit might have to be done the following frame). It's one of Oblivion's "undocumented features".

 

Also, avoid item names that begin with a number as they can often cause scripts to bork - rename 113bullet to something else.

It worked! Thank you so much!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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