Triggers or attributes question

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
Post Reply
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Triggers or attributes question

Post by Danimita92 »

Hi everybody, I was planning new things for my game when I came up with an idea, and I'm trying to work it out. Okay, so the problem is that I've read the attribute and trigger entities part of the manual, but i just can't figure out how to do this:

1. Create a model in the game with a trigger assigned to it that activates when a pawn collides with the model, and deactivates when it's not.
2. Assign an attribute entity to a model that gives a pawn a certain ammount of this attribute, but that when the pawn isn't colliding with the model, the attribute goes back to zero.

I'd appreciate an answer, even if it's a "no idea how you could do that" please. Thanks for reading and I hope you can help me!
User avatar
QuestOfDreams
Site Admin
Posts: 1525
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Triggers or attributes question

Post by QuestOfDreams »

Danimita92 wrote:1. Create a model in the game with a trigger assigned to it that activates when a pawn collides with the model, and deactivates when it's not.
What exactly is the problem with this? This should be the default behaviour of the trigger entity. Just make sure that the TimeOn and TimeOff times are rather short (but not 0) and that PlayerOnly is false.
Danimita92 wrote:2. Assign an attribute entity to a model that gives a pawn a certain ammount of this attribute, but that when the pawn isn't colliding with the model, the attribute goes back to zero.
Well, this would be easy for the player using the ModifyAttribute entity ... for a pawn you will need a Trigger entity attached to a model and a script that checks the state of that Trigger. Depending on the state of the Trigger you can use the ModifyAttribute or SetAttribute method to increase or decrease the attribute in question.
Post Reply