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
Sword into a Prisoner... how to ?
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#4
RE: Sword into a Prisoner... how to ?

you have to have a script box on the area where you want to use the dagger, and name it as something you'll remember. in the 'area' tab, check the 'ItemInteraction' tab.

Now, in your .hpl script, add this line to your OnStart segment of code:
PHP Code: (Select All)
AddUseItemCallback("""name_of_dagger_item""name_of_script_area""name_of_script_function"true); 

And then, create a script that looks like such:
PHP Code: (Select All)
void name_of_script_function(string &in asItemstring &in asEntity)
{
PlaySoundAtEntity("""19_inject.snt""Player"0false);
CreateParticleSystemAtEntity("""ps_blood_tiny_splash.ps""name_of_script_area"false);
GiveItem("name_of_item_in_stomach""item_type""name_of_lang_file_description""icon_name"1);
SetMessage("text_category""text_message"0);


if you fill in the areas I made for you, then it should all work. Granted, this is a very basic setup, you can go wild with the functions and add crazy stuff to it, like a vision blur, head movement, player coughs and groans, and generally what one would expect from using a knife to dig through a guy's stomach. I would recommend finding some gross-looking slime entity that you can have initially set to inactive at the map start, and fade it in using "SetPropActiveAndFade" to simulate his guts being dug through.

Good luck, m8

[Image: signature-2.png]
08-20-2014, 10:34 PM
Find


Messages In This Thread
RE: Sword into a Prisoner... how to ? - by Streetboat - 08-20-2014, 10:34 PM



Users browsing this thread: 1 Guest(s)