Page 2 of 2

Re: [OXP Request] Reversed Engineered Thargoid Laser

Posted: Tue Jan 03, 2017 10:00 pm
by Norby
Nexus-Hex wrote:
how can I make that when you buy the equipment pops up a screen containing something written?
In playerBoughtEquipment event handler. A short message:

Code: Select all

this.playerBoughtEquipment = function(equipment)
{
     if( equipment.equipmentKey == "EQ_WEAPON_CANNON_REV_THARGOID_LASER" ) {
          player.consoleMessage("Thank you for your purchase!", 10);
     }
}
If your message is longer than a line then display a whole screen with mission.runScreen where you can insert line breaks with \n characters.

Re: [OXP Request] Reversed Engineered Thargoid Laser

Posted: Wed Jan 04, 2017 4:42 pm
by Nexus-Hex
Norby wrote:
Nexus-Hex wrote:
how can I make that when you buy the equipment pops up a screen containing something written?
In playerBoughtEquipment event handler. A short message:

Code: Select all

this.playerBoughtEquipment = function(equipment)
{
     if( equipment.equipmentKey == "EQ_WEAPON_CANNON_REV_THARGOID_LASER" ) {
          player.consoleMessage("Thank you for your purchase!", 10);
     }
}
If your message is longer than a line then display a whole screen with mission.runScreen where you can insert line breaks with \n characters.
Little help over here.
I dont know how to present a missions creen with title, message and "press space, commander.
SHow me an example or a template.
Thanks in advance

Re: [OXP Request] Reversed Engineered Thargoid Laser

Posted: Wed Jan 04, 2017 5:29 pm
by tsoj
I think this could help you:http://wiki.alioth.net/index.php/Oolite ... _callbacks

If youre searching for a special method but you dont know what name it could have then you could take a look in an oxp-script from an oxp where you know this method/property is used. At least this helps me.

Re: [OXP Request] Reversed Engineered Thargoid Laser

Posted: Wed Jan 04, 2017 9:53 pm
by Norby
After wiki the best examples are the source code of oxps which do similar things, you can learn a lot while read the packaged files. I can not create better templates.