So I want to change a map event's image by referencing only its name from a common event.
So, I could change the event image of a character 'Carl' to be an image of a bloodstain, for example.
I found this code:
"
This returns a list of all events with the given name. Names aren't unique, so there might be more than one."
I've tried putting it in like this:
but get the error that it's undefined.
I think I need to call the ID, not the event, so I tried adding in a bit and having it display the answer to test.
But that only returns -1, not a sensible event ID
Help?
So, I could change the event image of a character 'Carl' to be an image of a bloodstain, for example.
I found this code:
"
$gameMap._events.filter(function(event) { return event.event().name === 'EV001'; });This returns a list of all events with the given name. Names aren't unique, so there might be more than one."
I've tried putting it in like this:
$gameMap.event($gameMap._events.filter(function(event) { return event.event().name === 'Carl'; })).setImage("stain", 0);but get the error that it's undefined.
I think I need to call the ID, not the event, so I tried adding in a bit and having it display the answer to test.
$gameMessage.add($gameMap._events.indexOf($gameMap._events.filter(function(event) { return event.event().name === 'Carl'; })))But that only returns -1, not a sensible event ID
Help?