RPG Maker Forums

Hi 


I have something like this


TXTitem =
"
#Cadre: D4 Fire
#Slot: Dice
#type: Power
";


I need to get text after #Cadre:


How to get te full text with space.


I try this


var matches = /#Cadre: (\w+)\s/.exec(TXTitem);


or this


var matches = /#Cadre: (\w+)\s+/.exec(TXTitem);


but this return me only D4, i need get D4 Fire .


Regex  is very hard to understand!


Tanks


Here the full portion of code

Code:
//get the .note item selected
var TXTitem = $dataItems[DiceSlotBig[WhatSlotcliked][3]].note;
// Find in the .note item what have after #Cadre:
var matches = /#Cadre: (\w+)\s+/.exec(TXTitem);
console.log (matches[1]); // it supose to are D4 Fire but i have D4
//Show text to screen
$gameScreen.setDTextPicture('\\OW[4] ' + matches[1]  + ' ', 24); //affiche item id .name
$gameScreen.setFont('GameFont');
$gameScreen.showPicture(57, '', 1, TempX, TempY, 0, 0, 255, 0);
this.bindPictureToMap((57), 1, 'above_characters');

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top