Jump to content

Recommended Posts

Posted

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.

Posted
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.

Posted

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.

Posted

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 ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
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.

  • 2 years later...
Posted (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 by Ignition
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...