Could someone make me a Conditional Branch Script: If hero 001 class is 003
Please
a little more specific? and if you want a certain conditional branch youll need events not scripts
Quote from: VampireHSSCould someone make me a Conditional Branch Script: If hero 001 class is 003
Please
if $game_party.actors[1].class_name == 'Class Name'
end
that
should work
Quoteif $game_party.actors[1].class_name == 'Class Name'
Is it suposed to become like this:
Quoteif $game_party.actors[1].class_name == 003: Mage
????
Quote from: VampireHSSQuoteif $game_party.actors[1].class_name == 'Class Name'
Is it suposed to become like this:
Quoteif $game_party.actors[1].class_name == 003: Mage
????
No, It's supposed to be like this:
if $game_party.actors[1].class_name == "
Mage"
end
It's not working
Quote from: VampireHSSCould someone make me a Conditional Branch Script: If hero 001 class is 003
Please
Meh, I haven't read the post properly. What you asking for is to check if hero number 001 in the database have the class set to 003, right? If so what you want is this:
if $data_actors[1].class_id == 3
#write code here
end
Quoteif $data_actors[1].class_id == 3
#write code here
end
What do you mean by "write code here" ? Is it suposed for me to do anything there?
Yes, sorry if it was obvious what you should do. You are supposed to write whatever you want to happen when the conditions are fulfilled. Also if you want something else to happen if the condition is not fulfilled use this:
if $data_actors[1].class_id == 3
else
end
@Tsu I think you are forgetting that the first hero is $game_party.actors[0], not 1.
Edit: Corrected the note to Tsu
Oh, now I'm understanding. LOL :oops:
It doesn't work. It says syntax error
What exactly have you written? (Remember casing is important!)
Also if you used my note to Tsu, that would explain the error, because it was wrong. I have corrected it I think.
Well... in the condition branch script line i put this:
Quoteif $data_actors[1].class_id == 3
So it is this:
QuoteContitional Branch: Script: if $data_actors[1].class_id == 3
Message: Done
else
Message: NOOOOOOOOOOOOOOOOO
end
This is what I've done to test it.
I totally misunderstood what you meant. :whoa:
No wonder you get a syntax error.
In the script you want to end up with a boolean. If you write true you will get the message "Done" shown. If you writefalse you will get the message "NOOOOOOOOOOOOOOOOO" shown.
Don't worry, the fix is easy. Just delete the if. This should fix the matter.
Edit: Just enter $data_actors[1].class_id == 3
i am wondering:
if you need to condition the job therefore it is changed in the game correct?
if not just work as you setted it in the db
if i am right, after the change make a variable operation
(1 = warrior, 2 = something else 3= mage, like their position in the database)
then you can conditional "if variable(jobs) = 3 then"
and that will solve everything
THANKS Zeriab
Quote from: ZeriabAlso if you used my note to Tsu, that would explain the error, because it was wrong. I have corrected it I think.
In response to teh note, the $game_party.actors array actualy starts at 1 as opposed to 0, that's one way enterbrain found they could screw with us lol. :lol:
I know. That's why I always test if $something[1] really is number one.
It might have something to do with hashes starting at 1 and arrays at 0 or the other way around, but when you don't have to declare the type a common good thing to do is to test if what you think you get really is what you get.