Frictional Games Forum (read-only)

Full Version: Sword into a Prisoner... how to ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:
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)
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:
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
Thanks! and i mean from inventory Big Grin soyou have a dagger in inventory...
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:
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:
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
Thankyou!
really thanks for you're time! everything is Set-Up... Everything ;o
thankyou!!! finally i know this script to Big Grin