Scroll with champion names

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Scroll with champion names

Post by THOM »

Maybe someone can help:

I want to get a scroll with names of party members mentioned in the text. Like "Peter has to kill Paul before I let you go" or something like that...

I tried some scripting but get no results. Any ideas..??
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
lexdr
Posts: 108
Joined: Thu Dec 26, 2013 3:29 pm
Location: France

Re: Scroll with champion names

Post by lexdr »

Have you try something like that (just before going to sleep)?

Code: Select all

spawn("scroll",party.level,party.x,party.y,"special_scroll")
:setScrollText(party:getChampion(1):getName().." has to kill "..party:getChampion(2):getName().." before I let you go")
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Scroll with champion names

Post by THOM »

Sadly the only thing that is displayed is the script itself. So it is not "Peter" but "party:getChampion(4)getName()" what you can see on the scroll... :cry:
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
lexdr
Posts: 108
Joined: Thu Dec 26, 2013 3:29 pm
Location: France

Re: Scroll with champion names

Post by lexdr »

I think you have missed the ":" before "getName()".

I've forgotten the direction but it works for me:
- a script with the following code
- a button that runs the function

Code: Select all

function spawnscript()
	spawn("scroll", party.level, party.x, party.y, 0, "special_scroll")
	:setScrollText(party:getChampion(1):getName().." has to kill "..party:getChampion(2):getName().." before I let you go")
end
The result: "Contar Stoneskull has to kill Mork before I let you go".
User avatar
THOM
Posts: 1281
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Scroll with champion names

Post by THOM »

Finally I got it.

I'm not a professional at scripting so I made a lot of mistakes...

But now it works!

"tschrage has to thank lexdr before I go"
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
Post Reply