Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Game Creation
»
Requests
»
Tutorials
»
Custom Run-Into-Enemies script
« previous
next »
Print
Pages: [
1
]
Author
Topic: Custom Run-Into-Enemies script (Read 2549 times)
Meiscool-2
Sage
Posts: 7,030
If you support n00bs, you support communism.
Custom Run-Into-Enemies script
«
on:
November 15, 2005, 11:44:01 PM »
This is a very short and basic script that allows you do to a lot more things before a deflaut battle system battle starts, (in other words, this lets you change things in the DBS before entering battle)
Here's how it works. You will need 5 varibles, two will be the hero X, two will be the Y, and one will be for randomizing if you will or will not run into enemies.
First, make a parrelle event on the map. It should look like this:
Wait 0.0
Hero X set to Hero X Cord
HeroY set to Hero Y Cord
2Hero X set to Hero X Cord
2HeroY set to Hero Y Cord
*These varibles are made to track your hero. If you move, the varible will remain the same, but your X and Y will not. Should that happen, then a random battle might happen.*
wait 0.1
*This wait is set here to have some time between the varible settings. Basically, as said before, if the varible of either X or Y is different from your hero's X/Y after .1 second, then a random battle might happen. You MUST have this wait time put in.*
2Hero X set to Hero X Cord
2HeroY set to Hero Y Cord
Branch: If Hero Y is not equal to 2Hero Y
set random battle varible to random number between 1-20
If random battle varilbe = 20 (20 is just an example. Whatever number you want to put here you can. If you want a 1 in 25 chance of getting into a battle every step, then switch it to 25), a battle happens.
random battle set to random number between 1- (make this number the ammount of enemy combinations you have)
*Put system change and randomize which monsters you fight and etc here* Example: If random battle = 1, you fight a bear. If it equals 2, you fight a bear and two dragons. etc*
jump to lable 1
End Branch
End Branch
Branch: If Hero X is not equal to 2Hero X
set random battle varible to random number between 1-20
If random battle varilbe = 20, a battle happens.
random battle set to random number between 1- (make this number the ammount of enemy combinations you have)
*Put system change and randomize which monsters you fight and etc here*
jump to lable 1
End Branch
End Branch
Lable 1
That's pretty much it. Now, as to the *do this here* things. Before a battle, you can set several things. You can change the systems to have different colors in the battle then what you would normally have outside of battle. You can add animations when entering the battle to this way, instead of just having the screen fade. You can even make items that lessin/increase the chances of running into enemies simply by putting condicions before the random number chooser. By doing this, several things can be achieved.
Ending product should look something like what's below. Bear in mind this has nothing added to it, be several things can be done to make battles change. I know it's small, so just right click on it and copy it's URL, then look at it that way.
http://i26.photobucket.com/albums/c105/Meiscool2/CBS.png
Logged
Most Recent:
________________________
Old Stuff:
WarxePB
Action Sue
Royal
Posts: 3,601
What killed the dinosaurs?
(No subject)
«
Reply #1 on:
November 16, 2005, 12:25:13 AM »
Eh. The concept is cool, but the tutorial is way too vague - it barely explains anything. In the future, maybe you should try to explain each step a bit more.
Logged
Blog:
The Gigaverse
Twitter:
Initial Chaos
Leon_1990
Exemplar
Posts: 1,408
(No subject)
«
Reply #2 on:
November 16, 2005, 05:14:36 PM »
hmm...
I agree with warxe, but the tut isnt that bad...
There isnt much of a need for variabales though :S
a simple "touch hero" event should do
Logged
Meiscool-2
Sage
Posts: 7,030
If you support n00bs, you support communism.
(No subject)
«
Reply #3 on:
November 16, 2005, 08:14:17 PM »
War: Ok, I'll get to working on fixing it to make explain more.
Leon: Prehaps you misunderstood. This isn't like the battle systems where you walk up to an enemy and fight, it's like FF or dragon warrior. And, if you ment making events that you step on to trigger battles, that wouldn't work as well because in narrow halls and etc, battles would only happen where the event tends to get stuck at. Both ways would work, just this way has less bugs and requires less events on a map. Aside from that, it takes less work, and only takes three varibles.
Logged
Most Recent:
________________________
Old Stuff:
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
Tutorials
»
Custom Run-Into-Enemies script