HK-42 Posted January 13, 2009 Share Posted January 13, 2009 This is getting a bit frustrating . void main() { object oAtton = GetObjectByTag("a_king", 0); AssignCommand(oAtton, ActionPlayAnimation(ANIMATION_LOOPING_SIT_CHAIR, 1.0, 0.0)); } The script works on normal number like 21, but not like this.(and for some reason it says Atton, but probably its a K2 script.) 21: is sit but it played a poison animation. I get tons of syntax with the one above complaining about the 2 commands and ANIMATION_LOOPING_SIT_CHAIR. Any ideas how I can fix this? Link to comment Share on other sites More sharing options...
Canderis Posted January 13, 2009 Share Posted January 13, 2009 void main() { object oNPC= GetObjectByTag("a_king", 0); AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_SIT_CHAIR, 1.0, 0.0)); } Try that. Link to comment Share on other sites More sharing options...
HK-42 Posted January 13, 2009 Author Share Posted January 13, 2009 void main() { object oNPC= GetObjectByTag("a_king", 0); AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_SIT_CHAIR, 1.0, 0.0)); } Try that. Nope, same errors. By the way the "Atton" part was not a big deal, didnt make a difference. Link to comment Share on other sites More sharing options...
Star Admiral Posted January 13, 2009 Share Posted January 13, 2009 To figure out what constants are usable for the ActionPlayAnimation() function, use NotePad to open up the nwscript.nss file inside your Override folder. Using the Find ability under the Edit menu, type in ANIMATION_ and hit Find. You'll be taken to the start of all animation constants that you can use in the game. Note that in this case, ANIMATION_LOOPING_SIT_CHAIR does not exist. (Well, technically it does, but that line is commented out.) There doesn't seem to be a constant for a sitting animation, so if you want the character to sit, you'll probably have to test each one of the constants until you find one that will make the character sit. Try using ANIMATION_LOOPING_DEACTIVATE. - Star Admiral Link to comment Share on other sites More sharing options...
HK-42 Posted January 13, 2009 Author Share Posted January 13, 2009 To figure out what constants are usable for the ActionPlayAnimation() function, use NotePad to open up the nwscript.nss file inside your Override folder. Using the Find ability under the Edit menu, type in ANIMATION_ and hit Find. You'll be taken to the start of all animation constants that you can use in the game. Note that in this case, ANIMATION_LOOPING_SIT_CHAIR does not exist. (Well, technically it does, but that line is commented out.) There doesn't seem to be a constant for a sitting animation, so if you want the character to sit, you'll probably have to test each one of the constants until you find one that will make the character sit. Try using ANIMATION_LOOPING_DEACTIVATE. - Star Admiral Ok, I see them, but I dont see one that will make them sit, I wonder why sit chair was removed. Link to comment Share on other sites More sharing options...
Canderis Posted January 13, 2009 Share Posted January 13, 2009 aren't people in the cantena on taris sitting? Link to comment Share on other sites More sharing options...
HK-42 Posted January 13, 2009 Author Share Posted January 13, 2009 aren't people in the cantena on taris sitting? They are part of the placeable Link to comment Share on other sites More sharing options...
glovemaster Posted January 14, 2009 Share Posted January 14, 2009 void main() { object oNPC = GetObjectByTag("a_king", 0); AssignCommand(oNPC, ActionPlayAnimation(ANIMATION_LOOPING_SIT_CHAIR, 1.0, [color=red]-1.0[/color])); } I also should mention that this will need to be put onEnter of the module as when you leave and return the animation stops. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.