dsb_set_tint

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

dsb_set_tint

Post by ian_scho »

the optional intensity parameter in dsb_set_tint is an integer? 0-100 or 0-255? Thanks

I've used this one for flashing friendly monsters white when I healed them, so I assume the default is max without this param.
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: dsb_set_tint

Post by Sophia »

All arguments are values from 0-255, including the optional intensity. So, the command would be summarized as: dsb_set_tint(RGB, [intensity]), where RGB is a table of { R, G, B }, like everywhere you need to specify a color in DSB. :)

The default is 127, actually. 255 would color the monster completely solid white.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: dsb_set_tint

Post by ian_scho »

Ohh thanks, ahhh but...

Code: Select all

dsb_set_tint(boss_id,{255,0,0},255)
I'm confused now! You said that it would 'color the monster completely white', yet I assumed it would go from left (0) to right (255) on the red scale below.

Image
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: dsb_set_tint

Post by Sophia »

Ok, I meant if you were using {255, 255, 255} (i.e., white), like you said in your example.

dsb_set_tint(id,{255,0,0},255) would color a monster completely red. Does that help? :)
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: dsb_set_tint

Post by ian_scho »

Ahh, Thanks again. That's exactly what I thought, but as always - what emits from my mouth usually different :P
Post Reply