Page 1 of 3
Changing player?
Posted: Sat Feb 09, 2008 5:57 pm
by Danimita92
Hi everyone, I'm a little new to this program and I'd like to ask a question I couldn't find the answer to in the forums:
How can I change my player's actor in mid-game. For example, I'd want to change my player into another one who has different animations, when I reach a certain spot. Like having the character walk like in a sort of "combat mode", only when I want it to.
Thanks for reading.
Re: Changing player?
Posted: Sat Feb 09, 2008 8:14 pm
by gamemakerg
You could make a change level entity and in the player setup and player start make it so its the charater that you want changed.
ex.
player: john
do x y and z then
change level
player: joe
Re: Changing player?
Posted: Sat Feb 09, 2008 10:39 pm
by Danimita92
Yeah but wouldn't that make a Loading screen in midgame? I'd like it to be smoothly, so you can't notice the difference between characters (because it'll be the same model just with different animations.
Re: Changing player?
Posted: Sat Feb 09, 2008 10:42 pm
by gamemakerg
wait so all you want to do is change the animations?
if you don't want to change the model than keep both having the same animations
Re: Changing player?
Posted: Sat Feb 09, 2008 10:45 pm
by Danimita92
Okay I'll tell you what I'm thinking of doing. The character walks around normally, then when I activate an entity or trigger or whatever, he gets out his weapon and walks in a sort of "combat mode", you know? He walks like in a sort of guard.
Re: Changing player?
Posted: Sat Feb 09, 2008 10:48 pm
by gamemakerg
im not completly sure how to do this maybe someone else does but you could have it so he doesnt have any weapons and then when he reaches a certain point he could pick one up?
you have to ask someone that is good at scripting because i have no idea.
Re: Changing player?
Posted: Sun Feb 10, 2008 2:34 am
by darksmaster923
this requires familiarity with the scripting language. you have to make whats called a scripted player. the built in player does not have enough functionality to do that. it is bascially a pawn that is a player.
Re: Changing player?
Posted: Sun Feb 10, 2008 10:20 am
by vagoneta
Its not the first time that im listening about 'scripted player' or 'script player'. Please, tell me more about it
Re: Changing player?
Posted: Sun Feb 10, 2008 12:22 pm
by Danimita92
I'd imagine it being a player configured with scripts, right?
Re: Changing player?
Posted: Sun Feb 10, 2008 1:01 pm
by Sph!nx
Well, haven't gotten around to do some scripting yet, but my guess its scripted like an NPC or enemy pawn but with more features and animations and such. Then that newly created pawn must be assigned to be controlled by the player.
Not really sure though, but this is what I make of it.
Re: Changing player?
Posted: Sun Feb 10, 2008 3:12 pm
by Juutis
vagoneta wrote:Its not the first time that im listening about 'scripted player' or 'script player'. Please, tell me more about it
Basically it's a pawn just like any NPC but instead of being independent it checks if keyboard keys or mouse keys are pressed and then reacts accordingly. For example you can make it check if W is pressed and then move forward. Creating a scripted player lets you do basically anything with your main character, so scripting is really worth learning.
Re: Changing player?
Posted: Sun Feb 10, 2008 3:16 pm
by Danimita92
Hmm... interesting, I'll definetly learn it.
Re: Changing player?
Posted: Sun Feb 10, 2008 5:23 pm
by QuestOfDreams
If you only need different animations it might be possible to just change the player's weapon via a script (SetPlayerWeapon). Weapon animations override the default animations of the player.
Re: Changing player?
Posted: Sun Feb 10, 2008 5:57 pm
by gamemakerg
thats what i ment to say i just was'nt shure what it was called
Re: Changing player?
Posted: Sun Feb 10, 2008 7:40 pm
by Danimita92
QuestOfDreams wrote:If you only need different animations it might be possible to just change the player's weapon via a script (SetPlayerWeapon). Weapon animations override the default animations of the player.
Never mind, I'll use a scripted player, because I'm also planning to be able to switch the player midgame. I know it'll take ages, but I think it's the best way.