mem4ob4 Posted August 16, 2014 Posted August 16, 2014 Link-> CameraCommands by Alenet If you like screwing with the camera in oblivion, this plugin can really add to your tool box. Pay attention to the requirements though. It only took a little bit of time to create a "see through another actors eye" type of touch spell. scn scndsightspellscript float iRVz ;faceing angle of victim (target) float iRPz ;faceing angle of player float iRdif ;used to rotate camera to facing of victim float iOdif ;used to offset camera to stay infront of victim face float iOy ; y coord for offset float iOx ; x coord for offset ref vict ; victim (target) reference Begin ScriptEffectStart set vict to GetSelf if vict == 0 Dispel scndsightspell return endif if vict.IsActor == 0 Dispel scndsightspell return endif end Begin ScriptEffectUpdate if vict.GetDistance Player > 5000 ;cancel it all CameraReset Message "Your vision snaps to normal" Dispel scndsightspell return else set iRVz to vict.GetAngle z set iRPz to player.GetAngle z ;adjust rotation for actor facing set iRdif to iRPz - iRVz CameraRotate 0 0 iRdif ;adjust offset to infront of actor face set iOdif to iRVz - iRPz if iOdif < 0 set iOdif to 360.00 + iOdif endif ;printC "dif %.4f" iOdif if iOdif == 0 || iOdif == 360 set iOy to 15 set iOx to 0 elseif iOdif == 90 set iOy to 0 set iOx to 15 elseif iOdif == 180 set iOy to -15 set iOx to 0 elseif iOdif == 270 set iOy to 0 set iOx to -15 elseif iOdif < 90 set iOy to ( dcos iOdif ) * 15.00 set iOx to ( dsin iOdif ) * 15.00 elseif iOdif < 180 set iOdif to iOdif - 90.00 set iOy to ( dsin iOdif ) * 15.00 set iOx to ( dcos iOdif ) * 15.00 set iOy to iOy - ( iOy * 2.00 ) elseif iOdif < 270 set iOdif to iOdif - 180.00 set iOy to ( dcos iOdif ) * 15.00 set iOx to ( dsin iOdif ) * 15.00 set iOy to iOy - ( iOy * 2.00 ) set iOx to iOx - ( iOx * 2.00 ) else set iOdif to iOdif - 270.00 set iOy to ( dsin iOdif ) * 15.00 set iOx to ( dcos iOdif ) * 15.00 set iOx to iOx - ( iOx * 2.00 ) endif CameraMove iOx iOy 0 vict endif end Begin ScriptEffectFinish CameraReset Message "Your vision returns to normal" end Anyone else have an interesting effect with this plugin? Mem (ps: thanks fejeena)
fejeena Posted August 16, 2014 Posted August 16, 2014 You saw his other Mod ? http://www.nexusmods.com/oblivion/mods/45420/ Your script is made for humans ? or can I cast the spell on a dog and see through the Dogs eyes ? LoversBitch from the perspective of a dog
mem4ob4 Posted August 16, 2014 Author Posted August 16, 2014 Yes, I saw his other mod. It is showing what his camera commands can do for the PC This script works for human and canine (should be any actor). You will be at doggie height. You can still move your Player around with normal movement controls (and auto-walk) so you can see what doggie sees as he follows behind you. I have also noted that if you cast this on a second actor before time ends on first actor target, it will go to second actor after time on first actor expires. There is a lot of other testing to do but this is non-adult thread. Mem
Alenet Posted August 21, 2014 Posted August 21, 2014 I have released a new version with new commands. Check it out!
fejeena Posted August 22, 2014 Posted August 22, 2014 Alenet welcome at LL. I just posted that you have a new Version in a LAPF modders discussion PM ( Or the beta testing PM for gregathit's and WappyOne's great work)
Alenet Posted August 22, 2014 Posted August 22, 2014 Thanks fejeena! I will personalize my profile asap. I suggest you to try cameramovetoposition and cameralookat commands to engage a very cinematic effect!
movomo Posted August 22, 2014 Posted August 22, 2014 Welcome to LL, Alenet. I wanted to make a psuedo flight simulation mod. The "roll" maneuver was an essential part of it. Now that cameracommand is here, it is theoretically possible, but need more experimenting with animations..
Alenet Posted August 22, 2014 Posted August 22, 2014 You need to have or create animations, then you can set a token on the ref on which you want to apply the animation and pickup the animation with the pickidle command. Then rotating or moving the camera. Anyway it is not possible to roll an actor, it can be done only by an animation. You can roll only the camera by my plugin.
mem4ob4 Posted August 23, 2014 Author Posted August 23, 2014 V2 does have some really nice features Alenet. The above script needed updating and I used the CameraRotateToPosition and CameraMoveToPosition. scn scndsightspellscript ref vict float iVx float iVy float iVz float iVzscale float iVa float iPa float iAa float iOdif float iOx float iOy float iNose Begin ScriptEffectStart set vict to GetSelf if vict == 0 Dispel scndsightspell return endif if vict.IsActor == 0 Dispel scndsightspell return endif end Begin ScriptEffectUpdate if vict.GetDistance Player > 8000 ;cancel it all CameraReset Message "Your vision snaps to normal" Dispel scndsightspell return else set iVx to vict.GetPos x set iVy to vict.GetPos y set iVz to vict.GetPos z ;---------------- ; figure height, check for human or specific creature ;---------------- set iVzscale to vict.getScale ; get victs height set iVzscale to ( iVzscale * ( 115 - ( vict.IsSneaking * 20 ) ) ) set iVz to iVz + iVzscale set iNose to 20.00 if vict.GetIsCreature if vict.GetCreatureType == 0 ;dog etc. set iVz to vict.GetPos z set iVz to iVz + 60 set iNose to 55.00 elseif vict.GetCreatureType == 4 ;horse set iVz to vict.GetPos z set iVz to iVz + 125 set iNose to 105.00 else ;other endif endif ;---------------- ;adjust rotation for actor facing ;---------------- set iVa to vict.GetAngle z set iPa to player.GetAngle z set iAa to iVa - iPa set iAa to iAa - ( iAa * 2 ) if iPa >= 180 set iAa to iAa - iPa else set iAa to iAa + ( 360 - iPa ) endif CameraRotateToPosition 0 0 iAa ;---------------- ;figure offset for front face ;---------------- set iOdif to iAa if iOdif < 0 set iOdif to 360.00 + iOdif endif if iOdif == 0 || iOdif == 360 set iOy to iNose set iOx to 0.00 elseif iOdif == 90 set iOy to 0.00 set iOx to -iNose elseif iOdif == 180 set iOy to -iNose set iOx to 0.00 elseif iOdif == 270 set iOy to 0.00 set iOx to iNose elseif iOdif < 90 ; 1q set iOx to ( dsin iOdif ) * iNose set iOy to ( dcos iOdif ) * iNose set iOx to iOx - ( iOx * 2.00 ) elseif iOdif < 180 set iOdif to iOdif - 90.00 set iOx to ( dcos iOdif ) * iNose set iOy to ( dsin iOdif ) * iNose set iOy to iOy - ( iOy * 2.00 ) set iOx to iOx - ( iOx * 2.00 ) elseif iOdif < 270 set iOdif to iOdif - 180.00 set iOx to ( dsin iOdif ) * iNose set iOy to ( dcos iOdif ) * iNose set iOy to iOy - ( iOy * 2.00 ) else set iOdif to iOdif - 270.00 set iOy to ( dcos iOdif ) * iNose set iOx to ( dsin iOdif ) * iNose endif set iVx to iVx + iOx set iVy to iVy + iOy CameraMoveToPosition iVx iVy iVz endif end Begin ScriptEffectFinish CameraReset Message "Your vision returns to normal" end It has been giving me a lot of fun Mem
WappyOne Posted August 26, 2014 Posted August 26, 2014 Alenet, is there a specific "GetPluginVersion EnhancedCamera" to check for to ensure camera commands are available?
Alenet Posted September 3, 2014 Posted September 3, 2014 You can check the version by the windows file property tab, section details.
movomo Posted September 4, 2014 Posted September 4, 2014 I believe Wappy's question was to see if there is any way to make sure the appropriate version of plugin is available inside of the game's runtime.
Alenet Posted September 7, 2014 Posted September 7, 2014 Ooo sorry yes. The plugin internal version for the compatibility needs to be 2 or later.
ger4 Posted November 28, 2014 Posted November 28, 2014 Quick question for Alenet I've been trying to use this plugin to bind the camera to the head node of an npc to create a fake first person for them. Is there a way to directly attach the camera to the head bone of an npcs skeleton? Logic Dragon manages to do it for the player in his enhanced camera mod, and it allows for a "fake first person" mode where third person animations can be played in what looks just like first person. A good example can be seen in this pic http://static-1.nexusmods.com/15/mods/101/images/44337-3-1384141698.jpgwhere the player is playing an eating animation in fake first person. I basically wanted to replicate this but for an npc. Thanks for this great plugin.
Fienyx Posted January 23, 2015 Posted January 23, 2015 V2 does have some really nice features Alenet. The above script needed updating and I used the CameraRotateToPosition and CameraMoveToPosition. scn scndsightspellscript ref vict float iVx float iVy float iVz float iVzscale float iVa float iPa float iAa float iOdif float iOx float iOy float iNose Begin ScriptEffectStart set vict to GetSelf if vict == 0 Dispel scndsightspell return endif if vict.IsActor == 0 Dispel scndsightspell return endif end Begin ScriptEffectUpdate if vict.GetDistance Player > 8000 ;cancel it all CameraReset Message "Your vision snaps to normal" Dispel scndsightspell return else set iVx to vict.GetPos x set iVy to vict.GetPos y set iVz to vict.GetPos z ;---------------- ; figure height, check for human or specific creature ;---------------- set iVzscale to vict.getScale ; get victs height set iVzscale to ( iVzscale * ( 115 - ( vict.IsSneaking * 20 ) ) ) set iVz to iVz + iVzscale set iNose to 20.00 if vict.GetIsCreature if vict.GetCreatureType == 0 ;dog etc. set iVz to vict.GetPos z set iVz to iVz + 60 set iNose to 55.00 elseif vict.GetCreatureType == 4 ;horse set iVz to vict.GetPos z set iVz to iVz + 125 set iNose to 105.00 else ;other endif endif ;---------------- ;adjust rotation for actor facing ;---------------- set iVa to vict.GetAngle z set iPa to player.GetAngle z set iAa to iVa - iPa set iAa to iAa - ( iAa * 2 ) if iPa >= 180 set iAa to iAa - iPa else set iAa to iAa + ( 360 - iPa ) endif CameraRotateToPosition 0 0 iAa ;---------------- ;figure offset for front face ;---------------- set iOdif to iAa if iOdif < 0 set iOdif to 360.00 + iOdif endif if iOdif == 0 || iOdif == 360 set iOy to iNose set iOx to 0.00 elseif iOdif == 90 set iOy to 0.00 set iOx to -iNose elseif iOdif == 180 set iOy to -iNose set iOx to 0.00 elseif iOdif == 270 set iOy to 0.00 set iOx to iNose elseif iOdif < 90 ; 1q set iOx to ( dsin iOdif ) * iNose set iOy to ( dcos iOdif ) * iNose set iOx to iOx - ( iOx * 2.00 ) elseif iOdif < 180 set iOdif to iOdif - 90.00 set iOx to ( dcos iOdif ) * iNose set iOy to ( dsin iOdif ) * iNose set iOy to iOy - ( iOy * 2.00 ) set iOx to iOx - ( iOx * 2.00 ) elseif iOdif < 270 set iOdif to iOdif - 180.00 set iOx to ( dsin iOdif ) * iNose set iOy to ( dcos iOdif ) * iNose set iOy to iOy - ( iOy * 2.00 ) else set iOdif to iOdif - 270.00 set iOy to ( dcos iOdif ) * iNose set iOx to ( dsin iOdif ) * iNose endif set iVx to iVx + iOx set iVy to iVy + iOy CameraMoveToPosition iVx iVy iVz endif end Begin ScriptEffectFinish CameraReset Message "Your vision returns to normal" end It has been giving me a lot of fun Mem Mem, I found a nice ring resource from strotis, and was wondering if you would be ok with me putting your script into making a Ring of Second Sight.
mem4ob4 Posted January 24, 2015 Author Posted January 24, 2015 @fienyx Go right ahead and have fun Mem
Fienyx Posted January 25, 2015 Posted January 25, 2015 Well, my ambitions have changed a little bit. I'm now hoping to make a ring that will give a summon spell for a raven, then give the raven a "spy" ability. Ever see The Crow? Kind of like that, except I also need to figure out how to be able to control the raven too. A side project to help me get better with scripting. Will be my first real mod, instead of just modifying someone elses or the one patch I made.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.