Jump to content

Fire Projectile with HUD Button?


oOLukeOo
 Share

You are about to reply to a thread that has been inactive for 2285 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi,

I'm extremely new to scripting and my knowledge is kind of bare. I've only Modded scripts up until now but I've been trying to create a Hud Button that Fires a Projectile In the Direction I'm facing when it's been pushed. So Far I've only been able to do this trough Mouselook, not with a Hud Button. I was wondering if anyone knew how this was done? I have the Pose and Object in the Button But Haven't a clue how to get it to fire. 

Thank you so much for any Help or Advice, I really appreciate it.

Link to comment
Share on other sites

There's no magic in a button, whether it's on a HUD or anywhere else.  It's just a face that you click on.  Sense the click and use it to trigger an action.

The tricky part is scripting whatever you want the button to do.  Fortunately, in this case the "whatever" is not very hard. You launch a projectile by rezzing it with an initial velocity. As long as the initial velocity is in the +X direction, you're fine. See llRezAtRoot.  Just be sure that your projectile is physical, and at least temp_on_rez (although preferably scripted to die in much less time).

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2285 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...