Main Menu
  • Welcome to The RPG Maker Resource Kit.

a level block event?

Started by dark12345, April 11, 2006, 11:05:55 PM

0 Members and 1 Guest are viewing this topic.

dark12345

hi , im my game i have diffrent areas coming off one town, though there noway knowing the level on the mobs in that area (unless u read teh sign which some people wont) are strong or weak, what i want to do is block u from going to that area if your, say under lvl 20...please help

Blizzard

Use on the teleport event a conditional branch and choose "average party level" as a condition. If it
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

dark12345

erm it dont work like that.. knew craditional branchs and all that, but when i tried it enyway the party section dosent have a level limit

Blizzard

Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Anaryu

The other way would be to make a "Script..." event and paste this into it:

i = 0
average_level = 0
while $game_party.actors != nil
  temp = $game_party.actors.level
  average_level += temp
  i += 1
end
$game_variables[var_num] = average_level / i


Where the "var_num" is the number of the Variable you want to have that value. So if you wanted the average party level to go into variable #20, change var_num to 20 so it reads:
$game_variables[20] = average_level / i

You can add a script event on the last of the event pages.

I'd have fit a few of those lines together, but the script box doesn't let you put long lines in, and breaks the code apart when you put long ones in, causing either errors or VERY weird effects. :)

That script will put the average level of all current party members (only those in your party) into a variable which you can use. It's a bit less work than writing up a ton of cond. branches, especially if you have a lot of different characters in your game. It also grows, so that if you add more characters you won't need to update it.