Optimising Respawning assets.

Hey guys. I was working on a project yesterday and went for a method to create disappearing tiles (that re-spawn) in a way that i describe as the Ridley Scott method.
Essentially i have a brick. You stand on this brick, after 5 seconds it disappears. then after 8 seconds it comes back.
The formula for this is as follows:
Brick (Face-hugger)
When collides with player, after 5 seconds: destroy actor + spawn invisible brick (Alien) at current location.
Invisible Brick (Alien)
After 8 seconds, destroy this actor + Spawn Brick (face-hugger)
is there anything im doing wrong here or that could be improved?
Either way, the Aliens reference makes sense right?
Right?
Essentially i have a brick. You stand on this brick, after 5 seconds it disappears. then after 8 seconds it comes back.
The formula for this is as follows:
Brick (Face-hugger)
When collides with player, after 5 seconds: destroy actor + spawn invisible brick (Alien) at current location.
Invisible Brick (Alien)
After 8 seconds, destroy this actor + Spawn Brick (face-hugger)
is there anything im doing wrong here or that could be improved?
Either way, the Aliens reference makes sense right?
Right?
Comments
Then have a rule if alpha = 0 after 3 seconds change alpha to 1
Hope this helps.
Darren.
GS Templates
GS Tools
Art Packs
Music Packs
should have the Spawn behavior before the Destroy …
once an actor is destroyed, the computer doesn't process the code that is after that action.
(and, without any idea of the your gamePlay)
suggest much simpler:
-gameAttribute boolean type collided … leave unchecked
Actor that collides:
Rule: When
Event: overlaps or collides with actor type: brick
--changeAttribute: game.collided To: true
Brick actor:
Rule: when
Attribute: game.collided is false
--Timer: After:5 seconds
---changeAttribute: self.color.Alpha To: 1
Otherwise:
Interpolate: self.Color.Alpha To: 0
on any actor:
Rule: when
Attribute: game.collided To: true
Timer: After: 8 seconds
--changeAttribute: game.collided To: false
trying to help … but it is difficult when I can't visualize your work …
@};- MH