Page 1 of 2
I think I shouldn't be asking such questions :(
Posted: Tue Aug 05, 2008 6:08 pm
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).
Re: I think I shouldn't be asking such questions :(
Posted: Tue Aug 05, 2008 9:46 pm
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!
Re: I think I shouldn't be asking such questions :(
Posted: Tue Aug 05, 2008 10:51 pm
by metal_head
ok,thanks steve8 I'll try!It will save my life if I manage
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
!
Re: I think I shouldn't be asking such questions :(
Posted: Wed Aug 06, 2008 6:50 am
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.
Re: I think I shouldn't be asking such questions :(
Posted: Wed Aug 06, 2008 11:28 am
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".
Re: I think I shouldn't be asking such questions :(
Posted: Wed Aug 06, 2008 12:57 pm
by Juutis
Just like you would do with a normal door:
bShoot = false
UseKey = true
Re: I think I shouldn't be asking such questions :(
Posted: Thu Aug 07, 2008 2:00 am
by steven8
You're welcome!
Juutis wrote:Just like you would do with a normal door:
bShoot = false
UseKey = true
Exactly.
Re: I think I shouldn't be asking such questions :(
Posted: Sat Aug 09, 2008 7:14 pm
by metal_head
thanks a lot guys,that will help me a lot with my game!
Re: I think I shouldn't be asking such questions :(
Posted: Sat Aug 09, 2008 8:44 pm
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.
Re: I think I shouldn't be asking such questions :(
Posted: Sun Aug 10, 2008 4:34 am
by steven8
Oddly enough, it worked for me without setting the attribute to increase at all!
Re: I think I shouldn't be asking such questions :(
Posted: Sun Aug 10, 2008 9:50 am
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?)
Re: I think I shouldn't be asking such questions :(
Posted: Mon Aug 11, 2008 4:35 am
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.
Re: I think I shouldn't be asking such questions :(
Posted: Mon Aug 11, 2008 8:49 am
by metal_head
oh,I can be so dumb sometimes! Thanks!
Re: I think I shouldn't be asking such questions :(
Posted: Mon Aug 11, 2008 2:38 pm
by steven8
No problem. Sometimes the answer is staring us right in the face.
Re: I think I shouldn't be asking such questions :(
Posted: Mon Aug 11, 2008 4:31 pm
by metal_head
yeah,most of the times it's infront of me,but I still don't see it
.
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.