Author Topic: Area Transition on Snowy Pine Tree (placeable)  (Read 765 times)

Legacy_Artine

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« on: November 25, 2010, 12:01:03 am »


               I'm new to scripting (looking-at-noobscorner.Jassper.com-new), and I've set up a Christmas Module (I plan to release this on the vault later), but it's really just in the works as of this moment. The closest I've come, manually without scripting, is to draw an area transition that is placed below the tree, to have the tree itself be highlighted and therefore clickable. I want to eliminate this though and instead make the tree clickable, and when clicked it will take the player back to the main area. It would help if I could link the tree's area transition to a door, if possible.
Thanks in advance '<img'>

Edit: Also, if someone could figure out how to make it snow inside (I've spent a few days searching and haven't found any), that would be cool too '<img'>
               
               

               


                     Modifié par Artine, 25 novembre 2010 - 12:31 .
                     
                  


            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« Reply #1 on: November 25, 2010, 03:19:10 am »


               

Artine wrote...

I'm new to scripting (looking-at-noobscorner.Jassper.com-new), and I've set up a Christmas Module (I plan to release this on the vault later), but it's really just in the works as of this moment. The closest I've come, manually without scripting, is to draw an area transition that is placed below the tree, to have the tree itself be highlighted and therefore clickable. I want to eliminate this though and instead make the tree clickable, and when clicked it will take the player back to the main area. It would help if I could link the tree's area transition to a door, if possible.

Put this script in the tree's OnUsed event (change DoorTag to your door's tag):

void main()
{
object oPC = GetLastUsedBy();
object oDoor = GetObjectByTag("DoorTag");
AssignCommand(oPC, JumpToLocation(GetLocation(oDoor)));
}

Artine wrote...

Edit: Also, if someone could figure out how to make it snow inside (I've spent a few days searching and haven't found any), that would be cool too '<img'>

Go to the Advanced tab of the area's properties and change the Terrain Type from Interior to Exterior then go to the Visual tab, customize environment and set the snow to 100%.

-420
               
               

               
            

Legacy_CheeseshireCat

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« Reply #2 on: November 27, 2010, 06:38:06 am »


               You would also need to mark the tree itself as Usable instead of Static, and, preferably, set Plot (indestructible) flag on it, too.

Also, just transitioning on use could not be too fun if you don't mean it as a surprise -- do that after a short conversation, or on a second and subsequent use, instead



void main()

{

object oPC = GetLastUsedBy();

int iTalked = GetLocalInt (oPC, "treeopen");

if (iTalked)

{

 object oDoor = GetObjectByTag("DoorTag");

 AssignCommand(oPC, JumpToLocation(GetLocation(oDoor)));

}

else

{

 SpeakString ("Blah blah blabber blah");

 SetLocalInt (oPC, "treeopen", TRUE);

}

}


               
               

               
            

Legacy_Artine

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« Reply #3 on: November 27, 2010, 10:49:21 pm »


               Awesome, thank you both '<img'> You were both a huge help! If I could do something in return, I would '<img'>
               
               

               
            

Legacy_CheeseshireCat

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« Reply #4 on: November 28, 2010, 05:20:00 pm »


               Make a fun module? '<img'>
               
               

               
            

Legacy_Artine

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Area Transition on Snowy Pine Tree (placeable)
« Reply #5 on: November 28, 2010, 08:10:19 pm »


               That's the goal, and I'll definitely have more questions, but... '<img'>

Also, I request that this thread not be locked and/or deleted until I can save this page, as my computer's power supply is shot at the moment, if you mods don't mind '<img'>

Edit: Turns out it wasn't the power supply when I took it in, it was the motherboard '<img'> Getting new computer though, should be here within a week '<img'>! Wrong model, this one's a large form factor and I needed a small '<img'> Oh well, at least this one works, but the project is unfortunately still on hold '<img'> Should be getting the right one soon, then I'll trade XD
               
               

               


                     Modifié par Artine, 06 décembre 2010 - 11:46 .