Aller au contenu

Photo

Cave opening 'doors' not firing script


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

#1
El Condoro

El Condoro
  • Members
  • 148 messages
I have a script that fires properly when called from a standard door (OnOpen) but will not run from a cave opening 'door'. I have tried using OnUse but that didn't work, either. Is there a trick to getting scripts to fire from these types of 'doors'? Cheers

#2
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
I think there's an OnClick choice that you can fire up and use that as a transition. Not sure. That's an area I know very little of.

dno

#3
El Condoro

El Condoro
  • Members
  • 148 messages
The transition works fine - it's just the associated script won't fire. In the menatime, I have just adopted a trigger approach - one at either end of the transition to manage the scripts. I did notice the cave door had an opened status but it still didn't fire when I changed it to closed.

#4
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
As you may have noticed, cave doors are "open" by default. You can set them to "closed" in their properties, but then a player needs to click them twice to transition through. The first to "open" the door (though there is no opening/closing animations) and second to actually transition. If the cave door is closed, it will play the "squeaky door" sound when you "open" it.



Without knowing more about the specifics of what your script does, I can't make a better suggestion as to where to fire it from. DNO's suggestion of using OnClick is sound for most situations.

#5
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Doors also have a habit of all jumping on to the same doorframe, especially if you copy and paste a lot. It's possible that you actually have 2 or more cave doors occupying the same cave.

#6
El Condoro

El Condoro
  • Members
  • 148 messages
The trigger approach seemed like a work-around rather than a fix so I had another go at the problem.
To get the process to work:
1, Check only one door on the cave entrance
2. Set the door to open status
3. Use the OnClick
4. Check the script found object oPC = GetClickingObject()
5. The script included the transition (JumpPartyToObject(oWP) or AssignCommand(oPC,ActionJumpToObject(oWP))
6. Set the door to have a transition (either door or waypoint worked)
Without the transition set the script did not fire. There was no need to set any other options (tag of waypoint or door).
With these settings the cave now functions as intended.
Thanks for all tips and help.
Cheers

Modifié par El Condoro, 26 décembre 2010 - 09:00 .