Hi!
I've been making a top down horror game, and the character is supposed to have a toggle able flashlight with on and off, but because the flashlight spawns on the player every tick with the default opaquacy set to 0 setting it on and of won't work. Any examples?
Develop games in your browser. Powerful, performant & highly capable.
The important thing is to have the Layer1 layer Force Own Texture set to Yes.
dl.dropbox.com/u/108799982/Capx%20Demos/Torch.capx
That's a good example, but what I meant is that the player should be able to switch it on and off. I can't get that to work.
[Edit]: Nvm I already got it working with your example. Thanks.
Its almost working now <img src="smileys/smiley6.gif" border="0" align="middle" /> The sprite of the player is aimed towards the mouse, but the light doesn't rotate with it. Heres what I have:
dl.dropbox.com/s/bdg40neng5f6e1n/Day-Night_edited-GOOD.capx
Maybe you could pin the light to the player using the pin behavior, or you could set the angle of the light to the angle of the player.
It worked thanks. I had the light connected to the players hands, but by connecting it to the players head it worked. Thanks!
I wanted to try some similar things myself so I had a go at this. Here's the .capx if you're interested:
Flashlight.capx (r119)