I am working on a mini 'top down view' game and have made wall sensors which surround the character. It's different colours for different sides (E.G=Top is Purple) and if the purple touches black it goes back -5 Y. and same for the other ones, accept different colours, ect. anyway I want the black to be invisible so a house's side couldn't be walked on so I add black there and you can't walk on it anymore. So its fine but when I hide the black the sensors don't register the black being there so you walk over the house's side. I tried setting ghost effect to 25,50,75 and 100 but the sensors still don't activate. How do I make the black invisible with the sensors still activating?
Offline
This happens because the ghost effect changes the color a little bit.
Try making a new sprite for the black, putting it right above the house and using the hide block on it. Then, use the <touching [house edge]?> block. It's the first block in Sensing; you will have to change the sprite name using the pull-down menu.
That should do the trick!
Offline
ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't if this affects anything but its a scrolling map game. so when the right/up/down/left arrow key is pressed the background moves instead of the character
Offline
FINGIN wrote:
ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't know if this affects anything, but its a scrolling map game, so when the right/up/down/left arrow key is pressed the background moves instead of the character.
Did you change the player code so it responds to the house sensor?
Something like:
when flag clicked
forever
...other arrow keys here...
if <touching [House Sensor]>
change y by -2
--end if block--
--end forever block--
(I think -2 would create smooth movement for the player, if it moves 1 step or pixel. If your character moves two steps, pick -3, and so on.)
Looking forward to seeing your really cool game!
Offline
scratchisthebest wrote:
FINGIN wrote:
ok,thanks, ummm. Its says on the bar true instead of false so somthings happening. But its still going through/on it. I don't know if this affects anything, but its a scrolling map game, so when the right/up/down/left arrow key is pressed the background moves instead of the character.
Did you change the player code so it responds to the house sensor?
Something like:
when flag clicked
forever
...other arrow keys here...
if <touching [House Sensor]>
change y by -2
--end if block--
--end forever block--
(I think -2 would create smooth movement for the player, if it moves 1 step or pixel. If your character moves two steps, pick -3, and so on.)
Looking forward to seeing your really cool game!
well the house sensor is different colours for different sides, so when the top/purple part touches black is broadcasts up bump which causes the player sprite to go back -y. the main problem is the sensors don't register when the black is hidden.
thanks, any suggestions for the game?
Offline
cheetah12 wrote:
<when green flag clicked><show><go to x )y <set[ ghost ]effect to( 100
I don't think you even read his post
Offline