some problems

Started by viktor, Fri 21/05/2004 08:33:11

Previous topic - Next topic

viktor

This is sorta complicated to explain.
I have a character and two items. When you use the two items on him there's a diferent reaction for both. But I want to have a third reaction when both were used.
Can I do this without scripting?
And if i can hhow do I do it?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

HillBilly

Use varibles(look up in manual).

Alynn

How do you propose to use 2 items at once as it is only possible (someone correct me otherwise) to have one in use at a time with player.activeinv.

If you want the two items to combine, you need to do a inventory used on inventory, and in the script remove the first two items and place the third "combined" inventory item in the inventory, then when that item is used on teh chararacter he says the third thing...

IE if your 3 inventory items are BALL BAT, and BALLANDBAT for your character interaction you under inventory item used place this code (or similar)

if (player.activeinv == BALL) DisplaySpeech(EGO, "It's a ball.");
else if (player.activeinv == BAT) DisplaySpeech(EGO, "It's a bat.");
else (player.activeinv == BALLANDBAT) DisplaySpeech(EGO, "LET'S GO PLAY BASEBALL!!!");

meh... hopefully you get the idea.

viktor

Quote from: Alynn on Fri 21/05/2004 10:00:33
How do you propose to use 2 items at once as it is only possible (someone correct me otherwise) to have one in use at a time with player.activeinv.

If you want the two items to combine, you need to do a inventory used on inventory, and in the script remove the first two items and place the third "combined" inventory item in the inventory, then when that item is used on teh chararacter he says the third thing...

IE if your 3 inventory items are BALL BAT, and BALLANDBAT for your character interaction you under inventory item used place this code (or similar)

if (player.activeinv == BALL) DisplaySpeech(EGO, "It's a ball.");
else if (player.activeinv == BAT) DisplaySpeech(EGO, "It's a bat.");
else (player.activeinv == BALLANDBAT) DisplaySpeech(EGO, "LET'S GO PLAY BASEBALL!!!");

meh... hopefully you get the idea.
NO NO. You misunderstood.
I have two items whic are used seperate. Each couses a diferent reaction. But after both were used on the characz+ter a cutseen is supose to start. I don't know how to do THAT
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Gilbert

I think what he meaned was that if one was used already, it will act differently when the 2nd is used.
But yeah, you can do it without scripting, just use the variables in the interaction menu.

Something like this (I just typed this quickly for you to get the idea):


where I supposed the two items A and B, are #5 and #10, respectively (you may change them to match your settings), "A Used" and "B Used" are two global variables set initially to 0. The "no action"s are places where you add different responses.

What the above basically did was to set a variable to 1 after an item was used, when you use the other item it'll check whether the first item was used and acts differently.

viktor

how do you se that  "A used" thing in the variables. When I open the interactions menu i don't see any function to set that
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Gilbert

When you set an interaction response that takes a variable parameter (eg. "Conditional - if a variable is set to a certain value"), there is a "Change" button for you to select the variable, click it, click "Edit Variables...", and create new variables by clicking on "New variable...".

viktor

I don't get it. I copied it and it stil doesn't work. Maybee I did something wrong. But would you please check if there is ewerithing OK with the menu that you gave me.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

viktor

OK I got it. Thanks
But don't think I'm finished with the questions.
I'm gona be back count on it. Since I said the game is gona be relesed in about a week...  ;D
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

viktor

NOW THIS IS THE PROBLEM.
remember this:
http://www.agsforums.com/yabb/index.php?topic=14105.0

I have a completly new problem now. This is what has to hapen. I have a pay chequ and a newspaper. The player has to give the person the paycheque first and then the newspaper. When he gives the newspaper to the person a dialog is supose to run and the person gives the player an object. Till now everithing worked. But when I set another action ( Give character new object) the two comands become mixed up. What do I have to do?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

..

Can you post exactly what uve done?

Do you mean Youre supposed to talk to some1 and then they give you an object at the end of the dialog?

If so use addinventory X opr wateva it is in the dialog script when the conversation has finsihed.

viktor

I did the same as here:



But I aded the give character an object comand at the wery end. But now the two comands get mixed up. Item number 10 is a newspaper and item nmber 5 a letter. I want the player to give first the newspaper and then the letter. When he gives him the letter he recive for example a book. Where do I place the recive object comand?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

..

What do you mean they get mixed up? Do you mean he gets them both at the same time?

Do you want something like this

Man : Here have this
*Player gets inventory*
Man: oh, and take this
*player gets inventory*

??

i still dont know hoe I can help you without seing exactly what uve done

viktor

it's like you said. First he has to get the newspaper and then the envalope. But when I add  the give player item comand i can't give the newspaper first. That's what I ment by get mixed up. If I add that comand you have to give the envalope so you can give the newspaper.
To explain what I want:
The character give a newspaper to a person. Nothing else hapenes.
Then the player gives the person the letter. The person gives the character a book. The letter can't be given before the newspaper.

I hope you understand what I want to say.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

..

In Conditional - If a Variable is set to a certain value (A USED,1)

Add the Give player an inventory item there.

Is that what you want?

viktor

Quote from: Scuthbert on Sat 22/05/2004 18:29:30
In Conditional - If a Variable is set to a certain value (A USED,1)

Add the Give player an inventory item there.

Is that what you want?
I did that. But insted of being able to to give the newspaper first. I have to give the letter first. Why. Culd someone make me this comand from scratch. And in every action there has to be a run dialog option and a give character inventory item.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Scorpiorus

Well, then place it to In Conditional - If a Variable is set to a certain value (B USED,1)

viktor

but then I'll get the item when I give the newspaper but I don't want that. I want to recive the item when the character give both items and the second item is the letter.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

viktor

I found out what the problem was.
The wariables were set wrong...
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

SMF spam blocked by CleanTalk