I think I shouldn't be asking such questions :(

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

I think I shouldn't be asking such questions :(

Post by metal_head »

I know that's a very basic question,but I've been trying different methods to do this and none of them worked.I have read the manual many times now,and I don't think this isn't described there.
I want to make the follwoing:
in my game I got a locked door,which needs a keycard to open it.The player will have to search for the card and when he find it,go to the door and open it using the card.In my game there isn't inventory,so you just have to have the card to open the door.Now,I know I'll need an attribute,so I wrote this in player.ini:

Code: Select all

[card]
initial = 0
low = 0
high = 1
I think it all has something to do with the world editor.Somehow to set the door not to open untill the card attribute is full(until I've collected the card).
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

This involves triggers, attributes and logic gates, although it's been 4 years since Ive done it, so I would have to relearn it myself. Concentrate on those three things and start hunting. I will do some research myself and get back to you.

P.S. - "I think I shouldn't be asking such questions :(" - Why? Don't ever let anyone tell you you shouldn't be asking a question. It is what a community like this is for!
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

ok,thanks steve8 I'll try!It will save my life if I manage :D
P.S. - "I think I shouldn't be asking such questions " - Why? Don't ever let anyone tell you you shouldn't be asking a question. It is what a community like this is for!
well,yeah,but I don't want to post stupid useless topics,see you have done this four years ago,yes I know Reality Factory from about 10 months,but that doesn't mean I can ask question that have answers long in the past :) Anyway,I'll try with logic gates as you said! I've never used them in my game before,so it will be my first time :) !
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

Okay, I got it.

player.ini:

[keycard]
initial = 0
low = 0
high = 1

Entities:

Door
triggername = she
bShoot = True

Attribute
AttributeName = keycard
szActorName = \Attributes\medkit.act

LogicGate:
Type = 8
Amount = 0
szEntityName = she
Trigger1Name = keycard

Try to shoot the door with grabbing the attribute. Then grab the attribute and shoot the door.
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

yay,thanks! And is it possible to make the door not to open by shooting but by pressing a key when you are near it?because all of the doors in the level are opened by pressing "E".
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: I think I shouldn't be asking such questions :(

Post by Juutis »

Just like you would do with a normal door:

bShoot = false
UseKey = true
Pain is only psychological.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

You're welcome!
Juutis wrote:Just like you would do with a normal door:

bShoot = false
UseKey = true
Exactly.
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

thanks a lot guys,that will help me a lot with my game!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

OK,sorry for the double post,but I tried this several times and it didn't work.I said thanks,but I didn'yt have time to test it if it works.I had never used a logic gate before,so I read about the logic gate in the manual,but I couldn't understand how does it work.

I got a logic gate in my level,also I got a trigger,a door and an attribute entity,which is set to give an ammound of 1 from the "card" attribute.But I couldn't get it...from what I read in themanual I understood that the trigger and the attribute must have the same names in order that to work.I don't know what type to make the logic gate also...

I'm terribly sorry for not asking his earlier,but I dodn't have ime to do it,because I had to do some things in the game befor I could start working on this,and now I'm stuck.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

Oddly enough, it worked for me without setting the attribute to increase at all!
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

I ment that I don't understand how to set up the logic gate,If I want the door to open only if the attribute entity is collected,do I have to name the trigger1 after the attribute (I mean if the attribute is named "card" I have to name the trigger "card" too,right?)
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

steven8 wrote:Okay, I got it.

player.ini:

[keycard]
initial = 0
low = 0
high = 1

Entities:

Door
triggername = she
bShoot = True

Attribute
AttributeName = keycard
szActorName = \Attributes\medkit.act

LogicGate:
Type = 8
Amount = 0
szEntityName = she
Trigger1Name = keycard

Try to shoot the door with grabbing the attribute. Then grab the attribute and shoot the door.
Just put these entries in just as I did. Trigger1Name of the LogicGate matches the attribute name from player.ini.
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

oh,I can be so dumb sometimes! Thanks!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: I think I shouldn't be asking such questions :(

Post by steven8 »

No problem. Sometimes the answer is staring us right in the face.
Steve Dilworth - Resisting change since 1965!
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: I think I shouldn't be asking such questions :(

Post by metal_head »

yeah,most of the times it's infront of me,but I still don't see it :D.
Hey,can I ask you another question?
I added the card in the HUD,so when you collect the card,it shows up in the HUD,I made the card to disappear after 7 seconds.But I want to change that,I want the cad not to disappear untill the player opens the door (I mean,when you open the door,it gets the card attribute from the player...).But I can't make the door to take the attribute from the player once opened.I don't mean when the door is closed,you can't open it any more,I just want to remove the card from the hud when the player opens the door.

If I make the card not to disappear in the HUD,it will be standing there for the rest of the level,and I want to remove the card element after oppening the door for the first time.
Attachments
card.JPG
(81.06 KiB) Downloaded 6 times
Post Reply