PDA

View Full Version : Help with script branching and variables


Whataface2
12-17-2007, 10:07 PM
I'm trying to make a script that would allow the player to trade one item for another.

I know how to use a script branch with my own variable. What I can't figure out is how to set up a script branch that would only activate when the player had a certain item.

The other question I have is how do you use the button variable.

I would like to have it so the player would push a button and the NPC Say would you like to trade that apple for my pear?

Manji
12-18-2007, 01:49 PM
I'm trying to make a script that would allow the player to trade one item for another.

I know how to use a script branch with my own variable. What I can't figure out is how to set up a script branch that would only activate when the player had a certain item.

well... hm. im not sure if you can make a script branch condition like that (i turned on my game and messed around a bit, but all i could find was the internal variables involving item possession, #117 and around there), but one way is to add a second page in your event. there is a specific option to set an activating condition to the player possessing a certain item.

Whataface2
12-18-2007, 10:46 PM
Thanks I'll have to give it a try later. Work is crazy right now.

It is done by selecting item in the condition section of the event, right?

Manji
12-19-2007, 01:01 AM
yep. thats it.

Ωbright
12-19-2007, 12:40 PM
duh.

[wrong forum]

Hikari no Kaze
12-19-2007, 07:37 PM
If this is in the correct forum, then couldn't you just make the item non-droppable/sellable and change a flag when the player aquires the item?

Ωbright
12-19-2007, 07:55 PM
D'OHH!! I'm stupid. Sorry, wrong forum. :red

Whataface2
12-19-2007, 10:25 PM
If this is in the correct forum, then couldn't you just make the item non-droppable/sellable and change a flag when the player aquires the item?

I never thought of doing that. I'll have to give it a try.

D'OHH!! I'm stupid. Sorry, wrong forum. :red

Sorry, if I posted this in the wrong forum. I thought this was were you posted if you needed help with something in your game.

Ωbright
12-19-2007, 10:44 PM
Sorry, if I posted this in the wrong forum. I thought this was were you posted if you needed help with something in your game.

You're fine, I was the one who goofed.

Whataface2
12-20-2007, 10:24 PM
You're fine, I was the one who goofed.

cool

Thanks for all of your help. I finally got the event to work. I decided to set it as a talk event rather then a button push. I decided to use a variable to work the event. This way I can add different items to trade later on.