Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help New Question: How to create a door
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#51
RE: 3 Questions: Cave In and Destroying bookshelf

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
Find
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#52
RE: 3 Questions: Cave In and Destroying bookshelf

(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.

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 06-24-2012, 10:07 PM by Nervly.)
06-24-2012, 10:06 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#53
RE: 3 Questions: Cave In and Destroying bookshelf

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
Find
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#54
RE: 3 Questions: Cave In and Destroying bookshelf

(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.

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 06-29-2012, 07:10 PM by Nervly.)
06-24-2012, 11:43 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#55
RE: 3 Questions: Cave In and Destroying bookshelf

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
Find
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#56
RE: 3 Questions: Cave In and Destroying bookshelf

(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?

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 06-30-2012, 01:10 AM by Nervly.)
06-29-2012, 09:44 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#57
RE: 3 Questions: Cave In and Destroying bookshelf

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
Find
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#58
RE: 3 Questions: Cave In and Destroying bookshelf

(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.

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 06-30-2012, 12:46 PM by Nervly.)
06-30-2012, 12:44 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#59
RE: 3 Questions: Cave In and Destroying bookshelf

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.
06-30-2012, 01:22 PM
Find
Nervly Offline
Junior Member

Posts: 40
Threads: 2
Joined: Feb 2012
Reputation: 0
#60
RE: 3 Questions: Cave In and Destroying bookshelf

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

Check it out!
http://www.youtube.com/Nervly

Please?
[Image: please-please-please.jpg]
(This post was last modified: 07-03-2012, 11:51 PM by Nervly.)
07-01-2012, 11:09 AM
Find




Users browsing this thread: 1 Guest(s)