Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Enemies only visible when certain key is pressed?

Author
Message
King Of Khaos
17
Years of Service
User Offline
Joined: 25th Feb 2009
Location: Not ALL the windows were locked...
Posted: 30th Nov 2010 06:41 Edited at: 30th Nov 2010 06:43
Is it possible to set up a game so that all the enemies in it are invisible by default, but when the player presses a certain key, they become visible? Meaning that when the player presses the key again, the enemies go back to being invisible. I assumed if this can be done, it would be something like, the enemies all have transparent textures by default, but swap to their real textures when the key is pressed, and vice versa. Can this be done?

Cheers, Jake
------------------------------------------------------------
-The Clarkson Residence- (WIP)
Seth Black
FPSC Reloaded TGC Backer
21
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 1st Dec 2010 08:03 Edited at: 1st Dec 2010 08:05
...something along these lines should serve as a simple base, for the effect you're
attempting to incorporate into an enemy script:



The above example uses the G KEY to toggle between invisible and visible. There
is no need to edit the defined texture.

King Of Khaos
17
Years of Service
User Offline
Joined: 25th Feb 2009
Location: Not ALL the windows were locked...
Posted: 1st Dec 2010 22:50
Thank you Seth Black, I really appreciate it!

Cheers, Jake
------------------------------------------------------------
-The Clarkson Residence- (WIP)

Login to post a reply

Server time is: 2026-07-01 22:14:32
Your offset time is: 2026-07-01 22:14:32