Script problem - a chick check maybe?

Post » Thu Apr 11, 2013 10:35 pm

So, first steps with scripting, yay! :tongue:
So, the idea is to create a door (portcullis-like) that will close after player enters them. I made a simple script for the Trigger od the door, but it doesn't look like it works. Could someone with more experiance check it out?


Scriptname ItsATrapDRZWIskrypt extends ObjectReference

Actor Property PlayerREF Auto
bool RunOnce
objectReference property NorSecRmSmDoorSmDUPLICATE002 auto
bool Function Activate(ObjectReference akActivator) native

Event OnTriggerEnter(ObjectReference akActionRef)
If NorSecRmSmDoorSmDUPLICATE002.SetOpen(false) && !RunOnce && akActionRef == PlayerREF ; This condition ensures that only the player will trigger this code
RunOnce = True
SetOpen(NorSecRmSmDoorSmDUPLICATE002 akObjectReference)
EndIf
EndEvent

-----
The ccompilation throws out this:
"D:\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\ItsATrapDRZWIskrypt.psc(11,11): no viable alternative at input 'NorSecRmSmDoorSmDUPLICATE002'
D:\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\ItsATrapDRZWIskrypt.psc(11,57): required (...)+ loop did not match anything at input ')' "
User avatar
Mrs shelly Sugarplum
 
Posts: 3440
Joined: Thu Jun 15, 2006 2:16 am

Return to V - Skyrim