Bienvenue sur JeuxOnLine - MMO, MMORPG et MOBA !
Les sites de JeuxOnLine...
 

Panneau de contrôle

Recherche | Retour aux forums

JOL Archives

Voila pourquoi les murs coulissant du LOK dungeon n'ont pas un placeable animate!

Par Elmo le 15/1/2003 à 7:29:36 (#3024739)

Sorry, much as I'd love to be able to make that that easy to work it just doesn't work with the current engine. I had to use two models one closed with a pwk mesh that blocks movement and another open with a pwk that allows movement. Because you can't animate the pwk's there's no way to make it work by being able to be walked through when its open and no walked through when its closed. It'll either always be open or always be closed.

I thought about making it a door which would be quite possible. But that meant that the 'secret' door was always selectable and highlighted when you put your cursor over it and you go the bash/unlock/etc options. Not the most secret of doors.

So in the end the create/destroy was the only way to make it work. And even that's a hak because placeable items don't block line of sight you can shoot things through the wall. I can't even make it a tile with a secret door in it because you can't animate the wokmeshes in tiles either. To sum up, this engine sucks for this kind of thing and anything we do is always going to be a hak and a pain in the ass to come up with. As much as I like the openness of NWN the limitations of the engine put some serious roadblocks for doing things.

Sorry I don't have better news for you.

D


j'avais pas pensé à ça!

Par Jaha Effect le 15/1/2003 à 9:57:45 (#3025223)

Tu devrait mettre l'adresse ou tu as trouvé le Hak et le système d'ouverture avec un levier dans ce post et faire un persistant non?

Jaha Effect :D

Par Elmo le 15/1/2003 à 17:07:02 (#3028900)

bonne idée!

alors voila l'adresse du hak:
http://nwvault.ign.com/Files/hakpacks/data/1042412322468.shtml

et le script!

void SpawnSomething(string szClass, location lWhere);
void CloseWall();
void OpenWall();

void main()
{
object oMur1 = GetNearestObjectByTag ("mur_s_1");
object oMur2 = GetNearestObjectByTag ("mur_s_2");
object oLevier = OBJECT_SELF;


int Levier;

if ( GetLocalInt( oLevier, "Actif" ) != TRUE )
{
SetLocalInt( oLevier, "Actif", TRUE );
PlayAnimation( ANIMATION_PLACEABLE_ACTIVATE );
}
else
{
SetLocalInt( oLevier, "Actif", FALSE );
PlayAnimation( ANIMATION_PLACEABLE_DEACTIVATE );
}
Levier = GetLocalInt (oLevier,"Actif");


if (Levier == TRUE)
{
AssignCommand( oMur1, OpenWall() );
}
else
{
AssignCommand( oMur2, CloseWall() );
}
}

void CloseWall()
{
location mylocation = GetLocation(OBJECT_SELF);
PlayAnimation(ANIMATION_PLACEABLE_OPEN, 1.0, 0.0);
RecomputeStaticLighting(GetArea(OBJECT_SELF));
DelayCommand(2.0,SpawnSomething("lokwallsecclo", mylocation));
DelayCommand(2.1, RecomputeStaticLighting(GetArea(OBJECT_SELF)));
DestroyObject(OBJECT_SELF,2.5);
}

void OpenWall()
{
location mylocation = GetLocation(OBJECT_SELF);
PlayAnimation(ANIMATION_PLACEABLE_OPEN, 1.0, 0.0);
CreateObject(OBJECT_TYPE_PLACEABLE,"lokwallsecopen", mylocation, FALSE);
RecomputeStaticLighting(GetArea(OBJECT_SELF));
DestroyObject(OBJECT_SELF,0.5));
RecomputeStaticLighting(GetArea(OBJECT_SELF));
}



//Spawn in the creature function.
void SpawnSomething(string szClass, location lWhere)
{
CreateObject(OBJECT_TYPE_PLACEABLE, szClass, lWhere);
}


SOS MODOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO! :D

JOL Archives 1.0.1
@ JOL / JeuxOnLine