Jump to content
Sign in to follow this  
AC337

Spawning objects with names

Recommended Posts

hey, I have a presence trigger with this in its on activation:

bomb = "RU_WarfareBUAVterminal" createVehicle getmarkerPos "east";

This spawns a Russian UAV terminal at the marker east

Does anyone know how i could give this UAV terminal the name terminal1 when it spawns?

Share this post


Link to post
Share on other sites

Unless I am missing something, I think you just change "bomb" to "terminal1" and you have the given the vehicle its intended name:

[color="Green"]terminal1[/color] = "RU_WarfareBUAVterminal" createVehicle getmarkerPos "east";

That gives the vehicle a global variable that points to it so you can refer to it later. Right now, as I said unless I missing something on my part, you are naming it bomb. If this still isn't what you need I suppose you could use setVehicleInit to name it but it should be unnecessary.

Good luck!

Share this post


Link to post
Share on other sites
Unless I am missing something, I think you just change "bomb" to "terminal1" and you have the given the vehicle its intended name:

[color="Green"]terminal1[/color] = "RU_WarfareBUAVterminal" createVehicle getmarkerPos "east";

That gives the vehicle a global variable that points to it so you can refer to it later. Right now, as I said unless I missing something on my part, you are naming it bomb. If this still isn't what you need I suppose you could use setVehicleInit to name it but it should be unnecessary.

Good luck!

Thanks alot man!

Share this post


Link to post
Share on other sites

[color=Green]terminal1[/color] = "RU_WarfareBUAVterminal" createVehicle getmarkerPos "east";

That's ok for singleplayer.

If you want to use it in Multiplayer you should prefer this script command:

someVar = "RU_WarfareBUAVterminal" createVehicle getmarkerPos "east";
someVar setVehicleVarName "terminal1";

For details please read:

http://community.bistudio.com/wiki/setVehicleVarName

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  

×