ShakerGER Posted March 25, 2022 Share Posted March 25, 2022 Heyo everybody. Before the marchupdate I used a bind to count prefabs. It then said" Wulrus Camps: 4" or something like that. The update kinda broke the funcunality to have 2 things in the same announcement? All help is appreciated! Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/ Share on other sites More sharing options...
UbiAnomaly Posted March 25, 2022 Share Posted March 25, 2022 the command c_announce(c_countprefab("thingamajig")) still works for me Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552141 Share on other sites More sharing options...
ShakerGER Posted March 25, 2022 Author Share Posted March 25, 2022 Yeah sure. I want a lil message before it though Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552143 Share on other sites More sharing options...
Hornete Posted March 25, 2022 Share Posted March 25, 2022 44 minutes ago, ShakerGER said: Yeah sure. I want a lil message before it though Does c_announce("Walrus Camps:"..c_countprefabs("walrus_camp")) not work? Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552166 Share on other sites More sharing options...
hhh2 Posted March 25, 2022 Share Posted March 25, 2022 .. is the Lua operator for string concatination if you have 2 strings you can put a .. inbetween them to combine them into a single string so c_announce("string 1" .. " string 2") would announce "string 1 string 2" note this only works with strings but Lua also has another function tostring() which can convert types like numbers into a string. If the update changed this idk :P Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552171 Share on other sites More sharing options...
QuartzBeam Posted March 25, 2022 Share Posted March 25, 2022 11 minutes ago, hhh2 said: note this only works with strings but Lua also has another function tostring() which can convert types like numbers into a string. It definitely works with integer as well, like the ones you get from c_countprefabs(). Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552179 Share on other sites More sharing options...
hhh2 Posted March 25, 2022 Share Posted March 25, 2022 Just now, QuartzBeam said: It definitely works with integer as well, like the ones you get from c_countprefabs(). i think it depends of the implementation or version of Lua. I've had crashes and errors from trying to do that in many different Lua engines, it may be redundant but can't hurt tostring() whatever you're trying to concatenate Link to comment https://forums.kleientertainment.com/forums/topic/138595-is-it-possible-to-c_announce-a-prefab-and-say-something-in-the-same-line/#findComment-1552182 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.