Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Working Guns (script + model)
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Working Guns (script + model)

This is a brief overview of how this approach was done in the topic and how you could extend it if you wanted.
  1. Add a lookat callback to everything you want to shoot. Set the callback function to one handler function. This function will track what object the player is currently looking at. Store this entity name in a string / clear the string depending on whether or not the player's view has started/stopped looking at the target (alState).
  2. If the player presses shoot (lantern key - detect using lantern callback) change the health of the target entity.
  3. Set up some bullet variables and items if you want to have bullets.
  4. Add some sound effects, particles etc.
  5. For added fancyness, you can make a custom lantern. Change the lantern drawing animation to drawing a pistol and firing it. Add code to put the "lantern" away after a timer.
05-15-2013, 03:44 AM
Find


Messages In This Thread
Working Guns (script + model) - by Knusper. - 05-14-2013, 03:45 PM
RE: Working Guns (script + model) - by Knusper. - 05-14-2013, 04:28 PM
RE: Working Guns (script + model) - by Apjjm - 05-15-2013, 03:44 AM
RE: Working Guns (script + model) - by Tomato Cat - 05-15-2013, 03:47 AM
RE: Working Guns (script + model) - by Knusper. - 05-15-2013, 01:13 PM
RE: Working Guns (script + model) - by Statyk - 05-16-2013, 05:32 AM
RE: Working Guns (script + model) - by Knusper. - 05-16-2013, 04:23 PM
RE: Working Guns (script + model) - by Kullin - 05-16-2013, 08:39 PM
RE: Working Guns (script + model) - by Knusper. - 05-20-2013, 11:00 AM



Users browsing this thread: 1 Guest(s)