is this possible?
Moderators: Haplo, Lead Developers
-
- Member
- Posts: 28
- Joined: Mon Sep 17, 2007 9:11 pm
is this possible?
since I am not to good at scripting, my friend had this idea and idk if it is possible to sciprt. a "keyblade" that has power to unlock doors when you swing the blade at it.
The best I could do was give the player a spell that would open locks while having the weapon equipped
The OnPCEquip variable, if declared in a script on the item, will automatically be changed to 1 when a player equips an item and 0 when a player unequips it. This script should (though I can't quite guarantee as I haven't tested this version) give the player a spell (currently "unlock_spell") whenever the item is put on, and remove the spell when the weapon is unequipped. If you put this script on a sword, make a custom unlock spell for it (unlock 100 pts touch, no cost spell or something like that) and put the spell's name in for "unlock_spell", it should hopefully work.
Code: Select all
begin keyswordscript
short spellequip
short OnPCEquip
if ( OnPCEquip == 1 )
if ( spellequip == 0 )
set spellequip to 1
player->AddSpell "unlock_spell"
endif
endif
if ( OnPCEquip == 0 )
if ( spellequip == 1 )
set spellequip to 0
player->RemoveSpell "unlock_spell"
endif
endif
end
Last edited by Zalzidrax on Thu Sep 20, 2007 5:41 pm, edited 1 time in total.
- Andres Indoril
- Senior Developer
- Posts: 1459
- Joined: Fri Jan 13, 2006 9:01 pm
- Location: Lost.... Somewhere?
- Contact:
Shouldn't the second AddSpell be RemoveSpell?
[url=http://andresindoril.blogspot.com/][img]http://i45.photobucket.com/albums/f94/Andres_Indoril/siggyleft.jpg[/img][/url][url=http://www.youtube.com/user/AndresIndoril][img]http://i45.photobucket.com/albums/f94/Andres_Indoril/siggyright.jpg[/img][/url]
"You guys are no fun, I'll start my own TR with dead children and toy guars!" -Why
"You guys are no fun, I'll start my own TR with dead children and toy guars!" -Why
if it's in morrowind, you can open the lockpicks menu in the construction set, right click press add new item. Select what weapon you want the pick to look like.(make sure you have your CS disk in) and search through the folders until you find the weapons one. now choose your weapon and place it ingame. It will work as a lockpick but it will be a sword. (there might be some other steps I havent used the Morrowind CS in awhile)
~CrazedOne~
-wissen ist enrgie-
-wissen ist enrgie-