How to make a Spell like Console command?

Post » Sat Nov 17, 2012 6:51 pm

I'd like to make a spell with this command, which works in the game console: "unlock"

It serves to unlock everything is locked. For this to work, I would have to open the console, in the game, click its object to be unlocked and put this code. Okay, now would be unlocked.

I wonder how using this effect only with spell instead of the console. For example, work like a Firebolt spell, when you attack the spell, if you hit on someone, caught fire. The same thing in here, so will unlock if you get in a locked item.

Can you do that? Logic requires a script, I tried to do here with the attributes that are given in CK, but could not. Could you also make a restraining: If the lock requires a key, can not be unlocked by this spell?

If anyone can help me, thank you very much!
User avatar
lauraa
 
Posts: 3362
Joined: Tue Aug 22, 2006 2:20 pm

Post » Sat Nov 17, 2012 4:50 pm

http://www.creationkit.com/Lock_-_ObjectReference
http://www.creationkit.com/GetLockLevel_-_ObjectReference (if it returns 255, it can only be opened with a key)

http://www.creationkit.com/GetKey_-_ObjectReference (it will return the key's form ID if any)
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Sat Nov 17, 2012 11:00 pm

http://www.gamesas.com/user/766649-amethyst-deceiver/

Sorry dude, I really don't know how to put a script correctly :confused:
I get it what you meant, and I tried here but no works for me. But thx for the reply!
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Sun Nov 18, 2012 3:14 am

you would likely have to use a story manager event based alias system, if you want to have the script apply to any locked container. it's a bit difficult to explain, but you can start by looking here
http://www.creationkit.com/Story_Manager

basically the story manager picks up an event (in this case probably a location change event). that event triggers your quest (which is set up to start on event). in which case it fills your quest alias with the nearest container(s). you can attach the script to your alias.

in the script you would use an OnHit event to run your lock queries
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm


Return to V - Skyrim