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)
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#1
Working Guns (script + model)

Hey,

I know, it's a big question. And if it works it would be a very hard thing:
working guns.
Working means, that you can shoot with a mouse click and if you are turned to a monster it dies.
There are many problems:

1. You have to interact with something that is before you every time to shoot (or something like that)
2. You can check if you look at an enemy, but thats not a great way, its not correctly every time.
3. How to animate a dying monster???

...and some more...

I dont think that its possible, but maybe you know more than I do.
And I think Im not the first one with that idea.
I found this:
http://www.frictionalgames.com/forum/thr...ht=weapons

My english isnt the best, and im not a great scripter. so i dont know if its the same. And i dont understand it.
Please inform me if this isnt new at all.

thx for reading,

Knusper.

No one knows, how "I" goes.
(This post was last modified: 05-14-2013, 03:50 PM by Knusper..)
05-14-2013, 03:45 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#2
RE: Working Guns (script + model)

(05-14-2013, 03:45 PM)Knusper. Wrote: Hey,

I know, it's a big question. And if it works it would be a very hard thing:
working guns.
Working means, that you can shoot with a mouse click and if you are turned to a monster it dies.
There are many problems:

1. You have to interact with something that is before you every time to shoot (or something like that)
2. You can check if you look at an enemy, but thats not a great way, its not correctly every time.
3. How to animate a dying monster???

...and some more...

I dont think that its possible, but maybe you know more than I do.
And I think Im not the first one with that idea.

thx for reading,

Knusper.

I don't think it's possible in the hpl engine. You could create a cutscene where you let a gun float with or without a arm attached and pretend like it shoots. But I don't think you'll be able to turn hpl in a first person shooter engine.
05-14-2013, 03:50 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Working Guns (script + model)

Check this thread out.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-14-2013, 04:22 PM
Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#4
RE: Working Guns (script + model)

thats what I said... pls read everything.

So i think thats what i want, but i dont really understand it.
If someone would take a time to explain it, and to show me everything i need, it would be very cool.
But I will read that thread first completely.

No one knows, how "I" goes.
05-14-2013, 04:28 PM
Find
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
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#6
RE: Working Guns (script + model)

(05-15-2013, 03:44 AM)Apjjm Wrote: This is a brief overview of how this approach was done in the topic and how you could extend it if you wanted.
  1. 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.

Or maybe a gun with a flashlight on it?
05-15-2013, 03:47 AM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#7
RE: Working Guns (script + model)

(05-15-2013, 03:47 AM)Tomato Cat Wrote:
(05-15-2013, 03:44 AM)Apjjm Wrote: This is a brief overview of how this approach was done in the topic and how you could extend it if you wanted.
  1. 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.

Or maybe a gun with a flashlight on it?

That'd be awesome. I might actually try to make that..
05-15-2013, 06:55 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Working Guns (script + model)

(05-15-2013, 06:55 AM)Smoke Wrote:
(05-15-2013, 03:47 AM)Tomato Cat Wrote:
(05-15-2013, 03:44 AM)Apjjm Wrote: This is a brief overview of how this approach was done in the topic and how you could extend it if you wanted.
  1. 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.

Or maybe a gun with a flashlight on it?

That'd be awesome. I might actually try to make that..

Yeah, you should.....

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-15-2013, 07:24 AM
Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#9
RE: Working Guns (script + model)

ok thx, I will try it.
And I will try to add a gun model to the flashlight from penumbra.
But then you should see both always, and not only if you press F
or whatever key you use for latern.

Smoke, if you do that, could you inform me, if I can use ther model, too?
Im quite a beginner, so I will see if I can make as much as possible by myself.

No one knows, how "I" goes.
05-15-2013, 01:13 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#10
RE: Working Guns (script + model)

(05-15-2013, 07:24 AM)JustAnotherPlayer Wrote:
(05-15-2013, 06:55 AM)Smoke Wrote:
(05-15-2013, 03:47 AM)Tomato Cat Wrote:
(05-15-2013, 03:44 AM)Apjjm Wrote: This is a brief overview of how this approach was done in the topic and how you could extend it if you wanted.
  1. 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.

Or maybe a gun with a flashlight on it?

That'd be awesome. I might actually try to make that..

Yeah, you should.....

Okay, I will......... lol
(This post was last modified: 05-15-2013, 02:01 PM by OriginalUsername.)
05-15-2013, 02:00 PM
Find




Users browsing this thread: 2 Guest(s)