Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Battle Event Problem

I've used switches and variables to create a quest system, even managing to use a common event to allow the player to check which quests are currently taken and the progress of each one, so I guess i'm learning!
  :lol:
Alas, i've stumbled across a problem that I haven't been able to solve myself. See, one of the basic quests involves killing 10 bees, and so i've set battle events in every troop containing the 'bee' monster to run whenever the required switch is on (activated by starting the quest) and whenever the bee's Hp drops to 0% the quest's variable will be increased by 1. When this occurs, a message appears on the screen showing how many bees have been slain out of the 10 required by looking up and displaying the variable count. This works great so long as the bee in question isn't the last monster on the battle screen. The message shows up and the variable is increased accordingly. However... if the bee is the last monster left alive (or the only monster in a troop) then it seems that since there are no more monsters to fight, the battle immediately ends and doesn't allow time for the battle event to process. It doesn't show the message or increase the variable.
:shock:
So if anyone has any ideas or solutions for amending this problem, i'd love to hear them! If it's not possible, then i'll just modify the quest and have the player do something that is acheivable.

Thanks for reading!
 
Bump (since it's been a few days :shock:)
So either no-one who's read this so far knows how to fix the problem, or I just totally confused everyone with my wording  :lol:

Just in case, here's a screenie of the battle event below. And if the answer is: "There's no way to amend this other than editing the main battle script..." then it's okay! I won't bite you I promise, and I'd rather hear that than nothing at all. Thanks for reading anyways!
:blush:

http://i216.photobucket.com/albums/cc212/darkstorne/BattleEvent.jpg[/img]
 

jimoen

Member

Could you possibly use variables instead (eg: every bee you kill gives you 1 more to the var of bee)?
and once the var of bee is = to (your quest requirement) it activates the quests switch.
If that sounds to complicated just look at this:
http://i374.photobucket.com/albums/oo186/jimoen/Npc1.jpg[/img]http://i374.photobucket.com/albums/oo186/jimoen/Npc2.jpg[/img]http://i374.photobucket.com/albums/oo186/jimoen/Npc3.jpg[/img]http://i374.photobucket.com/albums/oo186/jimoen/Bee1.jpg[/img]http://i374.photobucket.com/albums/oo186/jimoen/Bee2.jpg[/img]
If you do that then all you have to do is add your own HUD somewhere that tells you how many you have killed out of the requirement. (6/10 bees killed)
Btw I'm fairly new to forums & scripting & pretty much everything, & i teach myself the scripting/eventing stuff so i probably do it way different to everyone else but i Hope it works out for ya!
 
Yeah that's pretty much exactly what i'm already doing! Only differences I can see between my version and your example, is that mine uses a random encounter, and that your example adds +1 to the variable whenever a bee appears, rather than whenever a bee is killed. If I did it that way then the player could just run from all the battles and still have his variable count increased to 10 without killing a single bee.
:sad:
Shame, but I think the only way to get this to work would be to tweak the main Ruby script to allow battle events (should they be relevant) to process at the end of a battle, before ending the battle itself. Surprises me that they would include the "0%" Hp option in a battle event, if the scripting won't allow it to function in the first place.

Thanks for the reply anyways Jimoen. Glad to see that it's not me being a fool since we both came up with a similar way to script this! Guess I'll just have to change the quest itself. 'Monster Killing' objectives seem impossible to run.
 
You can always make a specific map for the quest or create an event that would activate the quest's special spawning. This way, you could control whenever a bee spawns and make the kill counter work.

If you can't figure how to do this just reply and I'll help you out.
 

jimoen

Member

I'm pretty sure that you can do it the way i did in my example, just change it so that it adds 1 after it's killed
(killing a bee activates a switch to add 1 to the var of bee)
If you can't do it this way then we are obviously not smart enough to work this out (lol XD)
Sorry i couldn't help you any further.
 
EDIT: Finally found a way to make this work! Created an event than runs in parallel processing once you enter the map: diables the chance for random encounters, and 'simulates' random encounters instead using Battle Processing and Wait commands. The option to escape from a battle had to removed, but that can't be helped it seems. At least this way you actually have to kill the bees for the variable increase to take effect (the only other option is to die :lol:). Once i've simulated enough battles, the event ends and normal map encounters are enabled again.

Thanks very much for your input, Jimoen and Pete. Finally got there with your help and thought-provoking ideas. Phew, glad that one's over!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top