Triggers - Simple - yes? Confusing? Yep!

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
Post Reply
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

Okay, I have searched the forum and consulted the manual...and I still can't get it.

I want the user to shoot a model, and trigger another model. I have two models, one animated, one not. Shoot the non-animated model and trigger the animated model.

I have two triggers - trigger1 is tied to the non-animated model. trigger2 is tied to the animated model. I made trigger1 shoot = true and named the Trigger Name of trigger2 to trigger1. However, shooting the model tied to trigger1 fails to trigger trigger2.

I have tried logicgates and that is even more confusing. Can anyone tell me what I am doing wrong?
Steve Dilworth - Resisting change since 1965!
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Triggers - Simple - yes? Confusing? Yep!

Post by QuestOfDreams »

Actually, - if I understand you correctly - you just need one Trigger entity. The setup is basically the same as the example given in the manual. You need a world model for the trigger. The name of that model goes into the Model parameter of the Trigger entity. Set the bShoot flag of the trigger to true and fill in a name in the szEntityName.
Your second (animated) model can be controlled by a Door or a MovingPlatform entity. The name of the second model goes into the Model parameter of the Door/MovingPlatform entity. When using a MovingPlatform, set bAutoStart to false. The szEntityName of the Trigger entity goes into the TriggerName option of the Door/MovingPlatform.
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

QuestOfDreams wrote:Actually, - if I understand you correctly - you just need one Trigger entity. The setup is basically the same as the example given in the manual. You need a world model for the trigger. The name of that model goes into the Model parameter of the Trigger entity. Set the bShoot flag of the trigger to true and fill in a name in the szEntityName.
Your second (animated) model can be controlled by a Door or a MovingPlatform entity. The name of the second model goes into the Model parameter of the Door/MovingPlatform entity. When using a MovingPlatform, set bAutoStart to false. The szEntityName of the Trigger entity goes into the TriggerName option of the Door/MovingPlatform.
I tried both Door and Moving Platform. Neither one worked. I'm not sure what you mean by 'World Model'. I just created a model with no animation. Is there a difference?
Steve Dilworth - Resisting change since 1965!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

GOT IT! GOT IT! GOT IT!! I did wind up using a door. I followed the docs to the letter, and it worked! Thank you, Daniel. :D

Now, on to the next challenge...

[edit]Added screen of achievement[/edit] - So far, so good. I have the user press the lighted button, and that big target with the number 1 pops up from behind the wall and goes Sproing! Now, I want the user to have to shoot the target to make another pop up from behind another wall with a number 2 on it. Frankly, I'm stumped. Would a logic gate help?
Attachments
Newscreen02.jpg
(88.53 KiB) Not downloaded yet
Steve Dilworth - Resisting change since 1965!
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Triggers - Simple - yes? Confusing? Yep!

Post by QuestOfDreams »

This is indeed a bit tricky. My solution goes like this:
A target actually consists of two MovingPlatform entities. The first one (the lifter) is triggered by the Trigger entity or the previous target and moves the target into position. The second platform (the board) is attached to the lifter via the ParentModel entry. It gets activated by shooting at it, does not move (it must have an additional animation frame though, otherwise RF will crash!), and triggers the next target's lifter via the NextToTrigger entry.
Also the 'lifter' platform needs the bShoot parameter set to be true for the NextToTrigger option to work properly.
I've attached a simple level to demonstrate the setup.
Attachments
triggerModelByShoot.zip
(4.81 KiB) Downloaded 167 times
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

QuestOfDreams wrote:This is indeed a bit tricky. My solution goes like this:
A target actually consists of two MovingPlatform entities. The first one (the lifter) is triggered by the Trigger entity or the previous target and moves the target into position. The second platform (the board) is attached to the lifter via the ParentModel entry. It gets activated by shooting at it, does not move (it must have an additional animation frame though, otherwise RF will crash!), and triggers the next target's lifter via the NextToTrigger entry.
Also the 'lifter' platform needs the bShoot parameter set to be true for the NextToTrigger option to work properly.
I've attached a simple level to demonstrate the setup.
I actually understand it! I'll give it a go first chance I get. It is so fun making games again. It's been too long. Thanks QOD!
Steve Dilworth - Resisting change since 1965!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

Yes! I got my platforms to work, thanks to you, Daniel. I followed your example, and they work like a charm. Each one waits for the next to get hit.
Steve Dilworth - Resisting change since 1965!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

New problem. I can not trigger a moving platform with a trigger entity. :roll:

I know my trigger works, because I used it to trigger a message. I know my platform works because I auto started it just to make sure. However, when I try to use the trigger -- no go.

I have read and read the user manual and set the parameters just as instructed. No moving platform with either the use key or player collision.

Most frustrating. I have to get to sleep, so I'm not posting images.

I've got a trigger set to player only, szentityname trigger1

Platform1: nocollide = true, model plat1, triggername = trigger1

Platform 2: nocollide = true, model plat1A, parent model Plat1 - i've tried with no trigger, and with triggername -- nothing doing.
Steve Dilworth - Resisting change since 1965!
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Re: Triggers - Simple - yes? Confusing? Yep!

Post by steven8 »

steven8 wrote:New problem. I can not trigger a moving platform with a trigger entity. :roll:

I know my trigger works, because I used it to trigger a message. I know my platform works because I auto started it just to make sure. However, when I try to use the trigger -- no go.

I have read and read the user manual and set the parameters just as instructed. No moving platform with either the use key or player collision.

Most frustrating. I have to get to sleep, so I'm not posting images.

I've got a trigger set to player only, szentityname trigger1

Platform1: nocollide = true, model plat1, triggername = trigger1

Platform 2: nocollide = true, model plat1A, parent model Plat1 - i've tried with no trigger, and with triggername -- nothing doing.
Fixed it. While I read the manual, I read about triggers. It stated that the rules for platforms were the same as doors. Then I just read about platforms. In the platform instruction, it has runwhiletriggered = true. In the trigger instructions, the example door does not have runwhiletriggered = true. That was the difference. I set runwhiletriggered to true, and we're a go!!
Steve Dilworth - Resisting change since 1965!
Post Reply