If so, i'm looking for a script that when the door opens, the player is teleported to a waypoint (this, should obviously, be delayed by a second or two so that the door is seen opening
Could anyone help out here?
Thanks!
Modifié par Builder_Anthony, 07 septembre 2011 - 04:51 .
Shiek2005 wrote...
@ShaDoOoW: Thanks, but that does not work either.
GhostOfGod wrote...
The 3 default CEP door scripts are:
OnDeath: zep_doorkill
OnHearbeat: zep_doorspawn
OnUsed: zep_openclose
You will have to alter the OnUsed most likely if you want it to act as a transition. The top of the zep_openclose script explains how the doors work as far as opening and closing them gos.
Modifié par GhostOfGod, 07 septembre 2011 - 10:11 .
GhostOfGod wrote...
I don't think that particular door is supported by this system. It probably does not have an animation for it. All the ones that are supported and have animations, already have the scripts set up on them and have a variable on them to determine which gate block to use.
Rolo Kipp wrote...
<delicately painting...>GhostOfGod wrote...
I don't think that particular door is supported by this system. It probably does not have an animation for it. All the ones that are supported and have animations, already have the scripts set up on them and have a variable on them to determine which gate block to use.
What about using a default door and changing the appearance?
(I haven't fooled around much with doors, yet :-P Too many other pots to stir :-)
<...his signature on some else's masterpiece>
Rolo Kipp wrote...
<delicately painting...>GhostOfGod wrote...
I don't think that particular door is supported by this system. It probably does not have an animation for it. All the ones that are supported and have animations, already have the scripts set up on them and have a variable on them to determine which gate block to use.
What about using a default door and changing the appearance?
(I haven't fooled around much with doors, yet :-P Too many other pots to stir :-)
<...his signature on some else's masterpiece>
Have you tried the trick of putting in a door tile, adding the door, using "Adjust Location" to move the door to the precise place/orientation you want and deleting the doorway tile?Shiek2005 wrote...
The problem is that i'm trying to place a door in an exact position as oppossed to a doorway tile opening.
GhostOfGod wrote...
What you could do though is change its appearance to "Door: Basic 1(-5)
(NWN2)". These doors were made so that when rotated they turn on the
side of the door, not in the middle. So you can fake an animation by
making a script that rotates the door (SetFacing) and plays a sound.
Modifié par GhostOfGod, 08 septembre 2011 - 01:20 .
Modifié par Axe_Murderer, 08 septembre 2011 - 05:48 .
Axe_Murderer wrote...
Haven't used CEP in some time but this is what I used to use with it:
[nwscript]
//:://////////////////////////////////////
// void AutoCloseDoor( object oDoor, int bAutoLock. float fDelay = 12.50f)
// Automatically closes the specified door and optionally lock it after the given
// number of seconds. The door can be either a standard toolset door or a CEP style
// placeable door. Doors with no locks on them will not be locked even if the auto-lock
// option is used. The default is to wait 12.5 seconds before closing and the door is
// left unlocked.
//:://////////////////////////////////////
// Parameters: object oDoor - the door to be closed.
// int bAutoLock - if TRUE the door will also lock if it has a lock on it.
// if FALSE the door will remain unlocked even if it has a lock on it.
// default = FALSE.
// float fDelay - how long to wait before closing the door. default = 12.5 seconds.
//
// Returns: None.
//:://////////////////////////////////////
void AutoCloseDoor( object oDoor, int bAutoLock = FALSE, float fDelay = 12.50f);
void AutoCloseDoor( object oDoor, int bAutoLock = FALSE, float fDelay = 12.50f)
{ if( fDelay <= 0.0f) fDelay = 12.5f;
if( !GetIsObjectValid( oDoor)) return;
if( GetObjectType( oDoor) == OBJECT_TYPE_DOOR)
{ // Standard toolset door
if( GetIsOpen( oDoor)) AssignCommand( oDoor, DelayCommand( fDelay, ActionCloseDoor( oDoor)));
if( GetLockLockable( oDoor)) AssignCommand( oDoor, DelayCommand( fDelay +0.1f, ActionDoCommand( SetLocked( oDoor, bAutoLock))));
}
else if( GetObjectType( oDoor) == OBJECT_TYPE_PLACEABLE)
{ string sGateBlock = GetLocalString( oDoor, "CEP_L_GATEBLOCK");
if( sGateBlock != "")
{ // CEP placeable door
if( GetIsOpen( oDoor)) AssignCommand( oDoor, DelayCommand( fDelay, PlayAnimation( ANIMATION_PLACEABLE_CLOSE)));
if( !GetIsObjectValid( GetLocalObject( oDoor, "GateBlock")))
{ object oGateBlock = CreateObject( OBJECT_TYPE_PLACEABLE, sGateBlock, GetLocation( oDoor));
if( GetIsObjectValid( oGateBlock)) AssignCommand( oDoor, DelayCommand( fDelay +0.1f, SetLocalObject( oDoor, "GateBlock", oGateBlock)));
else AssignCommand( oDoor, DelayCommand( fDelay +0.1f, DeleteLocalObject( oDoor, "GateBlock")));
}
if( GetLockLockable( oDoor)) AssignCommand( oDoor, DelayCommand( fDelay +0.2f, ActionDoCommand( SetLocked( oDoor, bAutoLock))));
}
else
{ // Standard toolset placeable door.
if( GetLocalInt( oDoor, "IsOpen"))
{ AssignCommand( oDoor, DelayCommand( fDelay, PlayAnimation( ANIMATION_PLACEABLE_CLOSE)));
AssignCommand( oDoor, DelayCommand( fDelay +0.1f, DeleteLocalInt( oDoor, "IsOpen")));
}
if( GetLockLockable( oDoor)) AssignCommand( oDoor, DelayCommand( fDelay +0.2f, ActionDoCommand( SetLocked( oDoor, bAutoLock))));
}
}
}
[/nwscript]
Modifié par Shiek2005, 09 septembre 2011 - 06:04 .
Modifié par GhostOfGod, 09 septembre 2011 - 08:49 .