Talk:Console/Don't Starve Together Commands/@comment-32132381-20180116052226

From Don't Starve Wiki
Jump to navigation Jump to search

a fun fact for you all:

all the commands that include "ThePlayer" can be replaced with "AllPlayers[number]" to do it to another player

for example, i wanted to give creative mode to another player

ThePlayer.components.builder:GiveAllRecipes() is the command to do it to yourself, but if you wanted to give it to someone else,

lets say the player's index number is 2, so that would be: AllPlayers[2].components.builder.GiveAllRecipes()

another example would be the size changing one:

ThePlayer.Transform:SetScale(number,number,number) can also be AllPlayers[number].Transform:SetScale(number,number,number)

this works for all the commands with ThePlayer (i think)

and while im still here, i'd like to point out that for this: c_find("flower").Transform:SetPosition(AllPlayers[number]:GetPosition():Get())

the c_find("prefab") for this code can also be replaced with c_spawn("prefab") and c_gonext("prefab")

hope this is very helpful to all you people who host dedicated servers!