Question about darkening the room

Started by Enchart, Thu 25/06/2015 15:07:38

Previous topic - Next topic

Enchart

I've been expecting some problems when I reach this point. Shortly put:

I have a room with EMP guardian in the middle of the room (It's animated with multiple backround images). Soon as the player character reaches middle of the room he is hit by EMP and looses his sight (cyber eyes). At this point I wanted to make screen black while character is visible.

I haven't find a way to blacken the screen 'cause I'm using animated backround.

So is there a way either to reserve one of the 5 backround images for darkening the room without hurting the room animation

OR

to use cutscene room and make the character appear to same coordinates where he was hit by AMP?

Slasher

yes, you could do it by cutscene in another room but it could depend on what is supposed to happen in that dark room...and does he go back?

Enchart

Quote from: slasher on Thu 25/06/2015 15:35:41
yes, you could do it by cutscene in another room but it could depend on what is supposed to happen in that dark room...and does he go back?

When he not in proximity EMP guardian and some time have passed he should return to the original screen. Still the problem remains: how can I make character to change room and keep his coordinates?

Slasher

#3
just change room:

Code: ags

SetNextScreenTransition(eTransitionInstant); // if you do not want any fade between the rooms.

CharName.ChangeRoom(1);// example. will keep x y from room 2 when you go back to room 1. 



Crimson Wizard

#4
Simply use the room-sized object made of a big black sprite (initially not visible).
Adjust its baseline so that it covers everything (set it to bottom of the room).
Then make object visible.
Then adjust player's baseline property to higher value, making it appear above object.

When EMP cutscene is over, do reverse adjustments.

This way you could even emulate EMP effect "appearance" by gradually changing object's Transparency.

NOTE: If you do this in the editor, the object will cover whole screen, making it hard to edit this room further (unfortunately, AGS cannot hide particular objects during design time).
To solve this problem, assign any dummy sprite to this object at design time, and change it to big black sprite at runtime in script.

Slasher

Crimson
QuoteSimply use the room-sized object made of a big black sprite.

that would be a simpler way ;)

Enchart

Thank you to both of you. :)

I'm going to succeed with these instructions


SMF spam blocked by CleanTalk