Is something wrong with this script

Post » Fri Apr 08, 2011 8:12 am

Can any one help me with this script? I need to know how to make the animations work. Even when I press the ~ key in oblivion and type in the command 'playgroup forward 1' nothing happens! HELP!

Hear is the Script:

SCN UNDWeponRackGiveWeponShort SilverShort GlassShort EbonyShort ElvenShort OneBegin OnActivate	If One == 1Message "Only one wepopn per day is allowed."	EndifIf Silver == 0 && One == 0PlayGroup Forward 1Set Silver TO 1Set One TO 1Player.AddItem WeapSilverShortsword 1	EndifIf Glass == 0 && One == 0PlayGroup FastForward 1Set Glass To 1Set One to 1Player.AddItem WeapGlassShortsword 1	EndifIf Ebony == 0 && One == 0PlayGroup Equip 1Set Ebony To 1Set One To 1Player.AddItem WeapEbonyShortsword 1	EndifIf Elven == 1 && One == 0PlayGroup Right 1Set Elven To 1Set One To 1Player.AddItem WeapElvenShortsword 1	EndifEnd 


--Thanks!
-MNPred
User avatar
Tammie Flint
 
Posts: 3336
Joined: Mon Aug 14, 2006 12:12 am

Post » Fri Apr 08, 2011 5:33 am

Can any one help me with this script? I need to know how to make the animations work. Even when I press the ~ key in oblivion and type in the command 'playgroup forward 1' nothing happens! HELP!

Hear is the Script:

Spoiler
SCN UNDWeponRackGiveWeponShort SilverShort GlassShort EbonyShort ElvenShort OneBegin OnActivate	If One == 1Message "Only one wepopn per day is allowed."	EndifIf Silver == 0 && One == 0PlayGroup Forward 1Set Silver TO 1Set One TO 1Player.AddItem WeapSilverShortsword 1	EndifIf Glass == 0 && One == 0PlayGroup FastForward 1Set Glass To 1Set One to 1Player.AddItem WeapGlassShortsword 1	EndifIf Ebony == 0 && One == 0PlayGroup Equip 1Set Ebony To 1Set One To 1Player.AddItem WeapEbonyShortsword 1	EndifIf Elven == 1 && One == 0PlayGroup Right 1Set Elven To 1Set One To 1Player.AddItem WeapElvenShortsword 1	EndifEnd 


--Thanks!
-MNPred

It isn't your script, I'm afraid. While I'm good at making Character Animations, I know only a little of Object Animations. Now it happens that I'm facing the same issue with my animated objects; The animation plays in Nifskope, but not in-game. This is an issue I haven't found a fix for in any of the tutorials, and I wasn't yet "ready" to ask in the forums. Any help from others would be greatly appreciated for me too!
User avatar
Ana
 
Posts: 3445
Joined: Sat Jul 01, 2006 4:29 am

Post » Fri Apr 08, 2011 4:49 am

It isn't your script, I'm afraid. While I'm good at making Character Animations, I know only a little of Object Animations. Now it happens that I'm facing the same issue with my animated objects; The animation plays in Nifskope, but not in-game. This is an issue I haven't found a fix for in any of the tutorials, and I wasn't yet "ready" to ask in the forums. Any help from others would be greatly appreciated for me too!


Hmm, None of my custum animations have worked in game, however, (excluding this instance) thay have worked in game.
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Thu Apr 07, 2011 7:05 pm

Just so I'm clear...this script is attached to your weapon rack, right? And you want the animations to play on the player? If this is correct, then maybe you just need to explicitly state that you want the animations to run on the player; i.e. use player.playgroup instead just playgroup. Since you didn't say exactly what reference you're trying to animate, I think it's trying to play those animations on the weaponrack cause the script is on the weaponrack.

EDIT: Ok scratch that. I see in your other thread that you made animations for your weaponrack. My bad.
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Fri Apr 08, 2011 7:03 am

Docmn is right you have to call the function on the player, not the weapon rack, which is what you are doing.

You have two solutions:

Simply call playgroup with player as a reference: player.PlayGroup Forward 1


or change that spell to run a new spell on the player when the right condition is met.

IE:

SCN UNDWeponRackGiveWepon

Short One

Begin onactivate
If One == 1
Message "Only one wepopn per day is allowed."
return

else
player.addSpell PickupWeapon
set one to 1
Endif
End

set the pickupWeapon spell as a magic effect and copy the relevant part of your old spell.
User avatar
Penny Wills
 
Posts: 3474
Joined: Wed Sep 27, 2006 6:16 pm

Post » Thu Apr 07, 2011 8:28 pm

Docmn is right you have to call the function on the player, not the weapon rack, which is what you are doing.

You have two solutions:

Simply call playgroup with player as a reference: player.PlayGroup Forward 1


or change that spell to run a new spell on the player when the right condition is met.

IE:

SCN UNDWeponRackGiveWepon

Short One

Begin onactivate
If One == 1
Message "Only one wepopn per day is allowed."
return

else
player.addSpell PickupWeapon
set one to 1
Endif
End

set the pickupWeapon spell as a magic effect and copy the relevant part of your old spell.


No, sorry, I should have given more information about what I am trying to do. The animation is one that will make the wepons on the rack dissipear, so I am calling the playgroup on the rack because the wepons are part of that mesh. The Idea is that once a day, the player can go to the rack to activate it and receve one of 4 wepons. The corisponding wepon on the rack would then dissipear. None of the wepons will reapear untill all wepons have been taken.

The reson I am doing this instead of just seting the wepons on the rack in the cs so that the player can just pick it up like normal is that for some reasion, none of my wepons will stay on the rack, hence: One mesh, An animation to stimulate what would normally happen, and a script to make it all work.

--HELP
-MNPred
User avatar
Nitol Ahmed
 
Posts: 3321
Joined: Thu May 03, 2007 7:35 am


Return to IV - Oblivion