Captain Oblivious Posted August 12, 2011 Posted August 12, 2011 I'm trying to insert animations into my mod between dialogue portions. While I got some help, it isn't doing quite what I wanted--the script I have plays a rape scene, but I can't really put any dialogue in there. It's going to be perfect for day-to-day violation but I can't do anything artistic with it. ; ) Could someone help me out with the playidle syntax from obse20? I think that would help me out--if I could just play the damn animation for a set number of seconds--but I can't figure out how exactly you use it, and my searches are turning up nothing. My name is pretty appropriate.
Aleanne Posted August 14, 2011 Posted August 14, 2011 I'm trying to insert animations into my mod between dialogue portions. While I got some help' date=' it isn't doing quite what I wanted--the script I have plays a rape scene, but I can't really put any dialogue in there. It's going to be perfect for day-to-day violation but I can't do anything artistic with it. ; ) Could someone help me out with the playidle syntax from obse20? I think that would help me out--if I could just play the damn animation for a set number of seconds--but I can't figure out how exactly you use it, and my searches are turning up nothing. My name is pretty appropriate. [/quote'] I just tested playidle to replace calls to pickidle in the bathing mod (which wasn't working for me, probably because pickidle was picking another idle, stupid random thing). Anyway, it's a piece of cake. First, you must define your idle animation. Explanations on doing this here : http://cs.elderscrolls.com/constwiki/index.php/Idle_Animations Next, in your script, you do this : 1) Declare a reference variable for the anim ref anim 2) set the reference to the name of the anim in the Idle Animation window. In the anim tree, it's the node with the actual animation (.kf) file. Say you want to use the cower anim : set anim to Cower Save the script. If you get a compile error when saving the script (Syntax error, unknown command 'the name you gave to your anim'), then you didn't did it right. 3) Call playidle on the actor. If the actor is the player, it's : player.playidle anim 1 - The "1" parameter forces the execution of the anim regardless of the anim currently playing, if there's any. - You can verify if the anim played by using this syntax : short animPlayed ... Set animPlayed to player.playidle anim 1 if animPlayed == 0 Message "Anim didn't play" elseif animPlayed == 1 Message "Anim did play" endif - Playidle doesn't control the length of the anim. This is fixed in the .kf. Or you can loop your anim in the script, by using a timer.The timer duration should probably be equal the duration of the anim in order to have a smooth transition. Good luck !
Captain Oblivious Posted August 15, 2011 Author Posted August 15, 2011 Thank you! But now, every time I type this in the topic's result script: ref anim set anim to Cower player.playidle anim 1 as a test, TES crashes on save. I'm following the directions. What the heck could I be doing wrong?
Captain Oblivious Posted August 15, 2011 Author Posted August 15, 2011 Ok, clearly I just don't understand scripting period. I'm not supposed to be writing this in the result script. I can follow this general framework, but how the heck do I get the script running using a dialog result? I know I'm asking for a bit too much handholding here. It seems so damn simple but I just can't get it running. : (
lurkerfrombelow Posted August 15, 2011 Posted August 15, 2011 You could just set a flag variable on the main quest script to indicate the anim you want to play on the player and then have the quest script check for it in the GameMode block and run playidle from there? It's a little messy, but I find oblivion's structure tends to make constructions like this >_<
fg109 Posted August 15, 2011 Posted August 15, 2011 I am not sure whether or not dialogue result scripts can run OBSE functions. However, I do know that you can't declare variables inside of them (or inside quest stage scripts either). One way you can do practically the same thing is to have a quest script hold the variables. Example script for quest "ExampleQuest": scriptname ExampleQuestScript ref animref Example dialogue result script: set ExampleQuest.animref to Cower Player.PlayIdle ExampleQuest.animref 1 If that doesn't work, then it probably means that you really can't use OBSE functions in the result scripts. In that case, you should use the dialogue result script to trigger the animation as shown below. Example quest script: scriptname ExampleQuestScript ref animref short toggle Begin GameMode if (toggle) set toggle to 0 set animref to Cower Player.PlayIdle animref 1 endif End Example dialogue result script: set ExampleQuest.toggle to 1
Recommended Posts
Archived
This topic is now archived and is closed to further replies.