Jump to content
Sign in to follow this  
The_Oakster

Force player out of a vehicle?

Recommended Posts

I know this should be simple and I have tried for hours to get it right. I have searched ofpec and here and I cant seem to get it to work.

I cant seem to kick the player and his group out of a vehicle. I am not using waypoints, the journey is scripted in a cutscene.

The player is called player

The car is named car1

The group is grp1

I have entered:

"unassignvehicle _x" foreach units grp1

"unassignvehicle _x" foreach units group player

All that happens is sidechat comes on telling 2 to follow 1 but no one gets out.

I did manage to get the player out but I cant remember what I put now. But the goons stayed in.

Thanks for you help.

Ben

Share this post


Link to post
Share on other sites
Gnat @ July 05 2006,12:37)]How about ....
Quote[/b] ]player action [{getout},car1]

Yep, thats what I put to get the player out, but the goons stay in!

Any ideas?

Ben

Share this post


Link to post
Share on other sites
Quote[/b] ]player action [{getout},car1]

Maybe

{_x action [{getout},car1]} foreach units group player

Btw, player is a pointer to the player's unit so it's a reserved word and you shouldn't use it as a name referring to specific unit. (1st post says you have player called player).

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x leaveVehicle car1" forEach units grp1

Share this post


Link to post
Share on other sites
Quote[/b] ]

{_x action [{getout},car1]} foreach units group player

That works, cheers Metal Heart.

Quote[/b] ]

player is a pointer to the player's unit ... and you shouldn't use it as a name ...

Point noted

Quote[/b] ]

"_x leaveVehicle car1" forEach units grp1

Sorry Karantan, that didnt work.

Ben

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  

×