well, this is awesome...i'm not sure if anyone cares, but somebody seemed interested in my idea of party dialogue.
I just discovered this
Code: Select all
function doHudPrint(text)
hudPrint(text)
end
function showDialogue()
delayedCall(self.go.id, 5.0, "doHudPrint", "Hello Lowly Mortal.");
delayedCall(self.go.id, 10.0, "doHudPrint", "I am going to speak to you using the HudPrint Method.");
delayedCall(self.go.id, 15.0, "doHudPrint", "And these message will appear on the screen.");
delayedCall(self.go.id, 20.0, "doHudPrint", "With 5 second gaps between them. All using one callback function.");
end
this will VASTLY improve my dialogue in my mod. I had tons of floor triggers everywhere, and in order to make sure the player stepped on them, i had to create "funnel" shaped hallways to force the player to step on the triggers.
so to take my example from a previous post
Code: Select all
function skinny()
playSound("power_attack_yell_human_female")
hudPrint (" "..party.party:getChampionByOrdinal(2):getName()..": Don't you just love skinny dipping in creepy ponds?")
end
function awesome()
playSound("damage_human_male")
hudPrint (" "..party.party:getChampionByOrdinal(3):getName()..": Yeah it's Awesome!")
end
function dressed()
playSound("damage_human_female")
hudPrint (" "..party.party:getChampionByOrdinal(4):getName()..": I guess we should, like...put our clothes back on or something")
end
function overthere()
playSound("power_attack_yell_human_male")
hudPrint (" "..party.party:getChampionByOrdinal(1):getName()..": We left them over there by the trees")
end
function wtf()
playSound("damage_human_female")
hudPrint (" "..party.party:getChampionByOrdinal(4):getName()..": like, wtf? it wasn't night when we got here...")
end
function showDialogue()
delayedCall(self.go.id, 1.0, "skinny", "");
delayedCall(self.go.id, 3.0, "awesome", "");
delayedCall(self.go.id, 5.0, "dressed", "");
delayedCall(self.go.id, 7.0, "overthere", "");
delayedCall(self.go.id, 9.0, "wtf", "");
end
those 5 lines of dialogue required 5 different floor_trigger objects.
but that extra showdialogue() function at the bottom means I only need 1 floor_trigger and i use the connector to call up the showdialogue function and BAM, 5 lines of text from one trigger with a time delay between them.
this means I not only have much less objects on my map, but I can also fit in a LOT more dialogue.