Posted By
|
Message
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
16th February, 2009 at 18:26:38 -
Just a few minutes ago I was dreading having to work out how to make a certain set of solid active objects become non solid when flipping a flag. My engine's code doesnt make it easy to do anything, or maybe i just suck.
Then It came to me, just set the scale to 0! now they're as good as gone and i can just set the scale to 1.0 to restore them!
.
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
16th February, 2009 at 18:28:06 -
ha ha, good idea andy.
[Game design makes my brain feel like its gonna explode.]
|
aphant
Registered 18/05/2008
Points 1242
|
16th February, 2009 at 20:03:13 -
I used qualifiers in my tests with this. Add an "OR (Filtered)" condition to all of your collision events and add the qualified objects to them.
|
nim
Registered 17/05/2002
Points 7234
|
17th February, 2009 at 01:22:22 -
Nice idea Yea, flags can be useful if you treat them as numbers too.
Always > Set Scale of "Active 1" to Value("Flag,0")
Also, you can multiply anything by the value of a flag to toggle between its real value and zero. Take the blocks you just mentioned, but then say that you had another event that created an object at (0,0) from the block every second (water droplets, sparks, etc) and also wanted them to stop. Setting the scale to 0 wouldn't stop this, but you could move it off the play area quite easily by including the actual value of the flag in the expression:
User pressed [key]>
Toggle Flag 0
Set X Position of "Active 1" to (-1000*Value("Flag,0"))+X("Active 1")
Edited by nim
//
|
|
|