I was wondering if it was possible to create a script that would check to see what the PC's name is?
Let's say that I wanted to create a total conversion (Not that I can! lol) And I wanted it to trigger if and only if my character's name was "x".
Would such a thing be possible with scripting, or would I just have to have another install of the game if I wanted to also keep my original install?
Thanks!
I was wondering if it was possible to create a script that would check to see what the PC's name is?
You should be able to use the GetName() function for this. Like:
void main () {
if (GetName(GetFirstPC()) == "John Doe") {
// Do something...
}
}
I was wondering if it was possible to create a script that would check to see what the PC's name is?
Let's say that I wanted to create a total conversion (Not that I can! lol) And I wanted it to trigger if and only if my character's name was "x".
I suppose you could insert a script in the OnEnter of the beginning module to transport the player to your new area.
void main()
{
if (GetName(GetFirstPC()) == "X")
{
StartNewModule("MyModule");
}
else
{
// Do other stuff
}
}
Edit: the stoffe beat me to it... :p
although, a "getname" script would probly be a bit pointless surely.
would it not be better to use "getisPC" (get is Player charecter)
then you'd be able to move the PC/party to your new module rather than the script being dependant on player name, it'll trigger because your the Player.
im saying this because realisticlly how many ppl will use the same player name. unless you wanted somthing special to happen if the players name was "Revan" or "Exile" or something else related ^^
Honestly?
I had just had the thought and figured, hey I'll include it in the read me if I ever can build such a thing... Not that it's really likely! But, I saw one of the TC's on here (Can't remember what it was now) And had thought that it would be nice if it only triggered if the name was "x" (Just a stand in) and for all the other names you would be able to play the rest of the game.
Foolish? Maybe, but I didn't know if anybody else had had the idea and figured, what the heck? Can't hurt to ask.
And thank you Stoffe and Pavlos for your help satisfying my curiosity.