Author Topic: Stopping blood splatter giving away fake/invisible blocks?  (Read 1847 times)

128-Up

  • Spike Dodger
  • Posts: 114
  • Lives are an antiquated concept.
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
  • Playstyle: Keyboard
Stopping blood splatter giving away fake/invisible blocks?
« on: November 09, 2015, 09:40:00 PM »
I'm using Lemon Engine on GM 8.0 and I want to know how to stop the blood from the Kid dying from landing on invisible blocks that haven't been revealed and going through fake blocks that haven't disappeared.

Keygrin

  • Wannabe
  • Posts: 19
  • Keygrin
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 42.0 Firefox 42.0
    • View Profile
    • Keygrin
  • Playstyle: Keyboard
Re: Stopping blood splatter giving away fake/invisible blocks?
« Reply #1 on: November 09, 2015, 11:52:38 PM »
If the blood is its own Object, make the invisible block Object an exception by having a collision event that executes code that doesn't include the blood stopping upon touching it.
YouTube Channel

I await the day I die! Living is meaningless to me.

pieceofcheese87

  • Global Moderator
  • The Kid
  • Posts: 346
  • Personal Text
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 46.0.2490.80 Chrome 46.0.2490.80
    • View Profile
    • Twitch Tv Channel
  • Playstyle: Keyboard
Re: Stopping blood splatter giving away fake/invisible blocks?
« Reply #2 on: November 10, 2015, 06:21:34 AM »
Just do this:
1. Go in the invisible block object, uncheck "solid" and remove the block parent
2. In the step event where it checks for a collision with player, add this under "visible = 1"
Code: [Select]
instance_create(x,y,block)
Signature

128-Up

  • Spike Dodger
  • Posts: 114
  • Lives are an antiquated concept.
  • OS:
  • Windows 8.1/Server 2012 Windows 8.1/Server 2012
  • Browser:
  • Chrome 46.0.2490.86 Chrome 46.0.2490.86
    • View Profile
  • Playstyle: Keyboard
Re: Stopping blood splatter giving away fake/invisible blocks?
« Reply #3 on: November 18, 2015, 02:55:50 AM »
Just do this:
1. Go in the invisible block object, uncheck "solid" and remove the block parent
2. In the step event where it checks for a collision with player, add this under "visible = 1"
Code: [Select]
instance_create(x,y,block)

I did this, but then I end up with the problem where you get stuck if you jump into an invisible block from below.

L4Vo5

  • Cherry Eater
  • Posts: 59
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 48.0.2564.116 Chrome 48.0.2564.116
    • View Profile
  • Playstyle: Keyboard
Re: Stopping blood splatter giving away fake/invisible blocks?
« Reply #4 on: March 12, 2016, 01:55:20 PM »
You can always just delete all unrevealed invisible blocks if the player dies
On player death event:
with (insert invisible blocks name here) if visible = 0 instance_destroy()

if you have various invisible block objects, make a parent for them and just refer to the parent in the code above
I have to admit, i still haven't beaten IWBTG