Frictional Games Forum (read-only)
[SCRIPT] Working Guns (script + model) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Working Guns (script + model) (/thread-21488.html)

Pages: 1 2


Working Guns (script + model) - Knusper. - 05-14-2013

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/thread-14444.html?highlight=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.


RE: Working Guns (script + model) - OriginalUsername - 05-14-2013

(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.


RE: Working Guns (script + model) - PutraenusAlivius - 05-14-2013

Check this thread out.


RE: Working Guns (script + model) - Knusper. - 05-14-2013

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.


RE: Working Guns (script + model) - Apjjm - 05-15-2013

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.



RE: Working Guns (script + model) - Tomato Cat - 05-15-2013

(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?


RE: Working Guns (script + model) - OriginalUsername - 05-15-2013

(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..


RE: Working Guns (script + model) - PutraenusAlivius - 05-15-2013

(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.....


RE: Working Guns (script + model) - Knusper. - 05-15-2013

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.


RE: Working Guns (script + model) - OriginalUsername - 05-15-2013

(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