Help me make a pot of tea.

Topics regarding Scripting with Reality Factory
Post Reply
dsjenkins
Posts: 8
Joined: Wed May 16, 2007 9:31 pm
Location: Portland, Oregon

Help me make a pot of tea.

Post by dsjenkins »

I want to learn scripting and get a grip on how to create, increase and decrease attributes, and attach them to actors. I did the basic Health box attribute, and now I want to have a character go through a set of steps to make a cup of tea.
1) get pot, fill with water.
2) start fire
3) place pot and water on stove.
4) state change to 'boiling' when water has been on fire long enough
5) remove pot and water, pour water into cup.
6) add tea, remove tea, drink tea. Chance thirst stat -10 per cup.

What do you think? What are the best tools to accomplish these steps?

Thanks
Dave
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

you pretty much have to make a bunch of anims. make the pawn follow a path, and when he gets to a certain spot, animate it, then make a var to show he already did it.
Herp derp.
dsjenkins
Posts: 8
Joined: Wed May 16, 2007 9:31 pm
Location: Portland, Oregon

TEa

Post by dsjenkins »

Well, I was thinking the player would be making the tea. Any difference?
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

That can't be done with the built-in player without touching the source code. The built-in player has only certain actions, like running and shooting but making a pot of tea isn't one of them. :wink:

So you will need to use a pawn, be it player controlled (scripted player) or NPC.
Pain is only psychological.
User avatar
Spyrewolf
Posts: 450
Joined: Tue Jul 05, 2005 4:53 am
Location: Wellington::New Zealand

Post by Spyrewolf »

scripted player, will be fine, as for the tutes you gonna need to study the scrtiping guide, it's possibe to do what you've said,

in real life terms the steps to make a cup of tea are straight forward in game terms this becomes realitvely complicated, and require a sizeable amount of scripting.
dsjenkins
Posts: 8
Joined: Wed May 16, 2007 9:31 pm
Location: Portland, Oregon

TEa

Post by dsjenkins »

So, wouldn't a teapot, and cup be able to be picked up, and added to inventory? If so, they could be moved. And can't they hold variables, like Full: true or false? And another for Hot, True or False, and Water, True or false. Say, have a logic gate and counter change the state of the pot from hot:false to Hot: True after a set time, say 10 seconds, triggering a whistle sound and the 'steaming' animation.

I am not as concerned with the physics of the moving cups, pouring water, etc, because that can take some time, just the variables and state changes between the player and his environmental actors. Starting the fire can be as easy as a USE poke to the stove, triggering a fire animation, and a Hot: True state on the stove.

Maybe I am being overly optimistic, but with the ability to create variables, change the state or number value of them, and have them attached to player and actors seems to be a powerful customizing ability, allowing RF to be a much more intricate teaching simulator, and step by step 3d animation guide than just a walk around shooter.

Now, if it is impossible to create a variable like Hot: true or false and attach it to an actor that can be picked up and put down to change the state of another actor...I am on the wrong game dev system. But I'm an optimist.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

certainly you can. that is easy if i read your question right. you can add variables to a player with the player.ini and to a pawn like

Code: Select all

VARIABLENAME       [<insert variable value>]
Herp derp.
Post Reply