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
Flashlight+Gun
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#1
Wink  Flashlight+Gun

Here it is. The flashlight gun, code, and everything you need to know to use it.





Download:
AmnFlashlightPistol.zip
Gun_Addon_For_Amnesia_Mods.PDF

How to use it:
  • 1) Unzip AmnFlashlightPistol.zip inside your mod.
  • 2) Open your mod's resources.cfg and make sure your mod is listed first.
  • 3) To your maps' script copy&paste all the code from the file AmnFlashlightPistol/Code.hps
  • 4) Call your enemies in the LevelEditor "Enemy_1", "Enemy_2" and so on.


    That's it. The gun should be functional.

    Update: 18/02/2015. Revised and corrected.

(This post was last modified: 02-19-2015, 01:19 AM by Daemian.)
12-15-2014, 02:20 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Flashlight+Gun

PHP Code: (Select All)
GiveItemFromFile("lantern""lantern.ent"); 

This line I'm pretty sure will keep giving you the item over and over if ran multiple times. Might be good to add a simple

PHP Code: (Select All)
if(!HasItem("lantern")) GiveItemFromFile("lantern""lantern.ent"); 

to make sure it doesn't.

Anyhow, good job mate. By the way, have you experimented with running this in the global.hps?

(This post was last modified: 12-15-2014, 08:28 AM by Mudbill.)
12-15-2014, 08:28 AM
Find
RedKnight Offline
Posting Freak

Posts: 774
Threads: 16
Joined: Sep 2013
Reputation: 6
#3
RE: Flashlight+Gun

Holy shenanigens....

I want that mothabucking gun right now...

6666666666666666666566666666666666
12-15-2014, 08:38 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Flashlight+Gun

Mudbill Wrote:
PHP Code: (Select All)
GiveItemFromFile("lantern""lantern.ent"); 

This line I'm pretty sure will keep giving you the item over and over if ran multiple times. Might be good to add a simple...
Totally. But in my example that function only runs once.
I expect the modders to tweak the code to their needs.
But whatever, if you think it helps, I'll add it.

Mudbill Wrote:Anyhow, good job mate. By the way, have you experimented with running this in the global.hps?
Nope. I had a problem with it once and I stopped using it. I guess I could try again later. You think it could work?

12-15-2014, 09:18 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Flashlight+Gun

Honestly, I don't know. I haven't used it much myself. I was just mentioning it because it sounds like something that would be more convenient than having the same code in all levels. I think it is possible, but it would have to be rewritten a bit.

12-15-2014, 10:46 PM
Find
L00T3R123 Offline
Junior Member

Posts: 16
Threads: 1
Joined: Dec 2014
Reputation: 0
#6
RE: Flashlight+Gun

can you do tutorial how to put the gun in your mod cause i did all the steps but it turned out wrong D:
12-21-2014, 07:56 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#7
RE: Flashlight+Gun

(12-21-2014, 07:56 AM)L00T3R123 Wrote: can you do tutorial how to put the gun in your mod cause i did all the steps but it turned out wrong D:
There is a tutorial, in what part are you having trouble with?
Post your error so we can help you.

12-24-2014, 04:07 AM
Find
L00T3R123 Offline
Junior Member

Posts: 16
Threads: 1
Joined: Dec 2014
Reputation: 0
#8
RE: Flashlight+Gun

when i press f it gets out a lantern instead of the gun
12-25-2014, 04:24 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#9
RE: Flashlight+Gun

You need a full conversion mod to replace the lantern.
http://www.frictionalgames.com/forum/thread-11120.html
https://wiki.frictionalgames.com/hpl2/amnesia/full_conv

12-25-2014, 08:51 PM
Find
L00T3R123 Offline
Junior Member

Posts: 16
Threads: 1
Joined: Dec 2014
Reputation: 0
#10
RE: Flashlight+Gun

ohhh :0
12-26-2014, 02:40 AM
Find




Users browsing this thread: 2 Guest(s)