Aller au contenu

Photo

help with two scripts, one area


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
archer4217

archer4217
  • Members
  • 105 messages
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 :)

#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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 .


#3
archer4217

archer4217
  • Members
  • 105 messages
Yes, I want the dungeon areas blacked out despite having maps. Thanks sweetie. :)

#4
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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 .