Jump to content
Sign in to follow this  
mthcom

know a vechile name to be used in script

Recommended Posts

I am using the bas addons and so i have a motorcycle called desert klr 250 motorcycle

i want to use create vechile for that but i dont know which name should i use for that.

like:

motor = "I DUNNO HERE" createvechile ....

how can i know it's name?

THANKS BEFORE:D

Share this post


Link to post
Share on other sites

Take a look in the addons documentation, I'm sure there is a list of class names there. Or unpbo the addon itself and look at the config.

Share this post


Link to post
Share on other sites

there isn't any documentation in package:D

i dunno how to un pbo an addon is there a special program to unpbo?

Share this post


Link to post
Share on other sites

Easier way : put the given unit on the map, and type the following in its init line :

hint format["%1",[url="https://community.bistudio.com/wiki/typeOf"]typeof[/url] this]

The class name will appear on the screen.

Share this post


Link to post
Share on other sites

thank you it works:D

---------- Post added at 21:02 ---------- Previous post was at 20:56 ----------

i used this code and when the bike gets created i couldn't get in it. why?

TempObject = "BAS_klr250dese" CreateVehicle [((getpos player select 0)+40), (getpos player select 1), (getpos player select 2)];

Share this post


Link to post
Share on other sites

It's a known issue with freshly spawned vehicles or objects; they cannot be interacted with until a few seconds have passed. Try waiting a moment in front of the vehicle and the actions to get in should eventually appear.

Share this post


Link to post
Share on other sites

Instant interaction:

(group player) reveal TempObject;

Share this post


Link to post
Share on other sites

You should also run a "reveal" when setPos-ing the player to a position, essentially assume that if a player has never "seen" a vehicle that wasn't present at the start of the mission (i.e. it was spawned) that you need to reveal it to them, or wait for the engine to catch up (this take a surprisingly long time in multiplayer) before they can be interacted with.

When I setpos a player unit I always run a scan for vehicles in the area and "reveal" them as necessary.

E.g. In my missions all respawning vehicles are added to the global array "Vehicles" so I can do:

player setpos _somePos
{if(_x distance player < 150) then {player reveal _x}} foreach Vehicles

To reveal nearby vehicles when a player is teleported near to them. Obviously you need to make sure that the Vehicles array is kept up to date (and synchronised in MP).

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  

×