Jump to content
Sign in to follow this  
bmgarcangel

Get in a car without waypoint

Recommended Posts

How do I make it so a car will drive off when I walk up to it and get into it, using no gettin waypoints and stuff.

I figure its a command were a script constantly checks up on the car to see if I got in but which one would it be??

Share this post


Link to post
Share on other sites

vehicle player == name_of_car

or:

player in name_of_car

followed by let's say: name_of_car setFuel 1

~S~ CD

Share this post


Link to post
Share on other sites

player in name_of_car

is what I put or I put

vehicle player == name_of_car

now I assume to halt a trigger till something is completed I just put this

@vehicle player == name_of_car

right

Share this post


Link to post
Share on other sites

I think you must use somthing like that but untested..

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

? player in vehicles_name : playerIN = true

@playerIN

blablabla

blablabla

PicVert

Share this post


Link to post
Share on other sites

Well, PicVert's way (the script method), could be shortened

from 3 statements/commands to a single one:

@player in name_of_car

or:

@vehicle player == name_of_car

and in a trigger's condition field, you would just have to

remove the @.

~S~ CD

Share this post


Link to post
Share on other sites

I assume ;) DV Chris Death

But the computer must every o.1 or o.5 dunno how many lol check then re-calculation of the code ... if it wait for only one word I think but not sur it take less memory's time ;) ghostface.gif

Share this post


Link to post
Share on other sites

Yeah PicVert, that's the point where probably BN880

could tell us more, as he may have done a couple of

performance tests (AFAIK), which checks requiring more

or less performance.

generally your script would even just wait 'till Brendan

gets old and grey:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? player in vehicles_name : playerIN = true

@playerIN

blablabla

blablabla

At the first line you check wether player is in or not,

if in: playerIN = true, if not - let it be as it is.

At the second line the script will wait for the boolean,

and if the player wasn't in before the first line, nobody

would make: playerIN true anymore.

However, i suppose you've just overseen that little missy.

The point as i see it is:

line 1: checks wether the player is in or not - requires cpu

if in, adress space: playerIN becomes true (requires cpu again)

line 2: checks wether the address space: playerIN is 0 or 1

(false or true) - requires cpu again.

@player in name_of_car is a one liner, and so it requires less

cpu ressources than the two liner with the 3 statements.

You can see this one liner same way as checking for a

boolean to be true or false.

As long as the player is not in the car, the condition is false

When he is in the car, the condition is true.

The point is: it depends on the programing language, how

the condition gets checked.

Anyway, as i already posted in another thread:

As long as a method does what somebody wants, and does

it like somebody wants, he should use it.

It's always good to have more possible solutions, for:

a) seeing it from different perspectives

b) learn to understand the whole thing

c) be prepared for alternatives

d) and so on

As i said, which method requires more cpu could maybe

be answered by BN880, and could maybe for sure be answered

by BIS programmers.

:edit

ah yeah, and for the check/time frequenzy, you can tweak

the condition aswell by:

#loop

~1

?!(player in name_of_car): goto "loop"

blablabla

That way the check would be done once per second

~S~ CD

Share this post


Link to post
Share on other sites

True ;)

I saw a post on loop and @ command then not sure now lol dont remember exacly but I think a litle loop is better than a @ solution then for fine lag less use ~0.1 not 1 ;)

PicVert.

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  

×