Skip to content

Group.KeepAlive ​

Signature ​

lua
Group.KeepAlive(Group g) -> void

Description ​

Prevents g from being automatically released by Lua until Group.DeleteGroup is called. Use this when a selected Group is stored on an Effect with SetLabelObject or otherwise needs to survive into a later callback. Pair it with Group.DeleteGroup when the delayed effect is done.

Parameters ​

  • g Group - Group to preserve until DeleteGroup is called.

Source ​

  • D:\Programs\GitHub\ygopro-core\libgroup.cpp:901

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 285 indexed script(s).
  • Search this function in the Script Explorer with Group.KeepAlive.
CardIDScriptDetected Calls
Artmage Non-Finito74631897Scripts/c74631897.lua1
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua1
Lady's Dragonmaid48658295Scripts/c48658295.lua1
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua1
Goyo Emperor59255742Scripts/c59255742.lua1
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua1
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua1
Yomagna the Fire Phantom17350692Scripts/c17350692.lua1
Ursarctic Polari27693363Scripts/c27693363.lua1
Odd-Eyes Revolution Dragon16306932Scripts/c16306932.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua1
Graydle Split75361204Scripts/c75361204.lua1
Enlightenment Dragon46186135Scripts/c46186135.lua1
Ultimate Crystal Rainbow Dragon Overdrive84544192Scripts/c84544192.lua1
Tellusion the Magna Warrior24431911Scripts/c24431911.lua1
Ursarctic Polar Star62714453Scripts/c62714453.lua1
Kewl Tune Crackle39576656Scripts/c39576656.lua1
Dracotail Shaulas42125140Scripts/c42125140.lua1
PSY-Framelord Zeta37192109Scripts/c37192109.lua1
Vidolium the Unstable Power Patron of Unity70488851Scripts/c70488851.lua1
DoSolfachord Coolia80776622Scripts/c80776622.lua1
Rescue Hamster50485594Scripts/c50485594.lua1
Flowering Etoile the Melodious Magnificat83793721Scripts/c83793721.lua1
Red-Eyes Slash Dragon21140872Scripts/c21140872.lua1
...and 261 more

Script Examples ​

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
			tc2:RegisterFlagEffect(id+o,RESET_EVENT+RESETS_STANDARD,0,1)
			local sg=Group.FromCards(tc,tc2)
			sg:KeepAlive()
			e:SetLabelObject(sg)
			return true

Levia-Dragoon - Daedalus (78579058) ​

Source: Scripts/c78579058.lua

lua
				local sg=mg:SelectSubGroup(tp,s.LCheckGoal,cancel,minc,maxc,tp,c,gf,lmat)
				if sg then
					sg:KeepAlive()
					e:SetLabelObject(sg)
					return true

Lady's Dragonmaid (48658295) ​

Source: Scripts/c48658295.lua

lua
	local sg=g:SelectSubGroup(cp,s.fselect,true,2,2)
	if sg then
		sg:KeepAlive()
		e:SetLabelObject(sg)
		return true