Can I event something without a plugin? Like, if player name = "John" or "Mary" then the following happens, etc
Is this possible? Maybe with a script I guess?
You can have a conditional branch check for the name of an actor. It's on the second tab.
Use the standard Conditional Branch Eventcommand, on its 2nd Page you got the Option:
Is Actor 1 named like: evmaster ? if yes: .... if no: ....
I didn't mean actor. Sorry for not being clear.
Like, I have an event where a player enters names their hero. Can I have an event that checks for like "evmaster" like a secret kind of thing?
Its like Bex said:
If Actor name = "evmaster"
(event here what should happen)
ELSE
(event what ever happens if its not evmaster
END
its simple like that 🙂 you can also do this for password names btw
or number passwords if stored in a variable.
Oh whoops. Thought it was just for actors names only. Now I see it. Thanks!
it rather check the first ID if you prenamed it,
but what you can test is
if: script: $gameParty.leader() == "evmaster"
do stuff what happens
ELSE
Do stuff happens if not "evmaster"
END
idk if its == or === which you can check, in case you use 4 actors, this will check the party leaders.
also I dont know if you can change party members around, If not, and actor[1] is fixed, than use the previous one,
if you can change formation, the one above will check the leaders name 🙂
I hope this makes sense though.
The player/hero IS an actor.
When you get the player to name the hero, you are using the Name Input command.
When you use the Name = ... in the conditional branch, you are checking the name that is set with Name Input.
$gameParty.leader() may not give you the correct actor, if you have more than one party member and the actor they named is not the leader.
Also be aware the test is case sensitive - if you do a check for Actor 1's name = "evmaster" but the player actually entered "Evmaster", the names will not match.
For best results, figure out which actor you want to test the name of, then use a script-based conditional check like this after the player has entered the character's name:
Name Input Processing, ???, ?? characters
If : Script : $gameActors.actor(ACTOR_ID_HERE).name().toLowerCase() == "evmaster"
- Stuff to do if its a match
: Else
- Stuff to do otherwise
Replace ACTOR_ID_HERE with the actor id for whoever's name was just entered. So 1 will apply this check to the first actor. Evmaster, evmaster, EvMaster, EVMASTER, EvMaStEr, etc will all work. Just make sure the name in quotes is all in lower case in your conditional, since you're converting the player's input to all lowercase.