1 decade ago by saloon12yrd
Hi all,
I tried various search phrases but I couldn't find an existing thread that answers my problem. Sorry if the answer is obvious, I'm fairly new to ImpactJs.
I try to have a switch entity that moves a door entity out of the way when triggered.
So far I have a switch that reacts on collision with the player (currently only changing the animation). Also, I have a resizable door entity that does absolutely nothing on its own.
Now I have two questions:
The cosmetic one: By default my door is 8x8 pixel. In the game the tile is correctly displayed as per the animation. When I resize the door (let's say 24x8) then the extended tiles will not be visible in the game. How can I get the tile to expand to the entities' actual size?
The technical one: To actually have the switch open the door I guess I need to fetch the respective door in the check() function of the switch and manipulate its position. Can anyone point me to a 'smart' way to do this? I.e. I'd like to configure the relation between several switches and their respective doors in Weltmeister, not in code.
Thanks in advance,
Dominique
I tried various search phrases but I couldn't find an existing thread that answers my problem. Sorry if the answer is obvious, I'm fairly new to ImpactJs.
I try to have a switch entity that moves a door entity out of the way when triggered.
So far I have a switch that reacts on collision with the player (currently only changing the animation). Also, I have a resizable door entity that does absolutely nothing on its own.
Now I have two questions:
The cosmetic one: By default my door is 8x8 pixel. In the game the tile is correctly displayed as per the animation. When I resize the door (let's say 24x8) then the extended tiles will not be visible in the game. How can I get the tile to expand to the entities' actual size?
The technical one: To actually have the switch open the door I guess I need to fetch the respective door in the check() function of the switch and manipulate its position. Can anyone point me to a 'smart' way to do this? I.e. I'd like to configure the relation between several switches and their respective doors in Weltmeister, not in code.
Thanks in advance,
Dominique