I am making a war game set in the Stone Age and the objective is to enter the enemy's cave and reduce its health to 0. I can't get the caveman to enter the cave instead, he goes all the way to the end of the screen. How can I get him to go behind the cave to look like he is going in it?
Offline
You will need something similar to this,
when gf clicked forever if <([x position v] of [caveman v]) > ([x position v] of [the cave v])> go to front endThis is for the cave sprite, yes, this time it HAS to be a sprite, or it won't work.
Last edited by sonicfan12p (2012-06-17 16:05:10)
Offline
bob6 wrote:
Or like this (script for caveman):
when gf clicked forever if <touching [cave]?> hide else change x by (10) end end
That won't work as needed, you should use sonicfan's
Offline
Maybe cave man are like this!
when gf clicked go to [Cave v] set pen color to [#4D0000] pen down draw [cave] forever sleep inside [cave v] end(Try to make you own script! )
Last edited by Jonathan20000212 (2012-06-19 04:07:34)
Offline
PhirripSyrrip wrote:
bob6 wrote:
Or like this (script for caveman):
when gf clicked forever if <touching [cave]?> hide else change x by (10) end endThat won't work as needed, you should use sonicfan's
Looks like it would work fine to me?
The caveman goes right by 10 until its touching the cave at which point it hides and is no longer visible and thus appears to have entered the cave. Though admittedly to make this method look realistic would be harder and may require a mix of sprite and background art for the cave.
Offline
Smozzick wrote:
PhirripSyrrip wrote:
bob6 wrote:
Or like this (script for caveman):
when gf clicked forever if <touching [cave]?> hide else change x by (10) end endThat won't work as needed, you should use sonicfan's
Looks like it would work fine to me?
The caveman goes right by 10 until its touching the cave at which point it hides and is no longer visible and thus appears to have entered the cave. Though admittedly to make this method look realistic would be harder and may require a mix of sprite and background art for the cave.
He wants the caveman to go into the cave.
This will make it look like the cave made him dissaper
Offline
Try this:
forever if <touching [Cave v]?> go back [enough to be behind cave] layers end end
Offline
wahoo77 wrote:
Smozzick wrote:
PhirripSyrrip wrote:
That won't work as needed, you should use sonicfan'sLooks like it would work fine to me?
The caveman goes right by 10 until its touching the cave at which point it hides and is no longer visible and thus appears to have entered the cave. Though admittedly to make this method look realistic would be harder and may require a mix of sprite and background art for the cave.He wants the caveman to go into the cave.
This will make it look like the cave made him dissaper
It works except the caveman went extremely fast towards the cave.
Offline