The Daily Click ::. Forums ::. Klik Coding Help ::. Calculating a color?
 

Post Reply  Post Oekaki 
 

Posted By Message

Weston L



Registered
  16/12/2002
Points
  1603
26th July, 2010 at 04:17:55 -

So I really like the new "Replace Color" Action in Games Factory 2. However, I'm not quite sure how to use the "Calculation" (expression editor) feature.

By the way, if you're confused at what I'm talking about, go to the event editor and create a new event that is "Upon pressing space bar..." action for Active Object 1: "Animation" > "Replace Color"

Then I choose the color I want to replace. Next, I get to choose what to change the color to and I see a button that says "Calculation" and it brings up the Expression Editor.

So what I want to know is... what sorts of things can I put in the expression editor here? The only calculation I know is...
RGBAT( >object< , >x< , >y< )
Which pulls the color from a point on some object. Can I also do some calculation like set color to RGB(50,90,10) ? I tried that exact one and it didn't work. I would like to set my object to a color RGB based off Counter objects that change during the game.



 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
26th July, 2010 at 04:48:11 -

There is an expression for that. In the Expression Editor (the calculator) you click "Retrieve data from object" or whatever that button says, then go the Special object (looks like a computer) and on that list you should find Colors. That will have what you're looking for.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

Weston L



Registered
  16/12/2002
Points
  1603
26th July, 2010 at 09:54:05 -

Thanks, Jon.. this worked

 
n/a
   

Post Reply



 



Advertisement

Worth A Click