Page 1 of 1

Use code to label wall text?

Posted: Fri Sep 04, 2015 1:39 am
by barronvonburp
Is there any way to do this? I'd imagine so, maybe use a script to create it with a certaint orientation, text, and height, and remove the old one when needed?
Also another related thing, how to call up the party's heroes names, and put them on said wall text?

Re: Use code to label wall text?

Posted: Fri Sep 04, 2015 2:34 am
by Isaac
Spawning a text wall via script:

Code: Select all

--build text from champion names, for the wall.
heroes = ""
for x = 1,4 do 
	if party.party:getChampion(x):getEnabled() then
		heroes = heroes.."\n"..party.party:getChampion(x):getName()
	end
end

--create the wall_text.
spawn("dungeon_wall_text", 1, 15, 15, 2, 0).walltext:setWallText( heroes )
________________________________________________________________________
-- spawn( [object] , [level] , [X] , [Y] , [facing] , [elevation] , [optional object id] )
:setWallText( [text string] )

Re: Use code to label wall text?

Posted: Fri Sep 04, 2015 4:15 am
by barronvonburp
Couple of questions: One how do I add something before the heroes names on the wall, [s]<s>and what does "level" reference in spawn?</s>[/s] -- Tried to strikethrough, did not work. I figgured out the level thing.

Re: Use code to label wall text?

Posted: Fri Sep 04, 2015 5:58 am
by Isaac
barronvonburp wrote:Couple of questions: One how do I add something before the heroes names on the wall, [s]<s>and what does "level" reference in spawn?</s>[/s] -- Tried to strikethrough, did not work. I figgured out the level thing.
Two dashes are used to comment out a line; the interpreter ignores the line.

To add text before the names is very easy in this case. Simply change the heroes variable from " " to whatever text you want.

Code: Select all

heroes = "Custom Message"