Projectiles

Post » Mon Mar 14, 2011 4:07 pm

How do you script a projectile like in Midas Magic so that it flies straight in the direction of the crosshairs like a normal spell projectile? I have looked at Xilver's scripting, and though I don't completely understand the math parts, I could probably copy them if they're something commonly used, not his own creation, but so much of the script relies on other parts of the mod. I can't quite figure out what parts are necessary and which ones are for other things. Anyone have any ideas?
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Mon Mar 14, 2011 2:46 pm

Check my sig link and find Doc's Full Auto. That mod has a pretty simple way of doing it: it places two activators directly in the player's line of sight, and the closer one casts a projectile at the farther one. It doesn't check if the player is sneaking though, but that's an easy fix.

Also, I've never used Midas Magic so please excuse me if I misinterpreted your post.
User avatar
josh evans
 
Posts: 3471
Joined: Mon Jun 04, 2007 1:37 am

Post » Mon Mar 14, 2011 9:27 pm

That full auto mod looks pretty cool. It is not like Midas Magic, but would actually suit my needs better if I can do something like that. Can you tell me what part is OBSE, the positioning of the activators, or making them fire your current spell and disabling regular casting, or the whole thing. All I really need is to be able to place the activators like that, because they will only be casting one spell. I also have a few other somewhat related questions: is there any script function to detect when you swing a certain weapon, even if you do not hit anything, and if not, do NPCs care if you attack them with a 0 damage weapon, and do you level blade/blunt and damage your weapon by attacking with it if its damage is 0? I am trying to create a wand which basically acts as a one handed staff, and though i may be going about this all wrong, any help would be nice.

Edit: I looked at Midas Magic in the cs a bit more and realized the projectiles aren't moved by a script; they're all animated to move forward and the script only aims them, so I actually have to do it your way, because I'm no good at NifSkope.
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Post » Mon Mar 14, 2011 11:10 pm

That full auto mod looks pretty cool. It is not like Midas Magic, but would actually suit my needs better if I can do something like that. Can you tell me what part is OBSE, the positioning of the activators, or making them fire your current spell and disabling regular casting, or the whole thing. All I really need is to be able to place the activators like that, because they will only be casting one spell. I also have a few other somewhat related questions: is there any script function to detect when you swing a certain weapon, even if you do not hit anything, and if not, do NPCs care if you attack them with a 0 damage weapon, and do you level blade/blunt and damage your weapon by attacking with it if its damage is 0? I am trying to create a wand which basically acts as a one handed staff, and though i may be going about this all wrong, any help would be nice.

Edit: I looked at Midas Magic in the cs a bit more and realized the projectiles aren't moved by a script; they're all animated to move forward and the script only aims them, so I actually have to do it your way, because I'm no good at NifSkope.


Sine and cosine functions are OBSE. You can get around this by doing a polynomial expansion to approximate these functions if you need. These are used to determine where to put the activators, but to actually move the activators, I use MoveTo, which is not OBSE.
Disabling the cast key is also OBSE.

You might be able to get away with using GetSoundPlaying (OBSE) to check if the player is making an appropriate attack-hit or attack-miss sound. Not sure about that though.

For your 0 damage questions, I don't know. Sorry.
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm


Return to IV - Oblivion