#๐Ÿ”’ sims 4 scripting help?

4 messages ยท Page 1 of 1 (latest)

glacial frost
#

im extremely new to scripting. my main interest is creating mods for the sims 4. ive tried a practice script given to me by a friend a bunch of times just to get something to work (the goal is to play an animation with a control center command) but no matter what i do its like my script doesn't exist. any tips or resources?

ideally, i want a custom animation i made in blender that i then converted into a .package to play every 2-3 minutes when a certain trait is applied. but after many failed attempts of just trying to test the animation in game, i am desperate for ANY script i make to work in game ๐Ÿ˜ญ

this is the script a friend provided me with:
`import sims4.commands
import services

@sims4.commands.Command('testing', command_type=sims4.commands.CommandType.Live)
def testing(_connection=None):
sim_info = services.active_sim_info()
if sim_info is not None:
sim = sim_info.get_sim_instance()
if sim is not None:
sim.posture.play_animation('a_stand_excited_clap_hands_01')
sims4.commands.output("test animation playing", _connection)
else:
sims4.commands.output("sim not in world", _connection)
else:
sims4.commands.output('no active sim', _connection)
return True`

i am losttt any help appreciated!

celest cipherBOT
#

@glacial frost

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

celest cipherBOT
#

@glacial frost

Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.