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
how do i make a painting moveable?
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#1
how do i make a painting moveable?

i wanted to hide my key behind a painting but i cant get the paint to move.
please help me and in steps by steps like

1 go to (file)
2 ( write )
06-18-2012, 02:10 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: how do i make a painting moveable?

There are several paintings in game that already are "movable", no scripting required!

You can find these in entities>ornaments. You can tell the paintings are movable by their name, the ending "dynamic" is at the end of every movable painting.

Here's an example of one:

"painting03_dynamic_1.ent"


So for your specific quest in the OP:

1. Select the "entities" section in the Level Editor
2. Select "ornaments"
3. Scroll down until you reach the paintings to choose from (the list is in alphabetical order)
4. You can now select any painting with the suffix "dynamic" or "dyn" to use;
5. Select the one you personally think is the prettiest
6. Use it in game to hide your key! Again, all paintings with dyn/dynamic can be interacted with (i.e. picked up, thrown, sat down by the fire, etc)

Hope that helped!

I rate it 3 memes.
06-18-2012, 02:18 PM
Find
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#3
RE: how do i make a painting moveable?

(06-18-2012, 02:18 PM)andyrockin123 Wrote: There are several paintings in game that already are "movable", no scripting required!

You can find these in entities>ornaments. You can tell the paintings are movable by their name, the ending "dynamic" is at the end of every movable painting.

Here's an example of one:

"painting03_dynamic_1.ent"


So for your specific quest in the OP:

1. Select the "entities" section in the Level Editor
2. Select "ornaments"
3. Scroll down until you reach the paintings to choose from (the list is in alphabetical order)
4. You can now select any painting with the suffix "dynamic" or "dyn" to use;
5. Select the one you personally think is the prettiest
6. Use it in game to hide your key! Again, all paintings with dyn/dynamic can be interacted with (i.e. picked up, thrown, sat down by the fire, etc)

Hope that helped!
Thanks buddy! now can i ask you another question. i have two keys. i alrdy maked the script for the first one correct. now how shall i set u the next? Sorry im kinda new to this Smile Here is the script


////////////////////////////
// Run first time starting map

void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0.0f, true);
}


////////////////////////////
// Run when leaving map
void OnLeave()
{

}

the name of the next key is key_2 and the door is mansion_2
(This post was last modified: 06-18-2012, 03:06 PM by Hartmann.)
06-18-2012, 03:04 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: how do i make a painting moveable?

Basically, you must add another callback to void OnStart, (similar to the first one you did), and make a new function. That will look like this:


void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_2", "mansion_2", "KeyOnDoor_2", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0.0f, true);
}

void KeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0.0f, true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Hope that helped!

I rate it 3 memes.
06-18-2012, 03:11 PM
Find
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#5
RE: how do i make a painting moveable?

And how do i make it so the painting stick to the wall?

it falls down when i enter my cs
06-18-2012, 03:12 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#6
RE: how do i make a painting moveable?

(06-18-2012, 03:12 PM)Hartmann Wrote: And how do i make it so the painting stick to the wall?

it falls down when i enter my cs
The trick is to make sure "Snap To Grid" is not checked; this allows for more precise movements of objects in the level editor. What you'll want make sure the painting is touching the wall, but also make sure the player can still see all of it (i.e. the wall behind the painting isn't pushing through the texture).

Basically, just make sure the frame is touching the wall, but the wall isn't going through the picture.

I rate it 3 memes.
06-18-2012, 03:17 PM
Find
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#7
RE: how do i make a painting moveable?

(06-18-2012, 03:17 PM)andyrockin123 Wrote:
(06-18-2012, 03:12 PM)Hartmann Wrote: And how do i make it so the painting stick to the wall?

it falls down when i enter my cs
The trick is to make sure "Snap To Grid" is not checked; this allows for more precise movements of objects in the level editor. What you'll want make sure the painting is touching the wall, but also make sure the player can still see all of it (i.e. the wall behind the painting isn't pushing through the texture).

Basically, just make sure the frame is touching the wall, but the wall isn't going through the picture.
Thanks alot ! Your sure helped me my freind Smile
06-18-2012, 03:18 PM
Find




Users browsing this thread: 1 Guest(s)