Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: Iceimp on June 21, 2008, 04:16:41 PM
-
Ive been trying to make my character change class by the use of a spell
I went to common events and used Trigger Auto start
<>Branch if Chad Transform Wolf Skill Usable
<>Change Class: Chad Wolf, No Level Change, Delete Old Skills, Add New, No Stat Change
<>
: Else Handler
<>Change Class: Chad Wolf, No Level Change, Delete Old Skills, Add New, No Stat Change
<>
: End
<>
Am i doing it right or is there another way?
-
XP
VX
2k3
2k?
I need to know which one
b4 I can help
-
You're not doing it right.
If a skill is 'usable' it means you are able to use it, not that you have used it. With that coding, he'd transform once he learns the skill... Or as soon as he enters battle. I'm not sure.
I can't actually think of a good way to do this, if you're using rm2k3. Unless... You might be able to make it work by following these (hopefully understandable) instructions.
1. Make the transform skill take an amount of MP that none of his other skills take. For the purposes of this explanation I'll make it 7.
2. Put a page in every monster group which links to a common event every turn (it's good to have this 'every battle turn' common event as it's useful for all sorts of things). Basically, the page in every battle group just has the condition 'turns taken 1x +0' and the page just says 'call common event: battle turns'. Just copy that onto every monster group.
3. Make two variables: MP BEFORE and MP AFTER.
4. Make an event at the very beginning of the game which sets the variable MP BEFORE to the amount of his current MP.
5. In the common event 'battle turns', it'll go something like this:
-Set variable: MP AFTER to the current amount of Chad's MP
-Variable operations: Minus MP AFTER from MP BEFORE
-Conditional branch: MP BEFORE=7
~Change class: Chad to wolf class
No else handler
-Set variable: MP BEFORE to the current amount of Chad's MP
The common event 'battle turns' will be a 'call' event. Bear in mind that if his class changes in battle, his battlecharset doesn't change until afterwards. there's a few ways to get around it but they require you to sacrifice some professionalism in order to do so. His skills and everything will change though.
And I think.... That should work. Maybe. If you want him to de-transform after battle, you'll just have to make another common event that's a parallel event that changes his class bach to normal. That event will only run outside of battle.