- Joined
- Apr 14, 2019
- Messages
- 218
- Reaction score
- 195
- First Language
- German
- Primarily Uses
- RMMV
Code:
var test = Window_Base.prototype.convertEscapeCharacters
Window_Base.prototype.convertEscapeCharacters = function(text)
{
text = test.call(this, text);
text = text.replace(/\x1bPPIC\<(\d+)\s*,\s*(.+)\>(\{(Scale:\[([-]?\d+){1},([-]?\d+){1}\])?([,]?\s*Opacity:(\d+){1}?)\})?/gi, function()
{
var scale = {x:150,y:150};
var opacity = 255;
if( arguments[3] )
{
if( arguments[4] )
{
scale.x = Number(arguments[5]);
scale.y = Number(arguments[6]);
}
if( arguments[7] )
{
opacity = Number(arguments[8]);
}
}
// Do something here
return '';
}.bind(this));
}

1st returns Oh this is a tree!!!
2nd returns {Scale:[125,-125]}Oh this is a tree!!!
3rd returns Oh this is a tree!!!
4th returns Oh this is a tree!!!
How can I make the second one returns also only Oh this is a tree!!!
Attachments
-
45.8 KB Views: 2