Jump to content
Sign in to follow this  
Killy_McMurder

Switch player function in SP

Recommended Posts

I have a section in my mission were after a cutscene, the player needs to switch from one character to another.

I'm completely noob at scripting and up to now i've tried player == pilot2 to attempt the switch... i had a good feeling that wouldn't work!

The unit that the player starts in executes the cutscene, but when the mission picks up after its finished the player needs to swap to the new unit

Can anyone tell me how i should do this?

Can the switch be called from within the scene.sqs?

Or will it have to be a seperate function, if so how would i sync them?

Cheers guys

Share this post


Link to post
Share on other sites

Igneous01 is probably right. Just wanted to add that the line

player == pilot2

is an equality check that returns true or false.

What you should have done is the assignment,

player = pilot2

although for this purpose it won't work. Just wanted to inform you of the difference.

Share this post


Link to post
Share on other sites
yes you can with this:

selectPlayer pilot2

put that in your trigger or when the scene.sqf ends and it should switch player control to pilot2

[/url]

Thanks very much, worked a treat!

Igneous01 is probably right. Just wanted to add that the line

player == pilot2

is an equality check that returns true or false.

What you should have done is the assignment,

player = pilot2

although for this purpose it won't work. Just wanted to inform you of the difference.

I kinda knew this was the completely wrong thing to do, but i appreciate the help anyway

Cheers fellas

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×