cloned event is not visible?

The cloned event fully works on the map after being cloned and is interactive, it's just... not visible...

Code in gameMap:

// events[0] contains the $mapData for the event var newEventID = this._events.length; events[0].id = newEventID; $dataMap.events[newEventID] = events[0]; var newEvent = new Game_Event(this._mapId, newEventID); newEvent.locate(11, 3); // locate() = RPG Maker MV version of: moveTo() this._events[newEventID] = newEvent;Weird I don't know why this is happening. When checking it in the console it also has a valid _characterIndex and _characterName and _transparent is false and _eventId is properly set and it is working on the map.
you need a plugin for event cloning, because you can't simply copy an event with simple commands - the new event needs different IDs for example.


There are already one or two plugin available that handle all the extra functions and changes to clone events. Please search for them and use them (or check them if you really want to write your own plugin for this)
Thanks I didn't know there were some around already. But I need my own anyway because it's part of a much larger script + I already set the new ID and everything else. Just the visibility that doesn't work. Besides cloning isn't hard, at least it wasn't in Ace.

Thanks to your post I found out what I was missing. It seems that in MV we have to add the sprites manually (wasn't the case in Ace I think). I got it now fully working by adding this code below the previous code:

Code:
	// Set sprite	if (SceneManager._scene instanceof Scene_Map)	{		var sprite = new Sprite_Character(newEvent);		SceneManager._scene._spriteset._characterSprites.push(sprite);		SceneManager._scene._spriteset._tilemap.addChild(sprite);	}	else	{		throw '$gameMap.loadProps() was called outside of Scene_Map.';	}

Original thread: https://forums.rpgmakerweb.com/threads/cloned-event-is-not-visible.52160/