Death Merchant Posted August 4, 2021 Posted August 4, 2021 Guys, Can I change the name of an existing group after it has been spawned? For instance if I'm using the SPAWN:New(Template), and the group spawns with the group name Ground#001, is there a command to change the name? I'm using MOOSE. Thanks, DM [PC] ASUS X570E - Ryzen 9 5950X - RX 6900 XT - 32GB 3600Mhz Hornet, A-4E-C, Huey, Ka-50, Mi-8, F-15E, F-14 Join us on Death Dealers PvE server.
Wizxrd Posted August 4, 2021 Posted August 4, 2021 You can use :NewWithAlias() to be able to name the group to appear as whatever you want in game. If you need to find the group after it’s been spawned you can reference this: https://forums.eagle.ru/topic/278457-help-with-groupfindbyname/?do=findComment&comment=4737312
Death Merchant Posted August 4, 2021 Author Posted August 4, 2021 5 hours ago, Wizxrd said: You can use :NewWithAlias() to be able to name the group to appear as whatever you want in game. If you need to find the group after it’s been spawned you can reference this: https://forums.eagle.ru/topic/278457-help-with-groupfindbyname/?do=findComment&comment=4737312 Thanks Wizxrd, I'm familiar with the NewWithAlias, but it doesn't do quite what I would like. Is there no way to change a Unit name after it's spawned? DM [PC] ASUS X570E - Ryzen 9 5950X - RX 6900 XT - 32GB 3600Mhz Hornet, A-4E-C, Huey, Ka-50, Mi-8, F-15E, F-14 Join us on Death Dealers PvE server.
Wizxrd Posted August 4, 2021 Posted August 4, 2021 I am unaware of a solution to have a group be already spawned in and then change the group name or unit name later on.
Grimes Posted August 4, 2021 Posted August 4, 2021 Nope. The group and unit name and id are unique identifiers. Suppose you could replace the group by despawning it and respawning it with the names you want, but it'd be easier to just name it before you spawn it. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Death Merchant Posted August 5, 2021 Author Posted August 5, 2021 11 hours ago, Grimes said: Nope. The group and unit name and id are unique identifiers. Suppose you could replace the group by despawning it and respawning it with the names you want, but it'd be easier to just name it before you spawn it. Thanks for the input guys. I've been having a problem with the SPAWN:New(Template) not incrementing the serial number while spawning, so sometimes it replaces the previous spawn. I have found a workaround, but it's a bit time consuming to script. Thanks, DM [PC] ASUS X570E - Ryzen 9 5950X - RX 6900 XT - 32GB 3600Mhz Hornet, A-4E-C, Huey, Ka-50, Mi-8, F-15E, F-14 Join us on Death Dealers PvE server.
Ignition Posted September 18, 2023 Posted September 18, 2023 (edited) On 8/5/2021 at 7:38 AM, Death Merchant said: Thanks for the input guys. I've been having a problem with the SPAWN:New(Template) not incrementing the serial number while spawning, so sometimes it replaces the previous spawn. I have found a workaround, but it's a bit time consuming to script. Thanks, DM A bit late, but I use a table for SPAWN. For example: np = #TableSpawn + 1 TableSpawn[np] = SPAWN:NewWithAlias("group", "newName" .. np) I also want to change the name of a spawned group without :Destroy and SPAWN Edited September 18, 2023 by Ignition
Recommended Posts