Jump to content

KvatchCastlePortcullis02 problem


inggrish

Recommended Posts

Hi, on my mod I am trying to put a portcuillis controlled by two levers on the front gate of my castle. I have tried a lot of jiggling around with scripts, but for some reason, the closing animation does not ever work properly on the "KvatchCastlePortcullis02" portcullis model. Is this a mproblem with the scripts or a problem with the mesh???

 

I have tried this wioth only one lever and it still dosent like closing. The opening animation works fine; but when I pull the lever again to close the gate, it starts closiong but when it is almost fully closed the p[ortcullis jumps back to the open position and plays the closing animation again and again and again; and the only way to stop it from doing this repeatedly is just to load a previous save game!!!

 

 

Please help anyone

 

Thanks for your time

 

Matt (Inggrish) :wallbash:

Link to comment
Share on other sites

Hi, on my mod I am trying to put a portcuillis controlled by two levers on the front gate of my castle. I have tried a lot of jiggling around with scripts, but for some reason, the closing animation does not ever work properly on the "KvatchCastlePortcullis02" portcullis model. Is this a mproblem with the scripts or a problem with the mesh???

 

I have tried this wioth only one lever and it still dosent like closing. The opening animation works fine; but when I pull the lever again to close the gate, it starts closiong but when it is almost fully closed the p[ortcullis jumps back to the open position and plays the closing animation again and again and again; and the only way to stop it from doing this repeatedly is just to load a previous save game!!!

 

 

Please help anyone

 

Thanks for your time

 

Matt (Inggrish) :wallbash:

Check the scripting, it should be using playgroup backward to close the gate, and this portion of the script should become invalid as soon as it is triggered by condition.

Link to comment
Share on other sites

Check the scripting, it should be using playgroup backward to close the gate, and this portion of the script should become invalid as soon as it is triggered by condition.

 

Erm, sorry, could you rephrase that? I don't fully understand (I am still a bit of a noob with scripting!!!)

 

Cheers

 

Matt

 

 

ps: Sorry to moderators for double posting this post; I was sure that it didn't work at first!

Link to comment
Share on other sites

Essentially, use something like;

scn IngTypicalGateSwitchScript0231

ref gate
ref self
short triggered

begin onactivate
set gate to getparentref
set self to getself
if triggered != 1
self.playgroup forward
gate.playgroup forward
set triggered to 1
elseif triggered == 1
self.playgroup backward
gate.playgroup backward
set triggered to 0
endif
end

in the case of one switch and one gate. Just set the gate to be the parent of the switch. If you want another switch to share the same animations, you'll need to make both switches persistent and named references. And do something like

scn IngTypicalGateSwitchScript0231

ref gate
short triggered

begin onactivate
set gate to getparentref
set self to getself
if triggered != 1
<switch1ref>.playgroup forward
<switch2ref>.playgroup forward
gate.playgroup forward
set triggered to 1
<switch2ref>.set triggered to 1
elseif triggered == 1
<switch1ref>.playgroup backward
<switch2ref>.playgroup backward
gate.playgroup backward
set triggered to 0
<switch2ref>.set triggered to 0
endif
end

In both cases assuming that the switch being used is one which has those animations. An onactivate block will only run when the switch is activated. The animations played by both the gate and the switch are controlled by use of a condition which becomes invalid after the switch has been pressed, meaning that the alternate animation will always get used once the first one has played.

Link to comment
Share on other sites

OK, I tried using it and adapting it, but I got an error message: "missing parameter flags" what does that mean???

 

this was the error message:

 

---------------------------

Script Error

---------------------------

Script 'edencastleportcullishandlescript', line 11:

Missing parameter Flags.

 

Compiled script not saved!

---------------------------

OK

---------------------------

 

 

 

The final script was:

 

 

scn edencastleportcullishandlescript

 

ref gate

ref self

short triggered

 

begin onactivate

set gate to getparentref

set self to getself

if triggered != 1

edencastlegatehandle1.playgroup forward

edencastlegatehandle2.playgroup forward

gate.playgroup forward

set triggered to 1

edencastlegatehandle2.set triggered to 1

elseif triggered == 1

edencastlegatehandle1.playgroup backward

edencastlegatehandle2.playgroup backward

gate.playgroup backward

set triggered to 0

edencastlegatehandle2.set triggered to 0

endif

 

end

 

 

cheers

 

Matt

Link to comment
Share on other sites

OK, I tried using it and adapting it, but I got an error message: "missing parameter flags" what does that mean???

 

this was the error message:

 

---------------------------

Script Error

---------------------------

Script 'edencastleportcullishandlescript', line 11:

Missing parameter Flags.

 

Compiled script not saved!

---------------------------

OK

---------------------------

That means that there's a problem starting at line 11, probably with the function. The function on line 11 is playgroup, so check the wiki to see if anything else is needed.

http://cs.elderscrolls.com/constwiki/index.php/PlayGroup

Link to comment
Share on other sites

This isn't fair. It just REFUSES to work properly. Itys not just me working on it now, I have a few mates at it and we are tryiong every combination, but it always seems to be thatthe closing animation always loops. No matter what.

 

 

grrr

 

please help!!!

Link to comment
Share on other sites

This isn't fair. It just REFUSES to work properly. Itys not just me working on it now, I have a few mates at it and we are tryiong every combination, but it always seems to be thatthe closing animation always loops. No matter what.

 

 

grrr

 

please help!!!

Can you post your scripts? Off hand, looking at the mesh, there doesn't seem to be anything which might cause this, however it is possible that the mesh, or the scripted object is designed to always be open simply because that's all it had to do in the game. This could still be fixed, but it may require some re-working of resources.

Link to comment
Share on other sites

scn edencastleportcullishandlescript

 

ref gate

ref self

short triggered

 

begin onactivate

set gate to getparentref

set self to getself

if triggered != 1

edencastlegatehandle1.playgroup forward 1

edencastlegatehandle2.playgroup forward 1

gate.playgroup forward 1

set triggered to 1

edencastlegatehandle2.set triggered to 1

elseif triggered == 1

edencastlegatehandle1.playgroup backward 1

edencastlegatehandle2.playgroup backward 1

gate.playgroup backward 1

set triggered to 0

edencastlegatehandle2.set triggered to 0

endif

 

end

 

 

 

 

As i said, there has been a few combinations revolving around this script. Hmm, :(, can you see the problerm or what would make it work?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...