Page 1 of 1

Help me make a pot of tea.

Posted: Wed May 30, 2007 12:12 am
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

Posted: Wed May 30, 2007 3:36 am
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.

TEa

Posted: Wed May 30, 2007 6:40 am
by dsjenkins
Well, I was thinking the player would be making the tea. Any difference?

Posted: Thu May 31, 2007 12:11 pm
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.

Posted: Thu May 31, 2007 10:45 pm
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.

TEa

Posted: Thu May 31, 2007 11:01 pm
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.

Posted: Fri Jun 01, 2007 12:08 am
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>]