Boogiepop210 Posted November 27, 2022 Author Share Posted November 27, 2022 4 hours ago, Parusoid said: What If im not nearby, how do I select them c_find("characterprefab")c_give("item") characterprefab is what character you wanna give the item too. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/3/#findComment-1612469 Share on other sites More sharing options...
Parusoid Posted November 28, 2022 Share Posted November 28, 2022 2 hours ago, Insertnamehere2 said: c_find("characterprefab")c_give("item") characterprefab is what character you wanna give the item too. what if there are more than one of the same character? Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/3/#findComment-1612489 Share on other sites More sharing options...
Boogiepop210 Posted November 28, 2022 Author Share Posted November 28, 2022 21 minutes ago, Parusoid said: what if there are more than one of the same character local g = c_spawn("item", count); AllPlayers[playernumber].components.inventory:GiveItem(g) the player number thing is the order in which some joins. 1 first 2 second and so on. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/3/#findComment-1612494 Share on other sites More sharing options...
Boogiepop210 Posted November 28, 2022 Author Share Posted November 28, 2022 function c_run(prefab, radius, period, count) radius = radius or 12; period = period or 0.2 count = count or 1 local x,y,z = ThePlayer.Transform:GetWorldPosition() local targets = TheSim:FindEntities(x,y,z, radius, nil, {"CLASSIFIED", "player", "FX", "playerghost", "wall", "structure"} ) for _,t in pairs(targets) do t:DoPeriodicTask(period, function(inst) local x,y,z = inst.Transform:GetWorldPosition(); local s = c_spawn(prefab); if s == nil then return nil end; s.Transform:SetPosition(x,y,z) end) end end Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/3/#findComment-1612519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.