| Search this Thread |
|
|
Animation and C# scripting - Go figure. #1 |
| futureactorjon |
Alright, so I'm pretty sure that this is an e-mail task however, I'm beyond confused. I'm jump right into it. Objective: Create an object to make a sim do an interaction. Progress: I've cloned/created the object, I've created/picked the animations. Now I need to C# script it all together. I followed the tutorials on the C# scripting and have managed to get the object to talk back to be through the a text box. This is obvious progress however, not what I'm trying to accomplish. So my request is, either if someone can point me in the direction of a "Sims 3" C# scripting tutorial or if there is just a simple code that my brain is not gathering. Best, Jonathan |
|
|
Last edited by futureactorjon : 3rd Jun 2011 at 01:30 PM.
|
|
|
#2 |
|
Odistant
|
What exactly are you trying to accomplish? You can do so much things with scripting like creating new Lifetime Wishes, skills, different types of beds that make motives static, new services, etc. I recommend looking at some of the objects already and seeing how they are run with. Once you get more into the coding, you can start adding interactions to already existing objects in the world like Sims. There really is no tutorial that will tell you everything. From my experience the best way is to learn it yourself and take a look at some general c# tutorials. I'm guessing you already took a look at Buzzlers Object Modding tutorial. I would also recommend to view his other tutorials for general scripting (no objects needed for that). Edit: For animations, you use the base.EnterStateMachine() method and base.SetActor() methods. I highly suggest that you take a look at _ani's killing mod which uses a custom jazz. It would give you a good start. |
|
|
|
|
|
#3 | |
| futureactorjon |
I actually managed to pull an animation from the game through my object! Quote:
Now I am just need to code it to pull the animation that I put into the package file. |
|
|
|
|
|
|
#4 | ||
|
cmomoney
Who wants to play video games?
|
Quote:
The JAZZ-less way would be:
Code:
| ||
|
"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
Have you seen my Simple E Modern Bed @Leefish | (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕] |
|||
|
|
|
|
|
#5 | ||
| futureactorjon |
Quote:
Thanks. I am getting an error though when I insert that: The name 'a_futureactorjon_tutorialanimation' does not exist in the current context Is this correct? base.Actor.PlaySoloAnimation(a_futureactorjon_tutorialanimation, true); Also, I tried looking for Jazz-less on here, but I couldn't find anything on it. |
||
|
|
|
|
|
#6 |
|
Buzzler
1978 gallons of pancake batter
|
Give base.Actor.PlaySoloAnimation("a_futureactorjon_tutorialanimation", true); a try. |
|
Robot Armed With Down Comforter Levels Apartment Building, Holds Mayor Hostage. |
|
|
|
|
|
|
#7 | |
| futureactorjon |
Quote:
No, I must be so exhausted that I'm just missing something. I will give it a try later. Any chance any of you would know how to overlay animations? Something like "laugh at" and an Idle position? I'm trying to make the interaction more subtle, less crazy. |
|
|
|
|
|
|
#8 | |
|
Buzzler
1978 gallons of pancake batter
|
Quote:
| |
|
Robot Armed With Down Comforter Levels Apartment Building, Holds Mayor Hostage. |
||
|
|
|
|
|
#9 | ||
| futureactorjon |
Quote:
No, I definitely see how that makes sense. I have my animation file in my clone object file though, so it doesn't really know where to call from. Quote:
|
||
|
|
|
|
|
#10 | |
|
cmomoney
Who wants to play video games?
|
Quote:
Yes, it does. It will call it from anywhere in the installed packages. | |
|
"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
Have you seen my Simple E Modern Bed @Leefish | (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕] |
||
|
|
|
|
|
#11 | |
| futureactorjon |
I get this error though: Sims3.Gameplay.Objects.Miscellaneous.Futureactorjon.MovieInteractions.TalktoMe.Run()': not all code paths return a value This is the code I'm using to call that animation: Quote:
I'll keep playing around with it. Anyway chance you know about overlaying animations such as a talking animation with an idle? Thanks for your guys help by the way. Much appreciated. |
|
|
|
|
|
|
#12 | ||
|
Buzzler
1978 gallons of pancake batter
|
Quote:
Quote:
| ||
|
Robot Armed With Down Comforter Levels Apartment Building, Holds Mayor Hostage. |
|||
|
|
|
|
|
#13 |
| futureactorjon |
You do know that you are a GENIUS, correct?! It works. Now, I either need to reanimate the animations individually or somehow figure out how to overlay two animations to create a more subtle looking animation. |
|
|
|
![]() |




Twitter
del.icio.us
StumbleUpon
Google