NPC Battle Activation

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
yoelleoy
Red Slime
Posts: 28
Joined: Sun Jan 25, 2015 2:30 pm

NPC Battle Activation

Post by yoelleoy »

I am trying to make a script where after talking to an NPC a fight will start but I can't find anything in the plotscripting dictionary to help me and I have no idea how to make it :(
Last edited by yoelleoy on Tue Apr 28, 2015 1:19 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

To start a battle from a script, use the fight formation command.

However, you don't need a script to start a battle after a textbox: there's a textbox conditional to do that. Go to the Edit Conditional submenu and look for the BATTLE section. The battle is triggered after the box is advanced but before the next textbox.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

This is actually easier to do with text boxes than with a script.

When you talk to the NPC, a text box will be displayed.

In the text box editor, look at the "Edit Conditionals" menu

Look for "BATTLE:" and change it to "Always do the following" and then choose the battle formation number

<img src="https://i.imgur.com/zTvHboN.png">

This is the same method that allows you to add/remove heroes without scripting, gain items or money without scripting, or manipulate tags to make NPCs disappear and appear without scripting.
User avatar
yoelleoy
Red Slime
Posts: 28
Joined: Sun Jan 25, 2015 2:30 pm

Post by yoelleoy »

Thanks a lot :o I kinda feels stupid for not seeing that BATTLE option now :zombie:
Post Reply