Hi. I'm making a game, and how come this script doesn't work?:
when gf clicked forever switch to costume (item [1] of [off/on sensors v]) if <<mouse down?> and <touching [mouse pointer v]>> if <(item [1] of [off/on sensors v])= (1)]> replace item (1) of [off/on sensor v] with [2] end if <<mouse down?> and <touching [mouse pointer v]>> if <(item [1] of [off/on sensors v])= (2)]> replace item (1) of [off/on sensor v] with [1] end end
Offline
Flashing wrote:
Hi. I'm making a game, and how come this script doesn't work?:
when gf clicked forever switch to costume (item [1] of [off/on sensors v]) wait until <<not <mouse down?>> or <not <touching [mouse pointer v]?>>> if <<mouse down?> and <touching [mouse pointer v]?>> if <(item (1) of [off/on sensors v]) = (1)> replace item (1) of [off/on sensor v] with [2] else replace item (1) of [off/on sensor v] with [1] end
Fixed.
Or, for something MUCH SIMPLER:
forever wait until <not <<mouse down?> and <touching [mouse pointer v]?>>> wait until <<mouse down?> and <touching [mouse pointer v]?>> if <(costume #) = [1]> switch to costume [costume2 v] else switch to costume [costume1 v] endOr:
forever wait until <not <<mouse down?> and <touching [mouse pointer v]?>>> wait until <<mouse down?> and <touching [mouse pointer v]?>> next costume
Last edited by SciTecCf (2012-06-18 14:49:43)
Offline
Flashing wrote:
SciTecCf wrote:
Try it now, I edited my post.
Give me the other one you posted.
Here are your possible solutions:
when gf clicked forever switch to costume (item [1] of [off/on sensors v]) wait until <<not <mouse down?>> or <not <touching [mouse pointer v]?>>> if <<mouse down?> and <touching [mouse pointer v]?>> if <(item (1) of [off/on sensors v]) = (1)> replace item (1) of [off/on sensor v] with [2] else replace item (1) of [off/on sensor v] with [1] endOR
forever wait until <not <<mouse down?> and <touching [mouse pointer v]?>>> wait until <<mouse down?> and <touching [mouse pointer v]?>> if <(costume #) = [1]> switch to costume [costume2 v] else switch to costume [costume1 v] endOR
forever wait until <not <<mouse down?> and <touching [mouse pointer v]?>>> wait until <<mouse down?> and <touching [mouse pointer v]?>> next costumeI would recommend the second one.
Offline