Welcome, Guest. Please login or register.

Author Topic: Blocking Moving Platforms  (Read 3992 times)

XionGaTaosenaiTopic starter

  • Crewmate
  • *
  • Posts: 4
    • View Profile
Blocking Moving Platforms
« on: July 7, 2013, 08:10:09 PM »
I'm trying to add a room in a custom level (using the beta 2.1 version) that works similarly to Exhaust Chute in the main game, where there's a moving platform blocked by a quicksand block that can only be released if you enter the room from a specific direction. However, it doesn't work: the moving block passes right through the quicksand block as if it wasn't even there. Is this just a natural limitation of the level editor, or am I missing something specific?

TheJonyMyster

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 338
  • Points: 912
    • View Profile
    • My tumblr
Re: Blocking Moving Platforms
« Reply #1 on: July 7, 2013, 08:15:24 PM »
That was a limitation of the editor, and was hardcoded into the main game.
Correct me if I'm wrong.

Kayya

  • Global Moderator
  • Professor
  • *
  • Posts: 166
  • Surprise! I'm back.
    • View Profile
Re: Blocking Moving Platforms
« Reply #2 on: July 7, 2013, 08:17:35 PM »
To me, it looks like what you first stated, a limitation of the level editor. I do have the same version (2.1) and I tried it different ways, and yes, it does seem like that. The other thing I noticed is if the moving platform passes through the disappearing one, you can fall through the latter but it'll still go away. I don't know, though.

That was a limitation of the editor, and was hardcoded into the main game.
Correct me if I'm wrong.

You may be right, that it was hardcoded. However, in game it appears twice, with the moving platform in different positions. (Exaust Chute and the last trinket before Vitellary in Space Station 2) I wonder...

TheJonyMyster

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 338
  • Points: 912
    • View Profile
    • My tumblr
Re: Blocking Moving Platforms
« Reply #3 on: July 7, 2013, 08:20:36 PM »
That doesn't make it less possible that it was hardcoded, that just means he did it twice. Also, I remember somewhere (possibly on distractionware) Terry or some other smart guy said it was hardcoded.

Hejmstel

  • tOLP Contributor
  • Super Captain
  • ******
  • Posts: 714
  • Formerly "Doormat"
    • View Profile
    • youtoot chunnel
Re: Blocking Moving Platforms
« Reply #4 on: July 8, 2013, 03:04:50 AM »
I'm pretty sure it was Terry that said it was hardcoded, and it would break the game if it was added into the editor.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1586
    • View Profile
Re: Blocking Moving Platforms
« Reply #5 on: July 8, 2013, 03:52:06 AM »
Yes, it's hardcoded, but you could simulate it in custom levels with multiple rooms and internal scripting. You still have to take into account that you could flip off the disappearing platform, that you can't put spikes under it like in Exhaust Chute, and some other things. I attached linked to an example of how it could be done. :viridian:

http://www.mediafire.com/download/qzs4a4xra4linus/disappearing_platform.vvvvvv

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: Blocking Moving Platforms
« Reply #6 on: July 8, 2013, 04:07:13 AM »
Yes, it's hardcoded, but you could simulate it in custom levels with multiple rooms and internal scripting. You still have to take into account that you could flip off the disappearing platform, that you can't put spikes under it like in Exhaust Chute, and some other things. I attached linked to an example of how it could be done. :viridian:

http://www.mediafire.com/download/qzs4a4xra4linus/disappearing_platform.vvvvvv
Woah, I have never expected such thing to be able to stimulate by internal scripting. Time to add one more reason for gotoroom(x,y) being the best internal command.
« Last Edit: July 26, 2013, 07:47:41 PM by nicholashin »

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: Blocking Moving Platforms
« Reply #7 on: July 26, 2013, 01:19:40 PM »
Yes, it's hardcoded, but you could simulate it in custom levels with multiple rooms and internal scripting. You still have to take into account that you could flip off the disappearing platform, that you can't put spikes under it like in Exhaust Chute, and some other things. I attached linked to an example of how it could be done. :viridian:

http://www.mediafire.com/download/qzs4a4xra4linus/disappearing_platform.vvvvvv
Not needed. There's an entity parameter that signifies that a moving platform should be stopped by a quicksand platform. It's limited in functionality though, and will only work in very specific cirumstances.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1586
    • View Profile
Re: Blocking Moving Platforms
« Reply #8 on: July 26, 2013, 02:40:26 PM »
Yes, it's hardcoded, but you could simulate it in custom levels with multiple rooms and internal scripting. You still have to take into account that you could flip off the disappearing platform, that you can't put spikes under it like in Exhaust Chute, and some other things. I attached linked to an example of how it could be done. :viridian:

http://www.mediafire.com/download/qzs4a4xra4linus/disappearing_platform.vvvvvv
Not needed. There's an entity parameter that signifies that a moving platform should be stopped by a quicksand platform. It's limited in functionality though, and will only work in very specific cirumstances.

Let me guess: it will only work in the same rooms and positions as in the main game?

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: Blocking Moving Platforms
« Reply #9 on: July 26, 2013, 07:34:12 PM »
Yes, it's hardcoded, but you could simulate it in custom levels with multiple rooms and internal scripting. You still have to take into account that you could flip off the disappearing platform, that you can't put spikes under it like in Exhaust Chute, and some other things. I attached linked to an example of how it could be done. :viridian:

http://www.mediafire.com/download/qzs4a4xra4linus/disappearing_platform.vvvvvv
Not needed. There's an entity parameter that signifies that a moving platform should be stopped by a quicksand platform. It's limited in functionality though, and will only work in very specific cirumstances.

Let me guess: it will only work in the same rooms and positions as in the main game?
No, I don't think so, but they only work in very specific configurations of the platforms, and only sideways I would assume.
I haven't tested this throughtely, but I know they works - BTV6 used them in the original SS area of the level until I lost the work on it very early in development, and didn't bother to fix it again (and then ended up forgetting all about it..). But basically, when you enter the room, which may have a quicksand platform and a moving platform where you want it to be and run (internally) this on room load:

destroy(platforms) # to destroy the existing moving platform - it is there to avoid a flickering platform when going into the room. Yes, in this very situation, this command actually does what it's supposedto.
createentity(movingplatformx,movingplatformy,2,15,speed)

Make sure that the x and y is *precisely* to the left or the right of the disappear platform, or the script will break. Yes, 1 pixel counts too.

XionGaTaosenaiTopic starter

  • Crewmate
  • *
  • Posts: 4
    • View Profile
Re: Blocking Moving Platforms
« Reply #10 on: July 29, 2013, 03:13:56 PM »
So what exactly would I type to make the mechanism in this room work?



The first time you reach this room, you enter it from the left, and the only way to go is down. A good deal later in the game, you get here from above, which allows you to uncork the moving platform and go right. The moving platform is the one currently under (over?) the spikes, and I want it to be stuck to the left of the vanishing platform.

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: Blocking Moving Platforms
« Reply #11 on: July 30, 2013, 11:09:47 AM »
So what exactly would I type to make the mechanism in this room work?



The first time you reach this room, you enter it from the left, and the only way to go is down. A good deal later in the game, you get here from above, which allows you to uncork the moving platform and go right. The moving platform is the one currently under (over?) the spikes, and I want it to be stuck to the left of the vanishing platform.
* Create the moving platform moving right at the left of the quicksand platform (in the level editor). Make sure it's going right, NOT left.
* Set platform bounds inside some walls, 2x2.
* Create an internal script loader covering the entire room
* Create an internal script with the following content:

script:
say(3)
destroy(platforms)
createentity(64,40,2,15,3)
loadscript(stop)
text(1,0,0,4)

* Now, it will work as you want to.
(Keep in mind tht the moving platform will completely ignore the quicksand platform if you recreate it by dying, but even in the main game, dying with these platforms are a bit glitchy - especially in the Prize for the Reckless room)

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1586
    • View Profile
Re: Blocking Moving Platforms
« Reply #12 on: July 30, 2013, 11:23:13 AM »
* Create an internal script with the following content:

script:
say(3)
destroy(platforms)
createentity(64,40,2,15,3)
loadscript(stop)
text(1,0,0,4)

Also, there has to be exactly one blank line below text(1,0,0,4), otherwise it won't work.

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: Blocking Moving Platforms
« Reply #13 on: July 30, 2013, 11:10:33 PM »
* Create the moving platform moving right at the left of the quicksand platform (in the level editor). Make sure it's going right, NOT left.
* Set platform bounds inside some walls, 2x2.
* Create an internal script loader covering the entire room
* Create an internal script with the following content:

script:
say(3)
destroy(platforms)
createentity(64,40,2,15,3)
loadscript(stop)
text(1,0,0,4)

* Now, it will work as you want to.
(Keep in mind tht the moving platform will completely ignore the quicksand platform if you recreate it by dying, but even in the main game, dying with these platforms are a bit glitchy - especially in the Prize for the Reckless room)
May I ask how the coordinates are counted? I don't understand why it's 64,40. Is it by pixels or something?
« Last Edit: July 31, 2013, 05:25:28 PM by nicholashin »

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: Blocking Moving Platforms
« Reply #14 on: July 31, 2013, 05:12:36 PM »
[quote author=FIQ link=topic=255.msg5808#msg5808 date=137520778
* Create the moving platform moving right at the left of the quicksand platform (in the level editor). Make sure it's going right, NOT left.
* Set platform bounds inside some walls, 2x2.
* Create an internal script loader covering the entire room
* Create an internal script with the following content:

script:
say(3)
destroy(platforms)
createentity(64,40,2,15,3)
loadscript(stop)
text(1,0,0,4)

* Now, it will work as you want to.
(Keep in mind tht the moving platform will completely ignore the quicksand platform if you recreate it by dying, but even in the main game, dying with these platforms are a bit glitchy - especially in the Prize for the Reckless room)
May I ask how the coordinates are counted? I don't understand why it's 64,40. Is it by pixels or something?
[/quote]
Yes, it's pixelX,pixelY counted from top left. I basically replicated your room in VVVVVV in a few seconds and tried the exact coordinates.

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: Blocking Moving Platforms
« Reply #15 on: July 31, 2013, 05:31:20 PM »
May I ask how the coordinates are counted? I don't understand why it's 64,40. Is it by pixels or something?
Yes, it's pixelX,pixelY counted from top left. I basically replicated your room in VVVVVV in a few seconds and tried the exact coordinates.
But it's 16 wall tiles horizontally away from left and 5 wall tiles vertically away from top. And 64 to 40 ratio doesn't correspond to 16 to 5 ratio. Does this mean that vertically each wall tile count as 8 pixels, while horizontally it's 4 pixels? Seems very weird IMO.  :)

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: Blocking Moving Platforms
« Reply #16 on: August 1, 2013, 08:01:43 AM »
May I ask how the coordinates are counted? I don't understand why it's 64,40. Is it by pixels or something?
Yes, it's pixelX,pixelY counted from top left. I basically replicated your room in VVVVVV in a few seconds and tried the exact coordinates.
But it's 16 wall tiles horizontally away from left and 5 wall tiles vertically away from top. And 64 to 40 ratio doesn't correspond to 16 to 5 ratio. Does this mean that vertically each wall tile count as 8 pixels, while horizontally it's 4 pixels? Seems very weird IMO.  :)
The *moving* platform is placed 8 tiles from the left and 5 tiles from the top.

XionGaTaosenaiTopic starter

  • Crewmate
  • *
  • Posts: 4
    • View Profile
Re: Blocking Moving Platforms
« Reply #17 on: August 1, 2013, 01:08:39 PM »


I'm guessing the "Script Box" that the level editor provides you with and the "internal script loader" you speak of are not the same thing? Because if they are, I followed every step just as you said.

blue441

  • Professor
  • ****
  • Posts: 170
  • Signature last changed on: 28/6/2014
    • View Profile
Re: Blocking Moving Platforms
« Reply #18 on: August 1, 2013, 02:35:24 PM »
[error image]
I'm guessing the "Script Box" that the level editor provides you with and the "internal script loader" you speak of are not the same thing? Because if they are, I followed every step just as you said.

I think he meant to create a script box with this script:

Code: [Select]
iftrinkets(0,intscr)
That's what he meant by "internal script loader".
Now create a script (in this case, called "intscr") with the code he mentioned. Also, delete the script box used to create "intscr" as you won't need it.
Also, do note that "script:" isn't part of that script. Start at "say(3)".
Does this work?

nicholashin

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 248
  • (Best?) VVVVVV Player level Critic
    • View Profile
Re: Blocking Moving Platforms
« Reply #19 on: August 1, 2013, 05:13:09 PM »
Yes, it's pixelX,pixelY counted from top left. I basically replicated your room in VVVVVV in a few seconds and tried the exact coordinates.
But it's 16 wall tiles horizontally away from left and 5 wall tiles vertically away from top. And 64 to 40 ratio doesn't correspond to 16 to 5 ratio. Does this mean that vertically each wall tile count as 8 pixels, while horizontally it's 4 pixels? Seems very weird IMO.  :)
The *moving* platform is placed 8 tiles from the left and 5 tiles from the top.
Well I was misled by the images =.=