inggrish Posted February 14, 2009 Author Share Posted February 14, 2009 OK, having tested this very script with another gate (an oblivion war gate) it works fine. There must be a problem with this model of portcullis??? :S This dosent help really though, since I want a portcullis, and that one is the only decent one available! Do you know of any portcullis models around? Link to comment Share on other sites More sharing options...
theuseless Posted December 15, 2009 Share Posted December 15, 2009 I seem to be having the Exact same problem. I have the playgroups set fine, the scripts following work perfectly for me with other gates. I'm only having issues with this one gate for the moment, KvatchCastlePortcullis02. I have the following script running on the Switch: scn tUL665TharnstEntOpenerScript ; activates parent after a 2 sec delay short open short next short busy float timer ref mySelf ref myParent begin onActivate ;tells the switch what to do when activated if busy == 0 if open == 0 playgroup forward 1 set open to 1 set next to 1 set timer to 2 else playgroup backward 1 set open to 0 set next to 1 set timer to 0.5 endif set busy to 1 endif end begin gameMode ;sets up references and tells the switch that when it is activated, to activate it's parent reference if next == 1 && timer <= 0 set mySelf to getSelf set myParent to getParentRef myParent.activate mySelf 1 set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif if timer > 0 set timer to timer - getSecondsPassed endif end begin onReset ;resets the switch when the cell resets reset3DState set next to 0 set open to 0 set busy to 0 end and the actual gate script: scn tUL665TharnstEntDoorScript short init short next short lowered short busy ref mySelf ref myParent begin onActivate ;tells the drawbridge what to do when activated if isActionRef player == 1 if lowered == 0 message "This gate is lowered remotely." else message "This gate is raised remotely." endif elseif isActionRef mySelf == 0 && busy == 0 if lowered == 0 ;if activated and the bridge is up, push the bridge down playgroup forward 0 set lowered to 1 else playgroup backward 0 ;if activated when the bridge is down, pull the bridge up set lowered to 0 endif set next to 1 set busy to 1 endif end begin gameMode if init == 0 ; set up ref variables set mySelf to getSelf set myParent to getParentRef set init to 1 endif if next == 1 myParent.activate mySelf 1 ; this says "if I am activated, activate my parent reference" set next to 0 endif if isAnimPlaying == 0 && busy == 1 set busy to 0 endif end I copied the script from a tutorial I went through. It is missing a small bit of code (to reverse the gate/bridge's original appearance) to try to attempt to fix this. (I omitted the enable/disableLinkedPathPoints in this one for clarity) There were no changes. Did nothing. The code looks clean on paper... So then I found my way here and tried the script that the brilliant Vagrant0 posted. I had to set the playgroup variables (i set them to 0) so that the code looks like this: scn tULTharstEntOpenerTESTScript ref gate ref self short triggered begin onactivate set gate to getparentref set self to getself if triggered != 1 self.playgroup forward 0 gate.playgroup forward 0 set triggered to 1 elseif triggered == 1 self.playgroup backward 0 gate.playgroup backward 0 set triggered to 0 endif end This works like a beauty on everything else, but won't solve the problem with the animations. Now I know that its a problem with either the CS, the gate anim, or my comp. Thanks for the code to kill clutter scripts Vagrant0. I will still use the longer scripts for complex daisy chains, but those simple ones help a lot. I hope that there is a solution to this, Matt (Inggrish). If you happen to find either a solution or a mod that allows a cool gate as a modder's resource, please let me know. I will do the same, theuseless Link to comment Share on other sites More sharing options...
inggrish Posted December 15, 2009 Author Share Posted December 15, 2009 Thanks, Im glad it wasn't just a problem at my end! Haha, I want a decent portcullis to woprk still too. Oh well, yeah I will keep you updated. Ill PM you as well as adding a comment on here in case ytou dont check this (if i find a solution) ;) Matt (Inggrish) Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 15, 2009 Share Posted December 15, 2009 have you tried calling "playgroup forward" or "playgroup backward" in console with a non-scripted gate? The problem might not be the gate, but the switch that is used. By removing the element of a script or a trigger from the equation, you should be able to see if the problem is the gate itself or not. There is another portcullis type that can be used, under the ruined fort set I think. If you still can't get the kvatch one to work, you might be able to just replace the visual parts of that mesh with the visual parts of the kvatch mesh, or use it as is. Link to comment Share on other sites More sharing options...
theuseless Posted December 16, 2009 Share Posted December 16, 2009 Hey there buddy. Back again. I found a portcullis that works with any of the aforementioned scripts, tho not nearly so grandiose. It is located at Activators/Dungeons/Caves. You get the CGate01 and the open version as well. I have tried these extensively with all the aforementioned scripts and other, vanilla, scripts. They animate perfectly as long as you use Vagrant0's first script as is. If you want to link them to other stuff, the scripting is already present vanilla. For a funny repeat effect (funny after I found my fix lol) try triggering the doors with vanilla rfswitch01. I haven't tried to modify the scripts to add the damage effects from the mace traps, but I'm sure its possible. Anyways, you can scale these gates up if you so choose, just remember to make a unique activator with functioning scripts attatched to open them. I hope this solves your problem (the portcullis style gates come fully decked out with architecture to make them look nice and smooth. I'll pm you this as well to make sure that you aren't wasting all your time looking for answers like I did :thumbsup: Hope this helps you out,theuseless Link to comment Share on other sites More sharing options...
Recommended Posts