Daedthr Posted March 7, 2015 Share Posted March 7, 2015 (edited) I'm trying to make a new type of telekinesis spell, in which the object being pulled is contained in a ball of air. Creating the FX is no problem, what I need to know is how I would put it on an item. Initially I considered creating a second spell effect which would be a script effect, that would enchant the item with an effect that shows the FX (think Chillrend), however you can only enchant armour and weapons, which isn't particularly useful were I to use the spell to pick up a plate. In short, I need a way to make any movable item in the game gain a magic effect when I cast a spell at it. As of yet I'm inclined to think it can't be done, as there is very little you can actually do to things like MiscItems, in most cases they're literally just a mesh with a weight and value. If anyone has any ideas they'd be greatly appreciated. EDIT: I'm going to try scripting it in using the Cast command, if that doesn't work I don't know what will. Edited March 7, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Daedthr Posted March 7, 2015 Author Share Posted March 7, 2015 So an update, I've started doing the scripting. But I'm in need of a way to identify the target object reference of a telekinesis spell. The thing is, all the telekinesis spells in the game are Concentration on Self spells, which I suspect will mean tat if I use GetTargetActor it would just produce the caster. Furthermore, normal telekinesis doesn't pull actors, it pulls items. Does anyone know of a way to identify the target (the object that is being pulled) of a telekinesis spell? Link to comment Share on other sites More sharing options...
Elathia Posted March 7, 2015 Share Posted March 7, 2015 (edited) I will put this in the simplest terms: The Telekinesis Archetype is ****blocking you from getting the reference to the target it is pulling. Archetypes are generally terrible if you intended on doing something with the reference they influence. A theory you can try and will require SKSE, is using GetNumRefs(). Narrowing the search down by the type. In theory not even a hardcoded archtype should stop that function from getting the reference. You will then need to do stuff with it using GetNthRef(). http://www.creationkit.com/GetNumRefs_-_Cell Addendum: http://www.creationkit.com/GetType_-_Form ^List of types you can pass as the filter for both functions. This will take some crafty scripting skills but I think it can be done. Edited March 7, 2015 by Elathia Link to comment Share on other sites More sharing options...
Daedthr Posted March 7, 2015 Author Share Posted March 7, 2015 (edited) I feel like smashing my head against the wall right now. All I needed to do was use "GetPlayerGrabbedRef". That's actually a ******* command. So basically, I make a secondary effect to the spell which is a script effect that gets me the reference ID of the item the player is "grabbing". The script then gets this reference ID to cast a spell that cloaks it, because the "Cast" function works on anything and doesn't use the animation. Thanks for trying though/ Edited March 7, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Elathia Posted March 7, 2015 Share Posted March 7, 2015 Interesting actually. One would think that function only works if you Z keyed something. (like grabbing a corpse). Link to comment Share on other sites More sharing options...
NethanielShade Posted March 8, 2015 Share Posted March 8, 2015 I would have thought to examine a spell. Lightning, frost and fire spells all put a 'burning' or other FX on the item. You could have examined how that worked.Sorry not the best at technical jargon, my modding usually consists of reverse engineering to achieve results how I want them. Link to comment Share on other sites More sharing options...
Daedthr Posted March 8, 2015 Author Share Posted March 8, 2015 (edited) Initially I thought that too, but I don't think Hit Effects work on items, as in you can cast a fireball at an NPC and they'll burn, do it on an item and the item will just be knocked over and they'll be an ash mark where the spell hit, but the item won't actually burn. So I've been working on the script and it compiles with no errors. Scriptname LoKAirBallGetRefScript extends activemagiceffect ObjectReference Property objectGrabbed Auto bool count Event OnEffectStart(Actor akTarget, Actor akCaster) count = true objectGrabbed = Game.GetPlayerGrabbedRef() while count LoKAirBallCloak.cast(objectGrabbed, objectGrabbed) endwhile EndEvent SPELL Property LoKAirBallCloak Auto So LoKAirBallCloak is a property that refers to the spell that the object the player is grabbing should cast on itself. The spell is a concentration on self spell, as is the magic effect to which this script belongs. In theory upon start up, this magic effect should work out what item the player is grabbing, and then indefinitely get that object to cast a spell on itself until the effect ends (that's what the while loop is for). Thing is, the object never casts the spell on itself, the visual never shows up. When I cast the spell on myself it works fine, but something is stopping the object casting it. I know that the script works up until "LoKAirBallCloak.cast(objectGrabbed, objectGrabbed)" because I put a line in above it to display a message, and it worked. Is this the correct use of the "Cast" command, because on the wiki it says the command extends a spell effect script, but if I couldn't use it the way I have done now, there should be an error right? It also says on the page that objects such as "a rock" can cast spells using this command. http://www.creationkit.com/Cast_-_Spell The other issue might be that Cast doesn't work with concentration spells? If nobody has any ideas I can test it using a fire and forget spell (I was going to do this initially but it would mean that the cloak FX would likely persist on the object after it had been dropped for a while). Another option that I think is REALLY cheap, is to make another magic effect that makes an invisible cloak around the caster with a hit effect on it. This means that when the object is pulled up to the caster, it will be on contact with the cloak and so will produce the hit effect, IN THEORY. This is what they did to get FX on victims of Vampiric Grip. However if what I said at he beginning of the post is correct, it probably wouldn't work anyway. Any ideas? EDIT: I just whether or not hit effects apply on items and they don't, so the option I outlined at the end looks like a no-go, HOWEVER, Impact Data Sets DO show up on items, so in the example from before, if the fireball were to directly hit an object, the ash mark will be on the item, so if nobody can see the problem with the script, that's another option I can explore. Edited March 8, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Elathia Posted March 8, 2015 Share Posted March 8, 2015 (edited) There is a dungeon in the game where some statues will shoot at the player. One turns green and the other turns red. Both of them have effects applied to pull that off. I can't remember what dungeon that is.. Oh yeah, they are not activators, and the cast command is used to shoot at the player. Also Vampire Grip uses that buggy Grab Actor archetype. Edited March 8, 2015 by Elathia Link to comment Share on other sites More sharing options...
Daedthr Posted March 8, 2015 Author Share Posted March 8, 2015 (edited) I'll try and find that dungeon, d'you know if it's vanilla or DLC? EDIT: It's Soljund's Sinkhole Edited March 8, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Daedthr Posted March 8, 2015 Author Share Posted March 8, 2015 (edited) Can't find the statues in the cell lol, what do they look like? EDIT: Found them, but there are no scripts attached to them. I can't work out how they work. Edited March 8, 2015 by Daedthr Link to comment Share on other sites More sharing options...
Recommended Posts