User Tools

Site Tools


en:examples:spawners:find_spawner_by_name

Find Spawner by Name

Code

	orxSTRUCTURE *structure = orxStructure_GetFirst(orxSTRUCTURE_ID_SPAWNER );
	while (structure != orxNULL){
		orxSPAWNER *spawn = orxSPAWNER(structure);
		if (orxString_Compare(orxSpawner_GetName(spawn), spawnerName) == 0 ){
			return spawn;
		} else {
			structure = orxStructure_GetNext(structure );
		}
	}

Code example by gemberkoekje

en/examples/spawners/find_spawner_by_name.txt · Last modified: 2018/02/14 00:47 (7 years ago) by 127.0.0.1