Author Topic: help with two scripts, one area  (Read 336 times)

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
help with two scripts, one area
« on: April 27, 2011, 11:02:02 pm »


               Hi all,

I have a question about using two different scripts for one area.

I have road maps that reveal areas to players, but I want to put a script in dungeons that blank out the maps... would it override the road map script?

Thank you '<img'>
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
help with two scripts, one area
« Reply #1 on: April 28, 2011, 04:49:49 pm »


               Well I think most of the map revealing script are basically OnEnter reveal the whole area. And then the blackout scripts are usually OnHeartbeat or done via a bunch of triggers in the area. So you will need to add checks to either script to tell it what you want it to do. If you don't want the blackout script to black the area out if they have a map then you will need to put a check in the script for the map for that area. Or if you still want the area blacked out despite the fact that they have the map then it should still black out since this happens after the initial revealing.
Really just depends on how you want it to work but it should be easily doable.
               
               

               


                     Modifié par GhostOfGod, 28 avril 2011 - 03:50 .
                     
                  


            

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
help with two scripts, one area
« Reply #2 on: April 28, 2011, 07:43:28 pm »


               Yes, I want the dungeon areas blacked out despite having maps. Thanks sweetie. '<img'>
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
help with two scripts, one area
« Reply #3 on: April 28, 2011, 08:35:27 pm »


               Assuming that you are using the OnEnter for the reveal and the OnHeartbeat for the blackout, the only problem you are going to run into is that sometimes the player will get a glimpse of the whole dungeon before the first area HB blacks it out for them. If this is something you definitely don't want to happen then you will have to do something like add an integer variable to each area that you don't want revealed and put a check in your "reveal" script for it. If found then return out of it. Or another option might be to put a trigger down in the same spot the players enter the area. Then use It's OnEnter to blackout the map again right away before the player gets to see anything.
               
               

               


                     Modifié par GhostOfGod, 28 avril 2011 - 07:37 .