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
Script Help can someone explain me this?
NotASkrub Offline
Junior Member

Posts: 19
Threads: 2
Joined: Jun 2015
Reputation: 0
#1
can someone explain me this?

Hi, I am DefinitelyNotASkrub, and I'm here to ask you this:
Is there a way, that I can script the following:
I have a room with mansion base wall default02.
I want to be able to change that wall with a script to a door_way, door_frame and level door.. Is there any way to do this?
If you need pictures to understand it, I can make them and show them to you ;d
06-18-2015, 03:00 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#2
RE: can someone explain me this?

(06-18-2015, 03:00 PM)NotASkrub Wrote: Hi, I am DefinitelyNotASkrub, and I'm here to ask you this:
Is there a way, that I can script the following:
I have a room with mansion base wall default02.
I want to be able to change that wall with a script to a door_way, door_frame and level door.. Is there any way to do this?
If you need pictures to understand it, I can make them and show them to you ;d

So you want to change a wall, into a Doorway, doorframe and door...
I don't think that's possible.
Since the wall is a Static_Object.
Best way to do this, is change the static objects into Entities.
(I really don't know how for now...)
Be creative with those kinda things Smile
I just made a ground, that moves up and down. so It kinda works like a mini elevator.

And for the scripting, if You changed them into entities (door way and door frame and the wall)
Then simply use the SetEntityActive Smile
06-18-2015, 03:24 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: can someone explain me this?

I have a video on nearly this exact scenario. I'm not sure if LevelDoors can be enabled and disabled though, so you might need to create a "dummy" LevelDoor entity and enable a script area over it which has an interaction callback enabled, which should trigger a ChangeMap event.




(This post was last modified: 06-18-2015, 03:37 PM by Mudbill.)
06-18-2015, 03:36 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#4
RE: can someone explain me this?

To change something into entity:
1. Open modeleditor
2. From menu: import a mesh.
3. You'll have a model appear. Now you need to add a body. Body is a thing stops player and objects from going through the model, so you need to cover it all. That is done by creating a block box- pink thingy button on the left. Add as many as you need, shape and position them, mark them by clicking shift+left mouse button and click 'create body'. Now it's a one piece and you can adjust some things on the right.
4. Most important part. Click on settings>user defined variables. Here choose type:object and then subtype static.
5. Make sure to save the file with a different name and as an .ent file, or else you can screw up big time.
6. Pretty easy, ay ? Now you can use the file as an entity<=>deactivate and activate it when necessary

EDIT: Crap. Mudbill outran me when I was writing D:

(This post was last modified: 06-18-2015, 03:54 PM by Darkfire.)
06-18-2015, 03:52 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: can someone explain me this?

(06-18-2015, 03:36 PM)Mudbill Wrote: I'm not sure if LevelDoors can be enabled and disabled

They definitely can!
I'm pretty sure the only entity type that cannot be disabled is 'StaticProp'

Trying is the first step to success.
06-18-2015, 03:53 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#6
RE: can someone explain me this?

Yup. Almost every entity can be deactivated.

06-18-2015, 03:55 PM
Find
NotASkrub Offline
Junior Member

Posts: 19
Threads: 2
Joined: Jun 2015
Reputation: 0
#7
RE: can someone explain me this?

Amnesiaplayer Wrote:So you want to change a wall, into a Doorway, doorframe and door...
I don't think that's possible.
Since the wall is a Static_Object.
Best way to do this, is change the static objects into Entities.
(I really don't know how for now...)
Be creative with those kinda things Smile
I just made a ground, that moves up and down. so It kinda works like a mini elevator.

And for the scripting, if You changed them into entities (door way and door frame and the wall)
Then simply use the SetEntityActive Smile
Yes! That was my idea at first, I've been thinking for it whole day at school Big Grin
But when I got home, I saw that it can't be done, and so I came here..
==================
Mudbill Wrote:I have a video on nearly this exact scenario. I'm not sure if LevelDoors can be enabled and disabled though, so you might need to create a "dummy" LevelDoor entity and enable a script area over it which has an interaction callback enabled, which should trigger a ChangeMap event.
I was just watching one of your vids, and I feel kinda happy, that you, kind sir posted here, lol.
==================
"Darkfire Wrote:EDIT: Crap. Mudbill outran me when I was writing D:
I know the feel bro..
06-18-2015, 08:39 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#8
RE: can someone explain me this?

(06-18-2015, 08:39 PM)NotASkrub Wrote: [quote="Amnesiaplayer"]So you want to change a wall, into a Doorway, doorframe and door...
I don't think that's possible.
Since the wall is a Static_Object.
Best way to do this, is change the static objects into Entities.
(I really don't know how for now...)
Be creative with those kinda things Smile
I just made a ground, that moves up and down. so It kinda works like a mini elevator.

And for the scripting, if You changed them into entities (door way and door frame and the wall)
Then simply use the SetEntityActive Smile
Yes! That was my idea at first, I've been thinking for it whole day at school Big Grin
But when I got home, I saw that it can't be done, and so I came here..
==================

Haha that happens to me to! Exactly!
I'm always thinking about something really good, at school.
And when i'm home. it doesn't work somehow haha
06-19-2015, 02:41 PM
Find




Users browsing this thread: 1 Guest(s)