-
Posts
16 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Godschildgaming
-
-
Yeah, it's a bit more difficult than that. You can't just call "PlayGroup idle" to abort a playing animation. Rather it will "schedule" the next animation to play. Even with the second parameter being "1" there's still no guarantee for an immediate switch back to idle.
Additionally, by using any other means to "disable" or prevent the casting animation from playing you'll only end up disabling your actor from "being able to" cast itself likewise. If the animation doesn't play, the actor will not cast.
Now you "could" devise means to "switch" the casting animation temporarily to one without any motion, or a different, more befitting one even, perhaps, by using ToggleSpecialAnim right before and after the cast... But there's also different means.
An invisible casting activator doing the casting for you comes to mind, because inanimate objects don't need to play no animations to cast. Just spawn it above yourself, or in front of you, then let "it" cast instead, and move it away (or leave it where it is until next cast, I've seen both solutions used). (https://cs.elderscrolls.com/index.php?title=Casting_Spells_From_An_Activator)
You could use GetCrosshairRef to obtain the target you're looking at, but it only finds targets within activation range.
A different approach to "aiming" targeted spells at targets outside of activation range would be to make one activator shoot a spell towards another but miss it (I think the key is the NIF file doesn't have collision to hit).
Maybe you can make some use of my code in understanding this (however, there's some vector math magic by myself inside for easing my work. It definitely works without vector math and just simple geometric, too, though):
DrakeDragonTransformCaster01.MoveTo player let fPosX := 0 let fPosY := 55 * GetScale let fPosZ := 60 * GetScale let vTemp := rSelf.Call DrakeDragonGetVectorGlobal fPosX fPosY fPosZ let fPosX := vTemp[0] + rSelf.GetPos X let fPosY := vTemp[1] + rSelf.GetPos Y let fPosZ := vTemp[2] + rSelf.GetPos Z DrakeDragonTransformCaster01.SetPos X fPosX DrakeDragonTransformCaster01.SetPos Y fPosY DrakeDragonTransformCaster01.SetPos Z fPosZ PrintToConsole "caster at %.02f %.02f %.02f" fPosX fPosY fPosZ DrakeDragonTransformCaster02.MoveTo player let fPosX := 0 let fPosY := 1000 let fPosZ := 60 * GetScale let vTemp := rSelf.Call DrakeDragonGetVectorGlobal fPosX fPosY fPosZ let fPosX := vTemp[0] + rSelf.GetPos X let fPosY := vTemp[1] + rSelf.GetPos Y let fPosZ := vTemp[2] + rSelf.GetPos Z DrakeDragonTransformCaster02.SetPos X fPosX DrakeDragonTransformCaster02.SetPos Y fPosY DrakeDragonTransformCaster02.SetPos Z fPosZ PrintToConsole "dummy target at %.02f %.02f %.02f" fPosX fPosY fPosZ
Basically the caster is moved into my cell, gets positioned at a little offset to me relatively (60 above, 55 in front, to not hit myself accidentally, and relative to my scale, which you can neglect in your case),
then I use my vector math function to get absolute world coordinates from the player-relative ones I defined (rSelf is the player in your case) and SetPos the caster into its place.
The same goes for the target, it's just 1000 units forward away.
Then have the caster cast a targeted spell at the target and the projectile will fly into the desired direction you're looking at.
If you need it, here's my vector math magic for reference (I consider it common knowledge at this point):
scn DrakeDragonGetVectorGlobal float fVecLocX float fVecLocY float fVecLocZ float fAngleX float fAngleY float fAngleZ array_var vVecLoc array_var vVec array_var mRotationX array_var mRotationY array_var mRotationZ array_var mRotationYXZ Begin Function {fVecLocX fVecLocY fVecLocZ} let vVecLoc := ar_Construct Array let vVecLoc[0] := fVecLocX let vVecLoc[1] := fVecLocY let vVecLoc[2] := fVecLocZ let vVecLoc := ForceColumnVector vVecLoc let fAngleX := -GetAngle X let fAngleY := GetAngle Y let fAngleZ := -GetAngle Z let mRotationX := GenerateRotationMatrix X fAngleX let mRotationY := GenerateRotationMatrix Y fAngleY let mRotationZ := GenerateRotationMatrix Z fAngleZ let mRotationYXZ := MatrixMultiply mRotationX mRotationY let mRotationYXZ := MatrixMultiply mRotationZ mRotationYXZ let vVecLoc := MatrixMultiply mRotationYXZ vVecLoc let vVec := ar_Construct Array let vVec[0] := vVecLoc[0][0] let vVec[1] := vVecLoc[1][0] let vVec[2] := vVecLoc[2][0] SetFunctionValue vVec End
It's pretty much just basic vector math like we all learned it in school put into ObScript/OBSE terms... well, plus fixing some game engine oddities with their coordinate systems, so don't be surprised the resulting matrix isn't looking like what you expected. It works regardless, in this game. :sweat:
wow thats a lot of detail and sure it will come in handy, now I just gotta figure out how to dismantle the code and rescript it for my script Thanks for the help will reply with either a failed or successful attempt in like a few hours
-
So I've turned my eyes to the Khajiit race and noticed 2 spells that really make me upset 1) Eye of Fear and their night eye these upset me because they are cast like normal spells, So I have bound the eye of fear spell to a key but it still upsets me a lot that they still have to do the spell cast animation just to use their abilities. So what I want to do is either cut out the spell cast ability or find a way to shoot a scripted invisible projectile in the direction of the player looking. Down below is my current failure of a script it works in the fact is changes the spell to the racial ability to cast it then switch it to a spell of my choice.
Things I have tried:
Googling and forum searching for ways to get target ref from cursor/mouse position
Skipanim command - broke 1st person movement when I ran it
Playgroup command - seems to do nothing :/
scn keyscript
;canusemagic is a global variable
float fQuestDelayTime
int maxh
int damageresult
int waittillcasted
int castkey
int nomag
int keyheld
ref raceab01
ref raceab02
begin gamemode
set maxh to player.getmaxav health
if nomag == 1
if player.iscasting != (player == player)
set nomag to 0
endif
endif
set castkey to getcontrol 7
set fquestdelaytime to 0.01
set raceab01 to PwRaceKhajiitDemoralize
if (iskeypressed2 45) != (player == player)
set keyheld to 0
endif
if (iskeypressed2 45)
if (Player.cancastpower raceab01)
message "power used"
selectplayerspell raceab01
tapkey castkey
player.playgroup idle 1
set nomag to 1
else
message "that would hurt... but script has not been made yet... oh wait... now it is..."
set damageresult to maxh*.25
set damageresult to 0 - damageresult
if keyheld == 0
player.modav2 health damageresult
set keyheld to 1
endif
endif
endif
if nomag == 0
if canusemagic == 0
selectplayerspell uselessspell
endif
endif
end -
I have trying to find a way to detect when a new game is triggered and also detect or prevent the race menu from showing, reason for this is that I want to make a story conversion mod with predetermined looks, race, birth sign and gender of the character. Is there any way to prevent the race menu from popping open or instantly closing it? Thanks for any help provided, right now I have started learning how to make obse plugins so any ideas in that field is as well accepted.
Edit never mind, found out that there is a script that run during character creation, I edited that script to take control of the intro so right after the intro bik file is done playing the player has instant control. I used obse closeallmenus and being menumode 1036 so it only runs the close all menus when the race menu is opened, can a mod lock this thread?
-
Question, did you just take the custom race plugin and edit it to add the custom companion or did you make a new plugin and take files from the custom race plugin, if so that might be the reason.
-
Hello, so as the title says I need help making a custom jail. I have placed two prison markers, a stolengoods chest, and a bed. 1 prison marker is somewhere in the wild and the other prison marker is in the custom cell. I put a guard to test the jail but when the player commits a crime and the guard goes to arrest them it does nothing and my character still has the fine on him. So how do I make a working jail that will actually jail the player?
The jail cell
the stolen goods chest
the custom guard
The exterior prison marker
-
Good now just in case someone else comes here asking the same question
easy make a shortcut to obse then edit it's properties you'll find something like this "<Oblivion's dir>\obse_loader.exe" change it to "<Oblivion's dir>\obse_loader.exe -editor"
-
*uses necromancy to res this topic*
That is a cool idea, and would totally be possible tho there would be a lack of voice files for said custom quests but I could try to make something like that. gonna add it to my try to do list, but I ran into this thread while looking for a quest mod that makes you able to help in another way to fix lars and Braith's problemssince if you do the quest for lars you simply find out that Braith is bullying Lars because she wants him to kiss her
-
So I have been trying to find a way to turn garry's mod mdl files into construction set use able nif files but yet have not found a way so I was wondering if any one on nexus knows a way to convert a mdl to nif??
-
I may think about two possible causes:
1) I repeat: don't use quotes in the script name: after scn the game expect a simple word for the script name (like a variable name), not a quoted string. Quotes must only be used for creating strings.
2) Don't use scriptname as name of script. ScriptName is a keyword (scn is an abbreviation of this keyword).
When the game see scn scriptname it doesn' read:
<ScriptName keyword> <name of the script>
but this instead:<ScriptName keyword> <ScriptName keyword>
So it become crazy, for not finding the name of the script but another keyword in its place.Generally speaking, never use keywords for names (scripts/functions/variables/etc name) in any programming language. Other programming languages would not let you compile the code. CS scripts are a row imitation of a programming language, so it may silently accept the error but crash in game.
So I have changed the
scn "scriptname"
To
scn BIBTeleTargSSC
and have tested the spell but still crashes the game, the crash may be a problem with spells in the game because I've tried to make a resurrect spell but it crashed the game as well, is there anyway to stop it from crashing when the spell scripts try to run?
-
You're trying to assign a variable to a command!
In other words, you switched the command GetSelf and the variable npctarget.
The correct syntax is:
Set <variable> to <value>
GetSelf is a command which return the reference of the actor where the script is running. In this case, the script run on the target of the spell, so GetSelf return him/her. You should take the reference returned by GetSelf and assign it to npctarget (not the opposite!).
Also, spells must not use GameMode.
They have their own set of commands like this: http://cs.elderscrolls.com/index.php?title=ScriptEffectStart
Refer to the tutorials to learn how to create scripts. You'll find everything you need here: http://cs.elderscrolls.com/index.php?title=Main_Page
Here's the correct script, and some suggestions:
scn scriptname ;Don't use quotes here. Only use quotes in strings' short npctarget begin ScriptEffectStart ;runs once, when the spell hit and the script effect is applied on the target set npctarget to getself ;call the command getself, get the returned value and store it in npctarget player.moveto npctarget end
thx dude i figured it out I totally was scripting it wrong and also found a little problem with the var so instead of me using short var i had changed it to ref
scn "scriptname" short npctarget begin gamemode set getself to npctarget player.moveto npctarget end
i had to use
scn "scriptname" ref npctarget begin scripteffectstart set npctarget to getself player.moveto npctarget end
but the spell crashes oblivion when used, so now I got to find a way to fix that
-
so I'm trying to make a spell that will teleport the player up to a npc that it hits, like teleport strike from elder scrolls online
scn "scriptname" short npctarget begin gamemode set getself to npctarget player.moveto npctarget end
but the construction set wont let me save this script, so is there anyway to get this to work, or a script that works to do the same thing???
-
Ok so I creating a mod but have ran into to a problem with this custom script so how the script is suppose to start a hidden quest that has a script hidden in the quest so basically say equip this said ring it starts quest and when unequipped it stops said quest so like this
begin onequip
player.startquest (quest id)
end
begin onunequip
player.stopquest (same quest id)
end
but when I try the script it doesn't work, now when I use the console and add the quest the quest works so yea plz explain what I'm doing wrong
-
Why hasn't undertale even touched skyrim yet like wow Youtube is 50% undertale now and yet nothing in undertale has made it's way to skyrim LOL I'mma have to learn how to code new items into skyrim just to get a blaster because it's not that hard to mod i just don't know how to get new textures into the game :/ Welp first off i'mma get sans imported into Skyrim soooo yea lol
-
IM HAVE PROBLEMS TOO it's the male body replacer but i don't really want to get rid of it so what other mod could be causing the problem
Alternative Start Arrive by Ship - Alternative Start V1-66 Unassigned 5/25/2016 9:35:02 PM 5/25/2016 9:34:52 PM 28233 1.66 / 1.66 Robert Evrae Capucines Character Expansion - Capucines Character Expansion 1_3b Unassigned 5/24/2016 11:52:34 PM 5/24/2016 11:52:19 PM 22031 1.3b / 1.3b Capucine Cazy Hair Pack - Cazy Hair Pack 1_01 Unassigned 5/25/2016 12:06:03 AM 5/25/2016 12:04:39 AM 85248 1.01 / 1.01 Cazy DMRA Fine Tuned Body Replacer - DMRA Fine Tuned Version 1p2 Full Unassigned 5/24/2016 11:00:59 PM 5/24/2016 11:00:38 PM 81120 1.2 / 1.2 nabernas MaleBodyReplacerV4 - MaleBodyReplacerV4 Unassigned 5/25/2016 5:46:47 PM 5/25/2016 5:46:31 PM 19607 V4 / V4 Robert Missing eye-texture fix for XEO - Eye-fix XEO Unassigned 5/25/2016 9:58:40 PM 5/25/2016 9:58:21 PM 63003 1.0 / 1.0 Apruz Oblivion - Enhanced Camera - Enhanced Camera Unassigned 5/25/2016 9:32:29 PM 5/25/2016 9:32:10 PM 1000008516 1.4b / 1.4b LogicDragon OBSE -Elys- Universal Silent Voice - OBSE -Elys- Universal Silent Voice v91 Unassigned 5/25/2016 3:31:31 PM 5/25/2016 3:29:20 PM 23325 0.93 / 0.93 Elys Official Oblivion 12416 Patch - Oblivion 1_2_416 English Unassigned 5/24/2016 11:40:08 PM 5/24/2016 11:40:02 PM 11094 1.2.416 / 1.2.416 Bethesda Pluggy - Pluggy v125b Unassigned 5/25/2016 3:31:37 PM 5/25/2016 3:29:51 PM 42380 132 / 132 haama Sexdarkness-Sexlivion for Girls and Boys - SexDarkness 1-18 Unassigned 5/25/2016 3:33:31 PM 5/25/2016 3:45:20 PM 81036 1.18 / 1.18 Phalzyr Universal Skeleton Nif - UniversalSkeletonNIF181 Unassigned 5/24/2016 10:54:18 PM 5/24/2016 10:54:14 PM 84920 1.81 / 1.81 Growlf Werewolves - The Curse of Hircine - Werewolves: The Curse of Hircine Unassigned 5/25/2016 9:55:26 PM 5/25/2016 9:55:20 PM 6529 b3 / b3 Cid88
Need script to get cursor target or prevent anim from running on player
in Discussion
Posted
Ok now I have a new problem.... I have a activator going to the target and it is right on the target and hits them perfectly with any spell... but I need it to use a demoralize spell... which it refuses to do... It'll shoot fireballs and lighting but gets shy when I try to have it fire a projectile demoralize