I need some help on a buy function and dialog

Started by Dailydrifter, Sun 07/09/2008 15:49:38

Previous topic - Next topic

Dailydrifter

Hey guys,

I need some help from you that have a tad more experience than i have.

[bold]
Background for the game:
[/bold]

I started making an adventure-game for my GF 14 hours ago, and ive made quite a lot of content.

The game is called "Millas Verden" (Millas World) and is based on her life situation.
I have a lot of pictures from her hometown and from the people around her, now we are moving so i thought i make a game so she can re-live a day from her previous situation.

In the game, the character which im almost done with (mixture of animation and face picture) will enter different places and will have to pick up different objects that can be used on her way to a vacation. (plane tickets, wallet, food, money, buy perfume from duty free shop, cigarettes etc.)

I have come so far:

- The pickup function and add to inventory works. (with a message that appears that describes what she found)
- The scenery is done with hotspots, walkable zones, walkbehinds etc.
- The character/animation is done
- The plot/goal is planned
- The game is functional, but lacks interactive possibilites


[bold]
The actual questions:
[/bold]

1. using money to buy things:

In one scene, she will have to pay for a cab-ride to the airport. Does anyone have a code for using an inventory (money) and use it on the cab to make him drive her to the airport? (the cab ride should be impossible, until money is found)
I would then use the same code to pay for things at the duty free shop, buy food on the way etc.

2. Make an animation of a moving object:

-The cab drives on the freeway

-The plane taking off, flying and landing.

(nothing complicated, only a static object, with a scenery consisting of a couple of frames that loops a couple of times.

I tried searching for it and reading the faq, but i didnt find what i was looking for, if anyone has the time to help me it would be much appriciated!!

3. Even after reading similar threads, i could not understand this about the dialogs:

Can i make i dialog with a static object, not a character?
how would the script look like? i have a scene from a kebab-shop where theres a guy behind the desk. He should present a menu after the "greeting" and she can choose what to buy, i have 3 objects that are hidden. When she chooses kebab, the `oKebab` should appear so she can pick it up. How do you solve the money-trade-for-object in this situation?

Best regards to all of you from Leo

Dualnames

Quote from: Dailydrifter on Sun 07/09/2008 15:49:38
1. using money to buy things:

In one scene, she will have to pay for a cab-ride to the airport. Does anyone have a code for using an inventory (money) and use it on the cab to make him drive her to the airport? (the cab ride should be impossible, until money is found)
I would then use the same code to pay for things at the duty free shop, buy food on the way etc.

2. Make an animation of a moving object:

-The cab drives on the freeway

-The plane taking off, flying and landing.

(nothing complicated, only a static object, with a scenery consisting of a couple of frames that loops a couple of times.

I tried searching for it and reading the faq, but i didnt find what i was looking for, if anyone has the time to help me it would be much appriciated!!

3. Even after reading similar threads, i could not understand this about the dialogs:

Can i make i dialog with a static object, not a character?
how would the script look like? i have a scene from a kebab-shop where theres a guy behind the desk. He should present a menu after the "greeting" and she can choose what to buy, i have 3 objects that are hidden. When she chooses kebab, the `oKebab` should appear so she can pick it up. How do you solve the money-trade-for-object in this situation?

Best regards to all of you from Leo

Answering:
1.Go to cab(as an object or hotspot that you would have created) interactions and select use inventory on section then put this:
if (player.ActiveInventory==imoney) {
//do stuff//
player.LoseInventory(imoney);
return;
}
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

FalseHope

For conservations with objects, that will be hard. You have to make a character, ensuring it's image is the object, and place its starting room and starting position correctly. Then you can make a dialog using the      object(character)'s name and the player's name.

For the buying of kebab, after the guy says (example) "Here's your kebab." (You may want to add a "Narrator : He passes you a kebab wrapped in paper." to tell the player that the guy gave the player a kebab.) After the " Guy : Here's your kebab." add a "add-inv(x)" where x is the number of iKebab. I don't know about making objects visible in dialogs. So sorry.

Khris

It's possible to call "normal" code from within Dialog scripts using run-script X and dialog_request().
If you want to handle a variable amount of money instead of a single money InvItem, look into variables.

Talking to an object is possible, but having a dialog with an object is not. You'll have to use an accordingly placed invisible character as a substitute.

SMF spam blocked by CleanTalk