Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 22nd Mar 2020 at 2:38 AM
Default A few ideas on making an Xray machine idk how to do
So I have been giving this a lot of thought and had a look over the custom interactions tutorial and come up with a few ideas, I just need some info on how I might actually achieve them and advice on what would be the easiest to achieve

The most basic idea is that a sim would use the object and call another sim to use the object with them.

Animations would then play which I would like to create in blender if at all possible since I have experience with meshing and animation through blender, but if not, I will look at this whole jazz script business *deep groans*

After the animation completes, I would have the object either create a second object on itself somewhere which the sim could then take, or have it create the object directly in the sim's inventory

This second object in its most basic form would just bd a decorative xray object

Getting more advanced, there are a few things I would like the second object to do...

First of all I could have the xray machine check if the second sim has a certain moodlet. I plan on creating several moodlets or seeing what I can use from moodlets in the game.

If they have for example the "hurt hand" moodlet from failure of using the board breaker, there would be a chance that the xray object would be the one I will make of a fractured wrist, or I may end up making that always the case... And if they dont have that moodlet, then it would spawn the object of a normal wrist

I would like to either (or both) have the object include the name of the xrayed sim, so it would say "Josh Simmerman's Xray" otherwise it would just be Xray.

Or I would like it to give the Sim's name in a notification. "Josh Simmerman has a broken wrist" and the latter part would be based on the object itself, so always true of the broken wrist xray object, so if I couldn't do anything fancy with it, it would still always say "The sim has a broken wrist"




A second idea I have is potentially a bit trickier. The Xray machine object would use an animation cloned from the electrocution animation which would not be the full animation itself, the sim would remain stationary but show up as a skeleton similar to what happens when a sim is electrocuted

I would the either have

A) the system described earlier which spawns the xray object

B) a system which would bring up the screen which happens when taking a photograph or making a painting, which would allow you to photograph anywhere on the sim now displaying as a skeleton and print that photograph as an object.

I would like this photograph to function similarly to the simple object version in that it would when viewed, give a notification saying the sims name, and information based on a moodlet the either have or dont

I would also like to, if possible, make different meshes cloned from the electrocution skeleton which have various issues like a broken wrist, or scoliosis, a slipped disk, dislocated joint etc etc etc...

And I would like to have the mod use a mesh specific to what moodlet a sim has if at all possible



These are just a few ideas for how I could have the general theme of my idea, an Xray machine, function as one.

I will update this thread as I remember the others but these are the ones I like the most

Please let me know how I would go about doing this like what to call on and where this thing is etc.



As for what happens after you've xrayed a sim and read the xray...

That's a mod for another day
Advertisement
Senior Moderator
staff: senior moderator
#2 Old 22nd Mar 2020 at 12:33 PM
Firstly, you'll need to get familiar with object modding, and this goes into more detail about the parts of the interaction code.

I think the first option is probably easier, if you wan to start with that. Perhaps you could use the science machine thingy that came with University Life as your x-ray machine to get started, that way you can get the main part of your code done without having to spend ages making a very complex custom object and animation.

You'll need two custom objects, the x-ray machine and the x-ray picture. So for the machine, if you clone the science thingy to make your x-ray machine, and in your code derive your custom object from the science machine, you could add a custom interaction for taking x-ray, and probably just copy most of the code from the original object's interaction Run() function. At the end you'll need to then have your x-ray picture object appear, probably easiest to just have it appear in the sim's inventory.

Then for making the x-ray image, you could derive it from the PictureFrame object or something like that, and add in a string variable, which in the code for taking an x-ray with the machine, would be set to the sim's name. Then you have it so when you hover over it, it would show up as "Sim-name's x-ray'" or whatever.

Once you get that done, you could then make it more advanced by looking for certain moodlets and having different versions of the x-ray etc. But you'll need to get the basics working before worrying about that

Hope this helps!
Test Subject
Original Poster
#3 Old 2nd Apr 2020 at 3:38 PM
Hmmm thank you that gives me some ideas, I will have a look and see what I can do and get back to you. So much of this though is still in an alien language to me. No idea what commands and references and things to call on which are there, are available to me, and the tutorial only really gives a piece of the picture

Learn as I go I guess
Test Subject
Original Poster
#4 Old 2nd Apr 2020 at 3:41 PM
While we are at it let me throw myself into the deep end here, google has completely nothing on this, but I was wondering about link triggers and activated behaviours. If I can understand how that works in the code of an object, there is just so much I can do with that, it shows a lot of potential
Senior Moderator
staff: senior moderator
#5 Old 2nd Apr 2020 at 5:32 PM
Yep it can be very confusing at first, but the way to go forward is just to try it out, maybe get the structure working first, with the interaction only consisting of a notification to let you know it's all good so far, and then work on putting your code in for the interaction. And ask for help if you're struggling of course
Sorry if my explanation was a bit confusing, as I was also just thinking through how I would approach the process. If you need more detailed explanations on doing things, I or some of the other experienced modders here can surely help.

By link triggers and activated behaviours, do you mean all the stuff that comes with WA for the tombs? If so, I'm afraid I don't know much about how to use them in-game let alone the code behind it. If you have a specific thing you want to try, you're probably better off worrying about it when you get to it
Back to top