blueshadowlaser Posted October 23, 2016 Share Posted October 23, 2016 (edited) HI everyone, I want to write a mod to throw a realy grenade. I use a staff magic mod to realized the mod but it's not perfectly Scriptname BallThrower6 extends activemagiceffectMiscObject Property BallBowl autoEvent OnEffectStart(Actor Target, Actor Caster)ObjectReference Ball = Caster.PlaceAtMe(BallBowl,1,false,true)Ball.MoveToNode(Caster, "RollerNutTriggerCtrl")Ball.Enable() while(PokeBall.is3DLoaded() == false) Utility.wait(0.05) endwhile float anglePercent = (89 -(89 + Caster.GetAngleX() - 15 ) ) / 89 float x = Math.Sin(Caster.GetAngleZ()) float y = Math.Cos(Caster.GetAngleZ()) float h = ( anglePercent * Ball.GetHeight() ) float impact = ( 0.7 * 400) Utility.wait(0.05) Ball.ApplyHavokImpulse(x, y, anglePercent , impact )Ball.RegisterForSingleUpdate(3)EndEvent Because the target sight is not correctly. So I want to write a crossbow script. But it is really hardly.First, the function GetAngleX adn GetAngleY and GetAngleZ is only available for Actor or ObjectReference. How could I get the weapon model's angleX and angleY and angleZ? Event OnEquip only indicated the Actor who equip the weapon. Otherwise, which event could I use for the fire action? Edited October 23, 2016 by blueshadowlaser Link to comment Share on other sites More sharing options...
NexusComa Posted October 23, 2016 Share Posted October 23, 2016 (edited) I'm guessing you would have to make a dummy ObjectReference set your angle calls to that.Then create a on equip event, tied to the current crossbow to the dummy reference ... Not sure what you're asking here ... is this any crossbow or only one ... Maybe add the crossbow as an ObjectreferenceMaybe add a script to the crossbow tied to a globalAngle =(Self.GetAngleX()) Edited October 23, 2016 by NexusComa Link to comment Share on other sites More sharing options...
blueshadowlaser Posted October 24, 2016 Author Share Posted October 24, 2016 (edited) I'm guessing you would have to make a dummy ObjectReference set your angle calls to that.Then create a on equip event, tied to the current crossbow to the dummy reference ... Not sure what you're asking here ... is this any crossbow or only one ... Maybe add the crossbow as an ObjectreferenceMaybe add a script to the crossbow tied to a globalAngle =(Self.GetAngleX()) How to make a crossbow as an Objectreference? Use Load3D()? Could You given an Example or given a link to the guide of adding a dummy weapon? And I use this code need an event of fire action, just like the Iskeypressed function. So did I must use an quest to accomplish it? Edited October 24, 2016 by blueshadowlaser Link to comment Share on other sites More sharing options...
NexusComa Posted October 25, 2016 Share Posted October 25, 2016 is the script on the staff will ... ObjectReferenc Property crossbow auto .. work Link to comment Share on other sites More sharing options...
blueshadowlaser Posted October 25, 2016 Author Share Posted October 25, 2016 is the script on the staff will ... ObjectReferenc Property crossbow auto .. workThis method I have used but failed. If you define an ObjectReference variable, and config the property of the ObjectReference, you'll found the weapon is not appear in the reference list. Link to comment Share on other sites More sharing options...
BoayGamingYT Posted October 25, 2016 Share Posted October 25, 2016 Grenade MOD from Magic? Thats Cool. Meybe set CastingArt as Static Nif, but seems need script to disable it. The Projectile is easier, with certain Gravity,speed,and timing explosion. I will Create it for my Rifles MOD Thx :happy: Link to comment Share on other sites More sharing options...
blueshadowlaser Posted October 26, 2016 Author Share Posted October 26, 2016 (edited) Grenade MOD from Magic? Thats Cool. Meybe set CastingArt as Static Nif, but seems need script to disable it. The Projectile is easier, with certain Gravity,speed,and timing explosion. I will Create it for my Rifles MOD Thx :happy: These script is not perfect because the shoot angle is not straight with the player's sight, So many time it will fly away from your front sight. This mod script is not the Projectile. Projectile in skyrim has not the Havok effect, and could not sprang on the target location. I want to made a timing Grenade. So, Did you know how to add a dummy weapon model then I could get the angle of this model? And I use this code need an event of fire action, just like the Iskeypressed function. So did I must use an quest to accomplish it? Edited October 26, 2016 by blueshadowlaser Link to comment Share on other sites More sharing options...
BoayGamingYT Posted October 26, 2016 Share Posted October 26, 2016 Grenade MOD from Magic? Thats Cool. Meybe set CastingArt as Static Nif, but seems need script to disable it. The Projectile is easier, with certain Gravity,speed,and timing explosion. I will Create it for my Rifles MOD Thx :happy: These script is not perfect because the shoot angle is not straight with the player's sight, So many time it will fly away from your front sight. This mod script is not the Projectile. Projectile in skyrim has not the Havok effect, and could not sprang on the target location. I want to made a timing Grenade. So, Did you know how to add a dummy weapon model then I could get the angle of this model? And I use this code need an event of fire action, just like the Iskeypressed function. So did I must use an quest to accomplish it? There is a Magic MOD that create Fireball fall down due to gravity.And My rifle projectile meshes has colission in it, its bounce for few times when impact occurs. Your script is confusing, its going too far with quests. And I don't recognize such dummy to any equiped weapons. Link to comment Share on other sites More sharing options...
Recommended Posts