Hard Light Productions Forums

Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Daboule on April 30, 2008, 05:35:37 am

Title: Another stupid newbie question...
Post by: Daboule on April 30, 2008, 05:35:37 am
Hi all,

I've followed all the scripting tutorials but I'm still in trouble...
For example where can I found something related to the "plr" object used in the velocity indicator script example?
It seems to be the player ship as it's used to display the Velocity of the ship player on the HUD, but I'm not really sure, is it described somewhere?

Thanks for your help

Bye,

Daboule

PS : Sorry for my english...
Title: Re: Another stupid newbie question...
Post by: Wanderer on April 30, 2008, 12:49:43 pm
That script was written for the older scripting system. And i had to take apart my main cpu for maintenance so i cant test it atm...

But assuming you are using fairly recent builds with the new scripting system you could probably set the following before the plr is actually used.

Code: [Select]
plr = hv.Player
That is in the new scripting system the plr is under the hook variables. And should appear only while the mission is running.

I'll try to take a better look once i get my main cpu back online after several HD related problems. Or perhaps earlier...
Title: Re: Another stupid newbie question...
Post by: Nuke on April 30, 2008, 01:43:54 pm
alternatively you could use.

plr = mn.Ships["Alpha 1"]
Title: Re: Another stupid newbie question...
Post by: Daboule on May 03, 2008, 08:29:17 am
Thank you very much for your answers...
I'll try this...

Daboule