Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

HELP with terminals

A topic by AlejandroG created Aug 07, 2024 Views: 312 Replies: 4
Viewing posts 1 to 2

Hi there, I'm just starting out with EFPSE and I'm trying to give the player visual feedback that a switch has been activated. I used a terminal on a wall which upon interaction opens a bunch of doors elsewhere. This works just fine, but I wonder how I can get the wall texture change to show the switch has been used. Should I add a decoration for this? I wanted a flat texture in the wall (or even a 3D model, but haven't used those yet) to change. Is this possible? Would be grateful if anyone could point me in the right direction.

(+1)

For this, it will be convenient to use a 3D model in the form of a wall. 3D models are decorations, so the script will need to be tied to this decoration. Then there are two options for changing the texture. Either we change the texture using an action in FSM, or we delete the decoration with a script and put another one in its place, which already has a different texture. You can read more about FSM in the manual or on the unofficial wiki:
https://pixelwolf.net/efpse/wiki/index.php?title=FSM

(1 edit)

Thanks, I made two 3D models (decorations) and upon interacting with a terminal I scripted it so that the 'lever_up' model got replaced by the 'lever_down' model. The only problem was that for some reason the 'entity delete' command did absolutely nothing and so I had to resort to 'entity move' in order to shift the 'lever_up' model into a wall so that it would disappear; not sure if it's a bug or I did something wrong, but the command is pretty straightforwards. Then I used 'entity spawnat' to get the new lever model appear where the previous one was.

I will try changing the textures via FSM once I've studied that well enough. Thanks for the help!

(EDIT: I understand it is possible to attach a script directly to the decoration, but still learning to do that)

Great job! You missed one detail, you need to write "entity delete me" to make it work.

Got it! Thanks