Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Do Papyrus recognize If with SetOpen?


Wolfstorm321
 Share

Recommended Posts

Or I'm doing something wrong? 

There are two statues, set with initially disabled. 

Then you have two levers, each lever enable one statue. 

Then you have a pull-bar, to open a gate. 

The gate will only open if the two statues are in place. 

So you pull the two levers, use the pull bar and that's it, gate opened. 

But Papyrus is not recognizing the IF. It just open the gate already at start, with or without the statues in place, it makes no difference. 

Here is the script: 

Scriptname PuzzlePullBar extends ObjectReference

ObjectReference Property Object1 Auto
ObjectReference Property Object2 Auto
ObjectReference Property Gate Auto

Event onActivate (objectReference triggerRef)

If (Object1 == IsEnabled() && Object2 == IsEnabled())
    Gate.SetOpen()
Endif    

EndEvent

Removing the ( after the IF had no effect. Using "and" in place of "&&" will not compile. 

The SetOpen works both with a door, a gate, or a traplinker (for gates that uses movable spikes). 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...