Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
SpeedyDonkey

A vehicle unlocked...

Recommended Posts

I want AI to be able to jump in and out of the cars, but the player should not be able to enter them...

Any ideas?

Share this post


Link to post
Share on other sites

Iirc, locking a vehicle disables the player from boarding it, but has no effect on AIs. So just lock all the relevant vehicles and you should be fine. smile_o.gif

Share this post


Link to post
Share on other sites
Iirc, locking a vehicle disables the player from boarding it, but has no effect on AIs. So just lock all the relevant vehicles and you should be fine. smile_o.gif

No locking a vehicle does block the AI from entering it, I guess you could briefly unlock a vehicle when an AI is near it?

RED

Share this post


Link to post
Share on other sites

RED that could work but some AI is in the vehicles and some stand very near so there could be problems.

But I think i found another way to do this {8^) ... sort of...

but it doesn't work fully :-/

... is there a way to detect if the player is in the vehicle and if he is in the vehicle some thing would happen? (in this case the enemy to get angry at him)

Share this post


Link to post
Share on other sites

In a triggers condition field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player in vehiclename

RED

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">[player] allowGetIn false

but then he can get in no vehicle. maybe u make a little trigger connected to the player and in onAct: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[player] allowGetIn falsein onDeact: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[player] allowGetIn truethe trigger should be repeatedly. u need a script to "hold" the trigger on the vehicles' position:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop

~0.1

trigger1 setPos (getPos vehicle)

? ! (alive vehicle): exit

goTo "loop"

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  

×