- Sep 30, 2018
- 102
- 70
Hi,
i thought it was definetely ok for me and the strings, parameters.... and no. Another case of mysterious string misunderstood.
Ok, let's go
Some declarations :
And of course, the call(s) proc :
I've tried ".join, text(), {} .format...... " methods, nothing good but [Hero.name] is not defined
Like usually, an idea, a dream, a cup of tea ??
And of course, all is ok when i don't use [Hero.name]
i thought it was definetely ok for me and the strings, parameters.... and no. Another case of mysterious string misunderstood.
Ok, let's go
Some declarations :
Python:
init python:
class Characters:
def __init__(self, name, imgSay=""):
self.name = name
self.imgSay = imgSay
define Hero = Characters("Ethan", "player.jpg")
define dialogSample = (
("[Hero.imgSay]", "Blablablabla."),
("[Hero.imgSay]", "Hello dear [Hero.name] Blablablabla") # <== MY PROBLEM IS HERE ON [Hero.name]
)
Python:
call execScene( dialogSample )
label execScene( listEvent ):
$ dlg_count = 0
while dlg_count < len(listEvent):
call displayScene(*listEvent[dlg_count])
$ dlg_count += 1
label displayScene(idTalker="", dlgScene=""):
$ idSpeaker = idTalker
currentSpeaker "[dlgScene]" => PRINT Hello dear [Hero.name] Blablablabla
I've tried ".join, text(), {} .format...... " methods, nothing good but [Hero.name] is not defined
Like usually, an idea, a dream, a cup of tea ??
And of course, all is ok when i don't use [Hero.name]