Post new topic    
Page «  1, 2, 3
Metal Slime
Send private message
 
 PostMon Jan 12, 2015 4:41 am
Send private message Reply with quote
You could also make 'false' attacks that are just captions for "___ swings at the enemy!" or whatever, and then chain the actual attack to that caption-only starter attack. Just to get more of that narrative feel of DQ/Earthbound style battles.
Slime Knight
Send private message
 
 PostMon Jan 12, 2015 9:00 am
Send private message Reply with quote
Yeah I thought of that too and I think I'm just gonna take it the easy way
Slime Knight
Send private message
 
 PostWed Feb 25, 2015 5:38 pm
Send private message Reply with quote
It's been a long time since I last posted something in this thread! but here's my question: How can I program an NPC that can be used like the enemys in Earthbound. like if you touch them a battle starts. But the main thing is, that I want just one NPC for one battle formation, so I don't have to make thousands of NPCs just to fill a map with the same Enemy. I hope you get the problem. Also, is it possible to recreate that thing that if an enemy approaches you from behind it attacks first? (and the same thing reaversed too?)
Liquid Metal King Slime
Send private message
 
 PostWed Feb 25, 2015 5:57 pm
Send private message Reply with quote
This can all be done, but requires scripting, that varies from the easy to the advanced, depending on what you want to do.

Here is a script that triggers a battle with an enemy when you touch an NPC with "touch" activation. The battle formation number needs to be put in the NPC's "script argument"

Code:

plotscript, wandering enemy npc action, formation, ref, begin
  if(fight formation(formation)) then(
    # Battle ended in victory
    destroy npc(ref)
  )else(
    # Player ran away from battle
  )
end


This script assumes that you want the NPCs to vanish after victory, but to re-appear if you leave the map and then come back later.


As for letting the enemies attack first when it approaches from behind, that gets a lot more complicated. Detecting which direction the enemy approached you from isn't so hard, all you need to do is use the "hero direction" command, and check the hero and NPC x/y values accordingy, but the hard part is changing the battle so the enemy attacks first. You might need two versions of every enemy, or you might have to use commands to alter the enemy stats before the battle begins.
Metal Slime
Send private message
 
 PostWed Feb 25, 2015 7:07 pm
Send private message Reply with quote
Another possibility:
Use a tag to decide if the enemy is supposed to attack first or not. Then have every formation include a special invisible enemy with huge speed, with an attack that chains to mimic a 'first round' of attacks from the enemies in that formation, then kills itself. But the chain only occurs if the tag is on. Otherwise, the invisible enemy can just kill itself right away.

Or maybe the invisible enemy can just hit all the other enemies with a spread attack using a special element designed to force a counter attack simulating their 'first round' of attacks?
I am Srime
Slime Knight
Send private message
 
 PostThu Feb 26, 2015 6:44 am
Send private message Reply with quote
Thanks for the answers! But, James, do all the NPCs from this type vanish or just one at a time? 'Cause it's my main problem, that if I just activate "only usable once" that every enemy of that type just disappears after I battled him.
Liquid Metal King Slime
Send private message
 
 PostThu Feb 26, 2015 3:15 pm
Send private message Reply with quote
The "destory npc" command only destorys a single copy of the NPC. The "ref" argument to the script is automatically filled with the reference for the specific copy you touched.

So this should work much better than the "usable only once" tag
Slime Knight
Send private message
 
 PostThu Feb 26, 2015 3:43 pm
Send private message Reply with quote
Ok! Thanks. And what about a little animation before the battle begins? Like in Pokemon or something. Also, Can I change the graphics of the Health bars inside the battles?
Liquid Metal King Slime
Send private message
 
 PostThu Feb 26, 2015 4:38 pm
Send private message Reply with quote
Froginator wrote:
Ok! Thanks. And what about a little animation before the battle begins? Like in Pokemon or something. Also, Can I change the graphics of the Health bars inside the battles?


It has been so long since I played Pokemon, I don't remember how the battles start. Maybe?

Your options for customizing the battles are pretty limited. You can change the color of the health bar, but that is about it.

I have a plan for making battle layout more customizable, but it will probably be a long time before it is ready.
Display posts from previous:
Page «  1, 2, 3