Frictional Games Forum (read-only)

Full Version: New Question: How to create a door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
I personally couldn't find a way. the easiest way would be to model a wall with hole in a 3d modelling program, and place it in the same place as the castle wall hole + wall, and move it a bit slightly forth so that the mansionbase wall is visible instead of the castle wall. But I myself can't try that out, since I suck at modeling. Try a 3d modelling program like Maya or blender and try your luck.
(06-24-2012, 06:08 PM)FastHunteR Wrote: [ -> ]I personally couldn't find a way. the easiest way would be to model a wall with hole in a 3d modelling program, and place it in the same place as the castle wall hole + wall, and move it a bit slightly forth so that the mansionbase wall is visible instead of the castle wall. But I myself can't try that out, since I suck at modeling. Try a 3d modelling program like Maya or blender and try your luck.
Thanks, Ill try Blender Smile
Now I'm trying to make a Pot appear in middle air behind the Player and when it falls breaks and makes the noise.
I used this script:

Quote:void OnStart()
{
AddEntityCollideCallback("Player", "pot_area", "PotBreaks", true, 1);
}
void PotBreaks(string &in asItem, string &in asEntity)
{
SetEntityActive("pot_plant_small01_4", false);
SetEntityActive("pot_plant_small01_3", true);
}

But when I step the Script area it does nothing :/
I checked the names of the entities and they are fine. What is the problem?
I tried to use the force script that pushes an entity, but couldn't make it.
wrong callback syntax for collide callback. if you look in the engine scripts page, you see it's this one:
void PotBreaks(string &in asParent, string &in asChild, int alState)
(06-24-2012, 10:14 PM)FastHunteR Wrote: [ -> ]wrong callback syntax for collide callback. if you look in the engine scripts page, you see it's this one:
void PotBreaks(string &in asParent, string &in asChild, int alState)
Thank you, it's working now Smile
+1 Rep

EDIT:
http://www.youtube.com/watch?v=hcmjjXTA0...ded#t=180s

3:00 - 3:05, how can I do that "zoom in/out" effect?
Also, how do I unlit the candles by script? Like after wind comes.
When in doubt, check how frictional games made it. I searched it out for you:
void FadePlayerFOVMulTo(float afX, float afSpeed);
Changes the field of view of the player. A shorter FOV will create a zoom
effect.
afX - multiplier of default FOV (1 is default)
afSpeed -
the speed of change between FOV's
(06-29-2012, 08:52 PM)FastHunteR Wrote: [ -> ]When in doubt, check how frictional games made it. I searched it out for you:
void FadePlayerFOVMulTo(float afX, float afSpeed);
Changes the field of view of the player. A shorter FOV will create a zoom
effect.
afX - multiplier of default FOV (1 is default)
afSpeed -
the speed of change between FOV's
Thanks, I saw the .hps file of the Old Archives but I couldn't make it work in mine.
I tried te script you gave me too, but I got error. I'll try something and see if it works. Smile
Thank you once again, +1 Rep.

EDIT:
Everything is working! Smile
The candles go off after the wind comes and the zoom is working.
There's just one problem:

I made it so the player would look at a pot plant when he steps a script area, but he doesn't look. :/
Here is the script:

Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "pot_area", "PotBreaks", true, 1);
AddEntityCollideCallback("Player", "wind_area", "Wind", true, 1);
AddEntityCollideCallback("Player", "SeeTorsoSound", "React", true, 1);
}
void PotBreaks(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("pot_plant_small01_4", false);
SetEntityActive("pot_plant_small01_3", true);
SetEntityActive("wind_area", true);
GiveSanityDamage(5, true);
StartPlayerLookAt("table_nice_round_1", 10, 100, "");
}

That's just the part of the pot, the script has more stuff for the other functions.
I tried aswell with the StopPlayerLookAt() but didn't work too.
What am I doing wrong?
I don't see any problem with that script. Dobule check if the script area is named "pot_area" and if the thing you want to look at is named "table_nice_round_1".
(06-30-2012, 12:36 PM)FastHunteR Wrote: [ -> ]I don't see any problem with that script. Dobule check if the script area is named "pot_area" and if the thing you want to look at is named "table_nice_round_1".
I did, it couldn't be the problem though, since that StartLookingAt is the only thing that doesn't work and the SetEntityActive does works. I'll try to rename the table and see if it works.

EDIT:
It doesn't. Maybe the problem is in some other place?
Here's the full script:

Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "pot_area", "PotBreaks", true, 1);
AddEntityCollideCallback("Player", "wind_area", "Wind", true, 1);
AddEntityCollideCallback("Player", "SeeTorsoSound", "React", true, 1);
}
void PotBreaks(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("pot_plant_small01_4", false);
SetEntityActive("pot_plant_small01_3", true);
SetEntityActive("wind_area", true);
GiveSanityDamage(5, false);
StartPlayerLookAt("table", 10, 100, "");
}
void Wind(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_torso_1", true);
SetEntityActive("corpse_male_arm_1", true);
SetEntityActive("blood_spatter01_2", true);
SetEntityActive("SeeTorsoSound", true);
SetEntityActive("Insanity", true);
SetLampLit("candlestick_tri_1", false, true);
SetLampLit("chandelier_nice_1", false, true);
SetLampLit("candlestick_floor_2", false, true);
SetLampLit("candlestick_floor_1", false, true);
SetLampLit("candle_floor_1", false, true);
SetLampLit("candle_floor_small_1", false, true);
SetLampLit("candlestick01_2", false, true);
SetLampLit("candlestick01_1", false, true);
FadeLightTo("PointLight_1", 0, 0, 0, 0, 0, 1);
CreateParticleSystemAtEntity("ParticleSystem_2", "ps_break_cavein_local.ps", "level_celler_1", false);
PlaySoundAtEntity("", "general_wind_whirl.snt", "level_celler_1", 0, false);
}
void React(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
StartScreenShake(0.003f,0.25f, 1,1);
GiveSanityDamage(50, true);
FadePlayerFOVMulTo(RandFloat(0.7f,1.3f), RandFloat(0.05f,0.1f));
}

Everything is working except for the StartLookingAt.
I don't know, but I think you can't set script areas inactive like that. cut out
AddEntityCollideCallback("Player", "wind_area", "Wind", true, 1);
and paste it nex to SetEntityActive("wind_area", true);
which you will delete too. Set the script area active in the level editor.
Other than that, I don't see any problem with it.
I managed to get it to work! Smile
I made a new function, and placed the StartPlayerLookAt in that function and it worked.
Thanks for everything, FastHunteR!
+1 Rep

EDIT:
Got a new problem :/
I used in a script .snt sound, "amb_idle", and its a really long sound.
So in the script I changed it to PlayMusic, to play the .ogg file "amb_idle02", but it plays the same amb_idle.snt long sound.
I listened the .ogg file in Foobar, and it was different from the .snt file, but in-game it is the same as the .snt file.
What can I do to solve this?

Thanks Smile
Pages: 1 2 3 4 5 6 7 8