How to use the print function in lua?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Eagle Eye
First Lance Corporal
First Lance Corporal
Posts: 129
Joined: Thu Nov 01, 2007 12:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Belgium
Contact:

How to use the print function in lua?

Post by Eagle Eye »

I tried the following script to make players respawn in a vehicle and this works fine!
However, how can i make the print function to work?

Code: Select all

OnCharacterSpawn( 
function(player)
if GetObjectTeam(GetCharacterUnit(player)) == 2 then
print("Characters are on team 2")
EnterVehicle(player, "Vehspawn1")
end
end
)
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: How to use the print function in lua?

Post by [RDH]Zerted »

The print function prints out to the error log.

If you want to see [Null] in the game, use ShowMessateText("")
User avatar
Eagle Eye
First Lance Corporal
First Lance Corporal
Posts: 129
Joined: Thu Nov 01, 2007 12:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Belgium
Contact:

Re: How to use the print function in lua?

Post by Eagle Eye »

Thanks Zerted
Post Reply