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
Changing a level door
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#1
Changing a level door

i want to change a level door to an object, so i can interact with it. i changed the variables in the model editor to object and static. that worked for another entity, but now it doesnt work. i actually just want the door to call a func instead of changing the level.

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-09-2013, 11:39 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#2
RE: Changing a level door

interact with it how? clicking on it?
03-10-2013, 12:00 AM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#3
RE: Changing a level door

The level doors can already call a function, it has playerinteractcallback Smile however I don't think it'll work as it might crash when you try to interact with it as it will try to go to another level.

Another option is to put a script area in front of the door and then the player will interact with that but it will look like it's the door Smile
(This post was last modified: 03-10-2013, 02:34 AM by ExpectedIdentifier.)
03-10-2013, 12:46 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Changing a level door

So when you interact with it (click it.)some thing happened? Or do you want the level door to be a crashed door that you can interact with just like chairs?

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-10-2013, 02:16 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#5
RE: Changing a level door

Do what sonataarctica said and put a script area around the door. Then click on the script area, go to the Area tab, and write your callback where it says "PlayerInteractCallback". Then add that function to your script.

For example, if I wrote "DoStuff" for the callback, I would add this to my script:
PHP Code: (Select All)
void DoStuff(string &in asEntity)
{
    
// do stuff here


In Ruins [WIP]
(This post was last modified: 03-10-2013, 06:24 AM by NaxEla.)
03-10-2013, 06:23 AM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#6
RE: Changing a level door

I have the problem... It was all fine, i just couldnt interact with it because i did not set an interaction callback yet. I tried to interact with it with out having it to call something. I expected at least to see the icon, but thats only possible when it has an interaction callback

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-10-2013, 11:51 AM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#7
RE: Changing a level door

Make the level door locked (without sound) and do the "PlayerInteractCallback"?

When Life No Longer Exists
Full-conversion mod
03-10-2013, 11:57 AM
Website Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#8
RE: Changing a level door

You check the interaction box on the second tab of the script_area. Then you put the script NaxEla was talking about.

[Image: the-cabin-in-the-woods-masked-people.jpg]
03-10-2013, 11:57 AM
Find




Users browsing this thread: 1 Guest(s)