Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Binsk on Sat 13/10/2012 15:58:12

Title: Help with driving mechanics
Post by: Binsk on Sat 13/10/2012 15:58:12
Can someone please show me how I would go about how driving sequences, like in Police Quest. Where the player presses the arrow key when they would like to turn their car. Also how could my player change clothing like if you click on the closet or something. Also can you have more than one playable character in your game? And is it possible to make a game respond to text commands, like in the original police quest. My main question is about the driving, however.
Title: Re: Help with driving mechanics
Post by: geork on Sat 13/10/2012 16:32:33
Hello Brinsk, welcome to the forums :)

The answer to all of those are yes: it's all do-able. How familiar are you with the engine though? I'd recommend getting a good groundwork first before going on to more complex things like the driving. The youtube tutorials by densming (http://www.youtube.com/watch?v=1Ml_DR76Cl4&feature=plcp) are an excellent way to get started. Things he doesn't cover will also be in the manual (pressing F1 in the editor will bring it up) and searching the forums will hopefully answer most of those questions.

To answer some now:
Code (AGS) Select
cCharacter.SetAsPlayer(); will make cCharacter the playable character

And you can change the View of the character whenever the player clicks on the wardrobe with

Code (AGS) Select
cCharacter.ChangeView(ViewNumber);

You can use text parsers for text commands, although I've never actually used them

Good luck and have fun :)
Title: Re: Help with driving mechanics
Post by: Crimson Wizard on Sat 13/10/2012 17:09:32
Binsk, when someone asks a question like you did, it is clearly visible that a person just started to learn the engine. It's OK, but here's one advice I believe I should give: try to get a picture of how the AGS works and what things it may do first; perhaps do some tutorials, or - even better - test games.
The problem is that the simple and quick answer on your main question here won't give you enough information and therefore won't help you, while the detailed answer will make you too confused... and also won't help you :).
Such things are learnt step by step. Perhaps you will find answers on those and many other questions while doing that.
It is also a good idea to tell how much knowledge you have about engine. Here I made certain assumptions - but they could be incorrect (in which case I apologize).

Thing is, there are hungreds of ways to do what you asked. Someone may tell you one way, but later you may find it's not precisely what you wanted. It may help to write down a plan, some kind of design document, where you describe how exactly do you want your game to look and behave during "driving sequence" (or anything else you want to make).

Regarding other questions - in addition to what geork said I'll give few links to the AGS Wiki (also refer to your manual!):
Setting player character:
http://www.adventuregamestudio.co.uk/wiki/?title=Character_functions_and_properties#Character.SetAsPlayer
Changing view:
http://www.adventuregamestudio.co.uk/wiki/?title=Character_functions_and_properties#Character.ChangeView
Text parser:
http://www.adventuregamestudio.co.uk/wiki/?title=Other_features_(manual)#The_text_parser