raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on May 8, 2008 8:38:23 GMT -5
I'm having a weird merchant script problem.
I have a script where a merchant list appears, but unless you sell a certain item a battle will occur.
But when the list appears the battle occurs before I even have a chance to buy, sell, or do anything.
Apply together is NOT on, and yet content that occurs after the input merchant script command is used is being applied.
So I tried adding a text message before the battle and after the merchant script. Oddly enough the message doesn't occur at all.
The battle was also very strange in that the merchant list was going at the same time. You would see the merchant text at the bottom and have the who list, sell list, etc up. When you chose anything the choice would apply both to the merchant script and the battle.
There seems to be a bug between merchant scripts and battles. I know you cant call a merchant script to appear during a battle.
Anyway, I need some way of stopping the rest of the script from going until I exit out of the merchant screen.
|
|
|
Post by Dungeon Warden on May 8, 2008 9:39:56 GMT -5
Weird, I've never heard of this happening before.
The Merchant Script needs to be inside the Merchant List command in order to work, but where is the Battle command? I would think it would have to be called from the Merchant script when the script checks to see if the player is selling the specific item.
Since the party must sell a specific item, wouldn't it be easier to just write a script that asks the party to sell the item and starts a battle if they won't?
Your method would make more sense if the party was attacked if they tried to sell a specific item and would act normally otherwise.
Without seeing the actual script (or at least a striped down version of it) it's hard to figure out that you're doing wrong.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on May 8, 2008 10:28:35 GMT -5
No, event battle is after the merchant script, its setup correctly.
I wasn't being entirely honest above, or rather I didnt elaborate. I didn't want to confuse things more then they needed to be.
The script is actually a treasure chest and uses merchant list at the end which is the chest options menu which has its own merchant script. Its a merchant script because if you change item number after showing the buy list and before buying the item you can have it buy any item you designate.
It looks like this:
Take Treasure - If locked attempts to bash which might destroy item. Give Treasure - opens the sell menu, you give one away and dont get a treasure. Destroy Chest - used when the chest is blocking your way. Nothing - If locked, this lets you come back later.
When the chest turns out to be a gremlin chest - give treasure may be used to avoid having to fight it.
The options above are actual items in the buy list, but the list repeats if you try to increase the quantity.
Anyway, I have resolved this problem by applying the wait for script to end command, which waits for all called scripts to end. I always used apply in order after apply together so I forget this command even existed.
But yeah, if you make an event battle after a merchant list you'll wind up fighting monsters and buying items at the same time. Too bad it doesn't work with random battles.
|
|
|
Post by Doan the Nado on May 9, 2008 2:11:33 GMT -5
But yeah, if you make an event battle after a merchant list you'll wind up fighting monsters and buying items at the same time. Too bad it doesn't work with random battles. This seems like an interesting effect, one that might be able to be exploited to be useful. Isn't there an Enter Battle script or something else that is called immediately before entering battle? What happens if you use a merchant list there?
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on May 9, 2008 2:37:11 GMT -5
Yeah, I tried all those places, no luck.
I was thinking I could use a repeating merchant script in battle that goes on when steal item is used, as this would allow buy item to buy any item designated by the item variable. My current stealing system steals 1 item per battle and examines it after the battle. The item is determined by each enemies battle variable 9.
In some maps I have enter battle teleport you to where your standing as this is the only thing that stops a battle once its about to start. Then I sort a list of event battles from an enter script. This lets you set up specific enemies for specific dungeons without having to make a unit placement every time.
|
|
|
Post by Dungeon Warden on May 9, 2008 10:01:03 GMT -5
In some maps I have enter battle teleport you to where your standing as this is the only thing that stops a battle once its about to start. Then I sort a list of event battles from an enter script. This lets you set up specific enemies for specific dungeons without having to make a unit placement every time. I'm not sure why you'd want to do this, but whatever works for you. Ah yes, the"Wait for Script to End" command. I hadn't thought of that. Good thinking. I'm glad you got it working.
|
|