Sarteka Posted January 20, 2009 Share Posted January 20, 2009 I am currently messing around with creating weapons and I was thinking it would be really cool to have a sniper rifle that had normal damage but if it hits them in the head its an instant kill (to compensate it would have a 1 bullet clip). Anyway, I was wondering if this is possible. I know the game has a way of registering a head shot (for a quest like you gotta shoot em in the head, but I don't know what the scripting function is) I suppose that the script could just run "kill" on the creature/npc, but is there a way to multiply the damage of that individual shot? Edit: I found the function for hit location, now i just need to figure out how to kill the npc if its a head shot. http://geck.bethsoft.com/index.php/GetHitLocation Ok then I know that i have to use the killactor function http://geck.bethsoft.com/index.php/KillActor which can also be set so that player did it. Now the only real problem i have right now, is how do i select the npc that was hit by the bullet to be the target of the killactor function? Tested this in game. Anyone want to take a crack at why this doesn't work or suggest a better way to do this? Begin OnEquip If GetHitLocation == 1 || GetHitLocation == 2 || GetHitLocation == 3 Player.GetCombatTarget KillActor player, 1, 2 endifend Link to comment Share on other sites More sharing options...
Zilod Posted January 21, 2009 Share Posted January 21, 2009 best thing prob will be to add the script to the weapon itself as an object effect try something like this scn SniperkillahScript begin scripteffectstart If GetHitLocation == 1 || GetHitLocation == 2 || GetHitLocation == 3 damageactorvalue health 10000 endifend create a base effectSniperKillahEffect and link it to SniperkillahScript, remember to flag on touch in the options then create the object effect SniperKillahselect weapon from the drop down menu and add the SniperKillahEffect on the effect menu open your sniper rifle and select SniperKillah in the object effect Link to comment Share on other sites More sharing options...
Sarteka Posted January 21, 2009 Author Share Posted January 21, 2009 "GetHitLocation won't work if used in a weapon's Object Effect, but will work if used in the weapon's Crit Effect. " quote from the top link in my first post =o I could try it anyhow though side note that 3 was meant to be a 13 1 = head_1 2= head_2 13 = brain I might try putting this as a crit effect rather than object effect Link to comment Share on other sites More sharing options...
Zilod Posted January 21, 2009 Share Posted January 21, 2009 uops true... well you can do that on crit and eventually put 100 crit chance on the sniper with a very low crit if not you can try firing something from the object effect (a spell for example) and do the check with that one another route can be to not use gethitlocation but to compare the health values of the head, before and after the hit, probably with a mix of getcombattarget and object effect it can be done but a lot depends when the object effect is fired Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.