• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do I create this system...

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2009
Messages
1,067
Hey, again guys. I need a system that will allow it so that I will engage in a random battle (Like in old RPGs FF 7 and the like) every time I move, which for me is with the arrow keys in this map. I'm not sure if
  • Battle Encounter System
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
      • Player - Player 1 (Red) Presses the Down Arrow key
will quite work for this, since you don't continually press the key over and over to move...

Here's what I am looking for. I am just not quite sure how to go about doing this, not exactly, but kind of like this with a 30% chance of encountering fights:

Action
A random "Roll" of 1-100
If
The number rolled is <=30 == True
Then
Set the stuff I need to for my battle system
Trigger - Run BattleOn bla bla...
Else
Reroll.

Any help is greatly appreciated, as I can't help but feel this is a simple brain fart on my part, since I feel I should be able to recreate this simple thing, since I just can't seem to find a way to "roll" the results.

EDIT: This is the result:

  • Battle
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
      • Player - Player 1 (Red) Presses the Down Arrow key
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (<=) 30
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Set RBB_AreaSelect = 1
          • Set RBB_MobNumbers[1] = 1
          • -------- Set 50 variables, etc., etc... --------
          • Trigger - Run BattleOn <gen> (checking conditions)
        • Else - Actions
I hope this works. If anyone sees an issue here, please let me know...
 
Last edited:
Level 5
Joined
Sep 15, 2010
Messages
156
Well for the first part, we could just have it for when a unit enters or exits a certain region. That way the battle could be tailored to a specific region.

And for the roll... would Random integers work?
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Tell me that in PMs Ikithe! D:<

lol, although that region thing is a good idea, I like that. Or it could even work in everywhere BUT certain regions too, right? That way I don't have to make a giant region to cover the whole map, as that's annoying to work with.
 
Level 5
Joined
Sep 15, 2010
Messages
156
I believe a theres a trigger somethin' like this:

A units enters a region.

We should be able to do:

A unit enters a region
Conditions: Region being entered is RegionA or RegionB.

So if you want a certain species of wolf to attack you that only exists in a certain area, you could do this to make it be more than 1 region.

And I think you could do it in everywhere BUT a certain region. I'd have to check.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
yeah that would work for the region thing

now i just need the rolling for this and it'll work i think.
 
Level 5
Joined
Sep 15, 2010
Messages
156
Go into Actions.
Now go into General.
Pick If / Then / Else (Multiple actions may be better.)
Click on the condition in If Condition
Now go into Integer Comparison
And then find Math - Random Number

Just set your integer numbers, and I think you can take it from there.
 
Status
Not open for further replies.
Top