Platform Builder Forums
Help and Support => Working with Platform Builder => Topic started by: Kemuja on July 09, 2021, 06:14:22 PM
-
I was trying to make a TNT, that would have "Detonate" as its Destroy animation (and destroyed when anyone bumbs or steps on it). Now I wanted to make a better chain reaction (normally, when this TNT gets destroyed, another would start its "Detonate" animation. I want to make it so, that when this detonates, TNTs next to it would instantly explode).
I was then trying to work with commands to make it trigger a command when near an explosion and would change itself into a "insta-exploding" version of itself (a different block + because there's no way to change block's Destroy animation to something else as far as I saw), but here's a kicker: "Change block" command doesn't allow me to have it change itself into insta-explosive; I can only make it change every TNT on the screen into it.
I was also trying to use "for nearest block", but that went nowhere.
When I tried to do something like this: change block ,5
nothing happened, but when I did this: change block 5
it would give a GameMaker error and crash.
How do I make a triggered block change itself into a different block (without it changing every block on the screen)
-
I was trying to make a TNT, that would have "Detonate" as its Destroy animation (and destroyed when anyone bumbs or steps on it). Now I wanted to make a better chain reaction (normally, when this TNT gets destroyed, another would start its "Detonate" animation. I want to make it so, that when this detonates, TNTs next to it would instantly explode).
I was then trying to work with commands to make it trigger a command when near an explosion and would change itself into a "insta-exploding" version of itself (a different block + because there's no way to change block's Destroy animation to something else as far as I saw), but here's a kicker: "Change block" command doesn't allow me to have it change itself into insta-explosive; I can only make it change every TNT on the screen into it.
I was also trying to use "for nearest block", but that went nowhere.
When I tried to do something like this: change block ,5
nothing happened, but when I did this: change block 5
it would give a GameMaker error and crash.
How do I make a triggered block change itself into a different block (without it changing every block on the screen)
This may work, I didn't check but may do the thing. There is always the chance of needing some bugfix to make it work:
for nearest block <id of your main tnt block>
spawn block 5, self
remove block
Note that this miay activate any tnt in the view, just because its the nearest
And also this will only work for one close tnt and not all of the surrounding ones, SO, you may need to do some kind of workaround
-
This may work, I didn't check but may do the thing. There is always the chance of needing some bugfix to make it work:
for nearest block <id of your main tnt block>
spawn block 5, self
remove block
Note that this miay activate any tnt in the view, just because its the nearest
And also this will only work for one close tnt and not all of the surrounding ones, SO, you may need to do some kind of workaround
This actually worked (Note, that it triggers when in the range of the explosion).
Cheers!