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
P_Tut - Valve & Slide Door - Example
plantum Offline
Junior Member

Posts: 4
Threads: 1
Joined: Jul 2011
Reputation: 0
#1
Brick  P_Tut - Valve & Slide Door - Example

Hello, i decided to make some help for ppl. Angel
Its really hard to create good map. I know its difficult to understand how things work, so i will give examples of good working stuff.

Plantum_Tutorial(P_Tut)
Lesson 1. Valve and Slide Door.
Doors that can be opened/closed with rotating wheel, and also
a lever for fast-close that doors.

http://plantum.w.interii.pl/download/P_T...deDoor.zip
This map can be opened on both: HPL Editor and Amnesia

Known Appearances(of Valve-Door Thing): Justine DLC - 03_dungeon map

I'm really sorry for my bad English.Confused

I'm planning do release other lessons soon, like: Working Rope Puzzle, Lever Opening Doors For !Time!, and more....

If you have any question OR tip about valve-door connection pls write here. This Topic is created to help.Exclamation
07-10-2011, 03:30 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#2
RE: P_Tut - Valve & Slide Door - Example

(07-10-2011, 03:30 PM)plantum Wrote: Hello, i decided to make some help for ppl. Angel
Its really hard to create good map. I know its difficult to understand how things work, so i will give examples of good working stuff.

Plantum_Tutorial(P_Tut)
Lesson 1. Valve and Slide Door.
Doors that can be opened/closed with rotating wheel, and also
a lever for fast-close that doors.

http://plantum.w.interii.pl/download/P_T...deDoor.zip
This map can be opened on both: HPL Editor and Amnesia

Known Appearances(of Valve-Door Thing): Justine DLC - 03_dungeon map

I'm really sorry for my bad English.Confused

I'm planning do release other lessons soon, like: Working Rope Puzzle, Lever Opening Doors For !Time!, and more....

If you have any question OR tip about valve-door connection pls write here. This Topic is created to help.Exclamation

Okay if you are here to help can you solve this?

Why this "you only live once.ogg" track never stops playing when i reach next level.

Script:

void MusicControl2(string &in asParent, string &in asChild, int alState)
{
StopMusic(4, 1);
PlayMusic("You Only Live Once.ogg", false, 3, 3, 10, true);
}

void MusicControl(string &in asParent, string &in asChild, int alState)
{
if(alState == 1) PlayMusic("Requim For A Dream.ogg", true, 1.0f, 0, 0, true);
else StopMusic(4, 1);
}

What i am doing wrong?

“Life is a game, play it”
(This post was last modified: 07-10-2011, 03:44 PM by HumiliatioN.)
07-10-2011, 03:44 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#3
RE: P_Tut - Valve & Slide Door - Example

In StopMusic you have to put the same priority value in the alPrio spot that you have in the PlayMusic one

copy pastes from script functions:
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc

alPrio - the priority of the music that should stop
07-10-2011, 06:43 PM
Find
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#4
RE: P_Tut - Valve & Slide Door - Example

A void OnLeave on the map where you Leave ?
void OnLeave
{
StopMusic(4, 1);
}
No ?
(This post was last modified: 07-10-2011, 07:03 PM by Jordo76.)
07-10-2011, 07:02 PM
Website Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#5
RE: P_Tut - Valve & Slide Door - Example

(07-10-2011, 07:02 PM)Jordo76 Wrote: A void OnLeave on the map where you Leave ?
void OnLeave
{
StopMusic(4, 1);
}
No ?

I tried everything but no luck. This is so frustrating. When i change that prioty 1 or 0 then "Track never starts playing" :/

“Life is a game, play it”
07-10-2011, 07:40 PM
Find
plantum Offline
Junior Member

Posts: 4
Threads: 1
Joined: Jul 2011
Reputation: 0
#6
Music  RE: P_Tut - Valve & Slide Door - Example

(07-10-2011, 07:40 PM)HumiliatioN Wrote:
(07-10-2011, 07:02 PM)Jordo76 Wrote: A void OnLeave on the map where you Leave ?
void OnLeave
{
StopMusic(4, 1);
}
No ?

I tried everything but no luck. This is so frustrating. When i change that prioty 1 or 0 then "Track never starts playing" :/

Well, i was hoping that guyz will come here with proper questions (about valve) but is alright, i will try to help.

It would be a lot easier if i could see this map and script, so if you can, somehow, pls send it to me, or post somewhere.

My first though- Your Music (number 1) never stops playing CAUSE next music (number 2) never comes up. I see script, and its can be wrong or something, i guess, first you should try turn off first music (number 1) and make sure that the script (number 2) is working correctly and its playing second music (number 2).


When i woke up this morning i tried some things, and this is what i can tell:

When you have two maps, with two musics on the same priorty, the music is changing automatic (you dont need no "StopMusic" command.) This works also when priorities are different
Its not perfect but its work.

So the easiest way to do this is just put the "PlayMusic" command in the place "OnEnter", and game will change music when you enter to another map automatically (one music will fade to another).

What i discovered, i think
When you change map (i.e. 1 >> 2 ), and you come back ( 2 >> 1 ) - the music is not playing from the start(begging), so
i guess it means that the game its saving the its progress(music progress) OR the music just never stop playing.

How i did it?

void OnLeave()
{
StopMusic(5, 10);
}

If you wont put that in your script. The music will always play from the begging.(as you enter the map)

======================================
Try my example and tell me if that is what you want, check it and tell me what you think, maybe you want something different, i don't know.


Attached Files
.zip   P_Tutorial-LevelToLevel_ChangeMusic.zip (Size: 70.66 KB / Downloads: 237)
07-11-2011, 07:52 AM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#7
RE: P_Tut - Valve & Slide Door - Example

(07-11-2011, 07:52 AM)plantum Wrote:
(07-10-2011, 07:40 PM)HumiliatioN Wrote:
(07-10-2011, 07:02 PM)Jordo76 Wrote: A void OnLeave on the map where you Leave ?
void OnLeave
{
StopMusic(4, 1);
}
No ?

I tried everything but no luck. This is so frustrating. When i change that prioty 1 or 0 then "Track never starts playing" :/

Well, i was hoping that guyz will come here with proper questions (about valve) but is alright, i will try to help.

It would be a lot easier if i could see this map and script, so if you can, somehow, pls send it to me, or post somewhere.

My first though- Your Music (number 1) never stops playing CAUSE next music (number 2) never comes up. I see script, and its can be wrong or something, i guess, first you should try turn off first music (number 1) and make sure that the script (number 2) is working correctly and its playing second music (number 2).


When i woke up this morning i tried some things, and this is what i can tell:

When you have two maps, with two musics on the same priorty, the music is changing automatic (you dont need no "StopMusic" command.) This works also when priorities are different
Its not perfect but its work.

So the easiest way to do this is just put the "PlayMusic" command in the place "OnEnter", and game will change music when you enter to another map automatically (one music will fade to another).

What i discovered, i think
When you change map (i.e. 1 >> 2 ), and you come back ( 2 >> 1 ) - the music is not playing from the start(begging), so
i guess it means that the game its saving the its progress(music progress) OR the music just never stop playing.

How i did it?

void OnLeave()
{
StopMusic(5, 10);
}

If you wont put that in your script. The music will always play from the begging.(as you enter the map)

======================================
Try my example and tell me if that is what you want, check it and tell me what you think, maybe you want something different, i don't know.

Thanks for the tips and tutorial I'll maybe tried it. I have solved my problem now different way. Smile

“Life is a game, play it”
07-11-2011, 10:58 AM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#8
RE: P_Tut - Valve & Slide Door - Example

I have request can you make many puzzle tutorials on here and we can download these.

Like:

Items combine tutorials, levers, explosions other different puzzles and new ones..

Scare tutorials / effects, using advanced ways to particles etc.

and one nice tutorial where "Shadow hunts you or slimes appears suddenly" that would be nice.

Thanks. Smile

“Life is a game, play it”
07-11-2011, 03:10 PM
Find
plantum Offline
Junior Member

Posts: 4
Threads: 1
Joined: Jul 2011
Reputation: 0
#9
RE: P_Tut - Valve & Slide Door - Example

(07-11-2011, 03:10 PM)HumiliatioN Wrote: I have request can you make many puzzle tutorials on here and we can download these.

Like:

Items combine tutorials, levers, explosions other different puzzles and new ones..

Scare tutorials / effects, using advanced ways to particles etc.

and one nice tutorial where "Shadow hunts you or slimes appears suddenly" that would be nice.

Thanks. Smile


You expecting too much... ;D
I'm uploading sample of my upcoming custom story: P.Z.A.

You got ONE explode event. Thats all what i can give you for now.

My map is actually much bigger, but i decided to cut it.


Attached Files
.zip   P_Tutorial-FarAwayExplosion.zip (Size: 1.91 MB / Downloads: 192)
(This post was last modified: 07-12-2011, 07:38 AM by plantum.)
07-12-2011, 07:38 AM
Find




Users browsing this thread: 1 Guest(s)