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
Unlimited stun baton script
Radiance Offline
Senior Member

Posts: 319
Threads: 34
Joined: Aug 2015
Reputation: 5
#1
Unlimited stun baton script

EDIT:
I'm reading the scripting page https://wiki.frictionalgames.com/hpl3/ga...layer_tool
Can unlimited stun baton be achieved like this?
1)call script that gives stun baton in inventory
2)Player_ToolIsInInventory - checks to see if the player has picked up a tool with this name.
3)Player_EquipTool -> stun baton - the player holds up the tool in his hand if it's in the inventory.
4)if Player_EquipTool -> omnitool, then Player_UnequipTool -> stun baton (for the main gameflow)
5)set Player_RemoveTool to zero because we don't stun baton be removed from inventory


And with that we probably have to use PlayerHands_PlayAnimation
(This post was last modified: 09-24-2015, 05:17 PM by Radiance.)
09-23-2015, 06:20 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#2
RE: Unlimited stun baton script

Creating the stun baton object itself would be fairly simple, granted one knows how to generate the model, put it together in the ModelEditor, and mark it as a tool. Then you could use any or all of those four functions in your map's logic to determine how a player might pick it up, equip/unequip it, or lose it. Even that is fairly trivial, and you can download the developer-created short campaign for a simple example of how to pick up and equip a tool, then using the tool on the proper target.

Actually implementing it into the game would be a different matter. As far as I can tell, there aren't any built-in weapons in the code base, so setting up a system that would handle the using of the weapon, including the collision detection and handling of any damage dealt (as I'm not sure if monsters/enemy characters have health) and anything else involved with putting that together would have to be coded from the ground up.
10-14-2015, 12:21 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Unlimited stun baton script

(10-14-2015, 12:21 PM)Abion47 Wrote: Actually implementing it into the game would be a different matter. As far as I can tell, there aren't any built-in weapons in the code base, so setting up a system that would handle the using of the weapon, including the collision detection and handling of any damage dealt (as I'm not sure if monsters/enemy characters have health) and anything else involved with putting that together would have to be coded from the ground up.

As far as I know, everything has health, but:

1. Not everything has a "death" animation.
2. As such, not everything has a "broken" animation (the glass smashing when the chair collides with the window in the first moments is a good example here).
3. If the stun baton is implemented, if the way enemies health systems worked, at least back in Amnesia, was if the enemy was stunned by a chair, they lost health, but it practically immediately climbed back to 100, so you may have to edit the cores of certain enemies or enemy classes as well.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
10-14-2015, 12:41 PM
Find
TiManGames Offline
Senior Member

Posts: 517
Threads: 25
Joined: May 2015
Reputation: 11
#4
RE: Unlimited stun baton script

You just want to create a super space alien gun to kill some monsters don't you? :3

This forum is dead
10-14-2015, 03:41 PM
Find
Radiance Offline
Senior Member

Posts: 319
Threads: 34
Joined: Aug 2015
Reputation: 5
#5
RE: Unlimited stun baton script

(10-14-2015, 03:41 PM)TheTieMan Wrote: You just want to create a super space alien gun to kill some monsters don't you? :3
To zapp them momentarily [Image: depressed-smiley-emoticon.gif] when I hide [Image: afraid.gif]
10-14-2015, 04:25 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#6
RE: Unlimited stun baton script

Okay, it took me watching a Let's Play to remember what the stun baton actually was, so that's my misunderstanding painted in neon letters. I thought this was about an actual swung weapon rather than a tool that had a special interaction with specific entities and/or types of entities.

So yeah, in that case, what you propose would work, although I'd suspect that you would also have to edit all the kinds of enemies you want to be able to stun in order to be able to actually stun them.
10-18-2015, 09:42 AM
Find




Users browsing this thread: 4 Guest(s)