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 ?
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
Sword into a Prisoner... how to ?

hello , i have a prisoner (from Entities , Characters)
i want to put a sword into it to get a lever out of him *belly*
what script do i need and do i need an area ?!?!?!
AND how does Stopmusic work ?! i have

PHP Code: (Select All)
StopMusic("1.5f""Kasteel.SNT"); 

but if i open my Story it says something about ´can´t connect String"string and some other things... can someone help me ?!? i need to contineu from this* map -_-
i'm working 3 days now for just scripting things :S mapping is easy...can someone help me ?! and if i see... you can't put something into that prisoner ?! so do i need a area ?? (already asked)
08-20-2014, 07:54 PM
Find
Streetboat Offline
Posting Freak

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

do you mean use a sword item from your inventory on the prisoner, or physically take a sword object and use it on the prisoner? because both are do-able, but you'll have to be clearer about which one you want.

as for StopMusic, it should look like this

PHP Code: (Select All)
StopMusic(51); 

The first number is how many seconds you want it to fade out, and the second number is the priority of the music being stopped. I always just use 1 for that. It will stop any and all music being played.

For more in-depth help on what the scripts do, look at this website: https://wiki.frictionalgames.com/doku.ph..._functions

[Image: signature-2.png]
08-20-2014, 08:53 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: Sword into a Prisoner... how to ?

Thanks! and i mean from inventory Big Grin soyou have a dagger in inventory...
08-20-2014, 08:59 PM
Find
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
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#5
RE: Sword into a Prisoner... how to ?

Thankyou!
really thanks for you're time! everything is Set-Up... Everything ;o
thankyou!!! finally i know this script to Big Grin
08-21-2014, 06:30 AM
Find




Users browsing this thread: 1 Guest(s)