Author Topic: floaty text with local variables?  (Read 151 times)

Legacy_Alassirana

  • Full Member
  • ***
  • Posts: 103
  • Karma: +0/-0
floaty text with local variables?
« on: September 29, 2011, 12:37:57 am »


               I have an interesting problem that looks to be beyond the ability of the lilac soul generator to solve.  I am recreating the labyrinth of the minotaur, and want to have a group of players (defined by their deity field) to go and get Ariadne's Thread before going into the labyrinth.  In order to make traversing the labyrinth easier for those with Ariadne's Thread, I planned on having triggers set at various points in the labyrinth that would give floaty text to people with the Thread as to which direction to go.  Trying to keep my scripts streamlined, however, I've come up with the idea that maybe I could use a single script, but which would allow the floaty text part pull a string from a local variable on the individual trigger (thus one trigger might say east, another south, and the script would just plug in that direction when it says something along the lines of  'The string indicates you should go <insert directon>'.)  Can anyone come up with a script that will do that for me?  I fear it is far beyond my own understanding on how to do such things.

Alassirana
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
floaty text with local variables?
« Reply #1 on: September 29, 2011, 12:56:38 am »


               First, an observation; the string was meant to ensure the hero would be able to find their way back out of the maze, NOT help find the monster of the maze.

Second, each trigger, being in a specific location YOU the builder chooses, can have their own string variable entered onto them to tell the pc who HAS the item you key it to, or an alternate (or no text) for those lacking the item. If you need help scripting it in this manner, let me know and I'll give you sample code.

Be well. game on
GM_ODA
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
floaty text with local variables?
« Reply #2 on: September 29, 2011, 01:17:20 am »


               I agree with ehye, But here is the script pretty much the way you asked for it.  You would just need to fill in the Tag for your string, Then make the name of the trigger what ever you want the floaty text to be.  

void main()
{
    object oPC = GetEnteringObject();
    if (GetItemPossessedBy(oPC,"Tag Of String") != OBJECT_INVALID)\\
    {
      string sName = GetName(OBJECT_SELF);
      FloatingTextStringOnCreature(sName,oPC);
    }
}
               
               

               
            

Legacy_Alassirana

  • Full Member
  • ***
  • Posts: 103
  • Karma: +0/-0
floaty text with local variables?
« Reply #3 on: September 29, 2011, 10:43:34 pm »


               That looks like it is pretty much exactly what I wanted.  That should allow for my thread to work perfectly.  I'm having the thread being useful on the way in because I have a teleport stone that players can use to get out.  (and considering how much of a pain this maze is likely to be, some people are likely going to want to skip the quest, if they're on the side that doesn't have the thread...so I need to have the teleport stone active to allow them to give up if they choose to.).