Laser color

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Laser color

Post by Smivs »

Hi,
Quick question regarding laser color, can you set different colors for forward and aft lasers on NPCs?
Would this work?

Code: Select all

forward_weapon_type = "WEAPON_MILITARY_LASER";
"laser_color" = "cyanColor";
aft_weapon_type = "WEAPON_BEAM_LASER";
"laser_color" = "magentaColor";
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Laser color

Post by Thargoid »

I don't think it's possible - it's one laser colour per ship (or per shipdata iyswim). Don't forget it's a non-ordered list in essence, hence in effect you've just got a duplicate key there (laser_color) being assigned two different values. At best the second interpretted one would just overwrite the first, or at worst things would choke.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Laser color

Post by Smivs »

Thanks Thargoid,
I thought that was likely. Shame really. :(
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2272
Joined: Tue Jan 02, 2007 12:38 pm

Re: Laser color

Post by Killer Wolf »

The Vampires get around this using sub ents, they're all front-facing though, dunno if there's any quirks buidling additional rear guns.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Laser color

Post by Commander McLane »

Killer Wolf has the answer: If you want different colours, use a subentity. You can attach a front-laser-subentity and then not give the main entity a front laser, or do the same at the rear (or both). If you make the subentity non-frangible, the player won't notice that it's anything else than a normal ship.

And as for plists, Thargoid is right. It's a non-ordered array with named keys instead of numbers. But you can use each key only once per array.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Laser color

Post by Smivs »

Thanks guys, but It's not really worth the effort for what I had in mind. It was a tiny detail that probably no-one would even notice.
Commander Smivs, the friendliest Gourd this side of Riedquat.
sqwer
Average
Average
Posts: 8
Joined: Tue Dec 28, 2010 5:35 am

Re: Laser color

Post by sqwer »

if it possible to use pictures / animated for laser shoot (ani,bmp,png,pcx etc.)
like other games ?

if it possible to use pictures , to show pictures by pressing a key ?

ok, i know it, is hard scripting answer ...

thx
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Laser color

Post by Commander McLane »

sqwer wrote:
if it possible to use pictures / animated for laser shoot (ani,bmp,png,pcx etc.)
like other games ?
No.
sqwer wrote:
if it possible to use pictures , to show pictures by pressing a key ?
What kind of pictures? And where do you want to show them?

You can show any picture on a mission screen, and you don't need a special keypress for that.

But if you're thinking about creating a pop-up window with a picture in it, the answer is no.
Post Reply