!SetObject transparency!

Started by , Tue 05/08/2003 14:58:44

Previous topic - Next topic

Jonas Hed

Hi!

I have an object in the foreground (a branch), and the character can walk behind it and that works fine but, I have made four objects of the branch so that the three outer parts of it are transparent. The Fourth object is the furthest outer one and its most transparent then the object next to it less transparent and so on.

But I've scripted this but none of the objects are transparent:
(this is for room2)
// room script file

function game_start() {
 // called when the game starts, before the first room is loaded
 SetObjectTransparency(1,30);
  SetObjectTransparency(2,60);
  SetObjectTransparency(3,90);
}  

Is this completely wrong?

Please help and thanks!

SSH

The problem is hinted at in the comment:

function game_start() {
// called when the game starts, before the first room is loaded

The game starts in room 1 or intro, so you are setting the transparency for one of those room's objects. You want to put your functions in the before fade-in interaction for the room in which the tree is.

Hope this helps!
12

Jonas Hed

To be exact I clicked the "edit script" button ({}) in the "Room(2) settings"-screen and typed the script there.
Isn't that how it should be done, because I tried to type it in the global script but then it wouldn't know which room and a fatal error message came up.  

Jonas Hed

Thank you! It now works perfect!

SMF spam blocked by CleanTalk