Mod The Sims

Mod The Sims (https://modthesims.info/index.php)
-   Modding Discussion (https://modthesims.info/forumdisplay.php?f=701)
-   -   Simple command doesn't work (https://modthesims.info/showthread.php?t=607079)

Bananensap 9th Feb 2018 9:24 PM

Simple command doesn't work
 
My script is loaded but my command doesn't work.

Here is the code:

Code:
import sims4.commands

@sims4.commands.Command('afirst', command_type=sims4.commands.CommandType.Live)
def first_command(_connection=None):
	output = sims4.commands.Output(_connection)
	output('cool! My first message')


Thanks!

scumbumbo 10th Feb 2018 3:46 AM

To send to the cheat window output, use CheatOutput:
Code:
import sims4.commands

@sims4.commands.Command('afirst', command_type=sims4.commands.CommandType.Live)
def first_command(_connection=None):
    output = sims4.commands.CheatOutput(_connection)
    output('cool! My first message')

Bananensap 10th Feb 2018 10:32 AM

Quote: Originally posted by scumbumbo
To send to the cheat window output, use CheatOutput:
Code:
import sims4.commands

@sims4.commands.Command('afirst', command_type=sims4.commands.CommandType.Live)
def first_command(_connection=None):
    output = sims4.commands.CheatOutput(_connection)
    output('cool! My first message')


Thanks :D


All times are GMT +1. The time now is 5:24 AM.

Powered by: vBulletin Version 3.0.14 · Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.