The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Astrojazz on July 10, 2007, 06:38:48 PM

Title: Class Branch Script
Post by: Astrojazz on July 10, 2007, 06:38:48 PM
Would it be possible to make a script where, say a fighter has just reached level 10, so he can choose a direction to advance, such as becoming a lancer or a peltast?

EG:
                                                                 Fighter
                                                  __________|________
                                                 |                                     |
                                            Lancer                            Peltast

Thanks for the help!
Title: Re: Class Branch Script
Post by: kathis on July 11, 2007, 09:11:43 AM
I would think an event would be easier....

have a variable set for each hero's level

common event Parallel condition switch one  (since when are you not going to use goble switch one by the time they reach level 10?)

condition fork 
If variable [1 Hero1 level] = 10
if switch [1 Hero chosen first class up] is off
show message 
\n[1] can now
choose to become a Lancer
or a Peltast Which will you choose?

show choices [1 lancer]
change hero class to lancer (page 3 second from the bottom left)
show message:
\n[1] is now a lancer!

[2 Peltast]
change hero class to Peltast (page 3 second from the bottom left)
show message:
\n[1] is now a Peltast!


[3 remaind fighter]
show message:
very well but remember to go
to the hero's guild if you change
your mind.

end
change switch [1 Hero chosen first class up] on
end




and tada there you go 


hope that helps... I mean

you were assisted by professor Kathis
Title: Re: Class Branch Script
Post by: Astrojazz on July 11, 2007, 07:05:12 PM
I'm still a little confused, because I'm not sure how to work variables and stuff, but whats with the (page 3 second to left) thing? Is that a command, or a reference?
Title: Re: Class Branch Script
Post by: kathis on July 11, 2007, 07:40:05 PM
reference. and I would advice you learn how to use events a little more before you explore script. mostly because a lot of things can be done by events also. they might be a little harder to work with but its far more easier to understand where the problem could be rather than looking at scripts and not knowing anything about the commands. At least events are a bit user friendly.
Title: Re: Class Branch Script
Post by: Astrojazz on July 12, 2007, 05:30:32 AM
Alright, I'll try with events, but where do I put the actual event marker? Or does it not need one?
Title: Re: Class Branch Script
Post by: kathis on July 12, 2007, 05:35:12 AM
Event maker?.....uhh ooook....


Make that a common event...set the varibles also as its own common event...so its always checking
Title: Re: Class Branch Script
Post by: Astrojazz on July 12, 2007, 11:45:10 PM
Alright, thanks for the help! Its finally working!