Jump to content

Photo

Moving Platforms over Pits and Lava


  • Please log in to reply
12 replies to this topic

#1 TheLegend_njf

TheLegend_njf

    Deified

  • Members
  • Real Name:Grant

Posted 16 November 2016 - 07:29 AM

I noticed the same author created both script, but is there a way where you can have these moving platforms work like that? I'm sure I've seen this done in many quests. 

 

Update: Well, this would explain something. It seems like the moving platform script isn't even working for me. I believe I followed the instructions correctly, so I'm not entirely sure what I did wrong. 



#2 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 16 November 2016 - 05:04 PM

IIRC the platform script uses a boolean variable called onPlatform or something similar. You could make it a global variable (if it's not already) and have the pits/lava disregard their effects if onPlatform is true.



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 16 November 2016 - 06:43 PM

This is Tamamo/Mero's script? If so,here is already a global var for being on the platform, and without that, it wouldn't compile.

 

I'm pretty sure that I made condensations of those two scripts for users here, twice or thrice, to avoid issues like this. You can probably find it on Pure by searching for pit or platform with a username filter; but if this is some other script, then I have no idea.

 

Did Cavthena ever post, or publish, the platforms extension to his Pit Fall script? If so, that may be more stable.

 

I'm about 60% done with my header for the Cane of Somaria, which has its own pit and platform mechanic, if you want to be a guinea pig. Details on how I'm making pits, are here.

 

If you post the entire global script, I can try to debug it for you, although I'm pretty sure I swore never to do another BP&L script fix. :P

 

Edit: My fix for her pit script, and her update are apparently on AGN, which is down at present.


Edited by ZoriaRPG, 16 November 2016 - 07:02 PM.


#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 November 2016 - 03:52 AM

I noticed the same author created both script, but is there a way where you can have these moving platforms work like that? I'm sure I've seen this done in many quests. 

 

Update: Well, this would explain something. It seems like the moving platform script isn't even working for me. I believe I followed the instructions correctly, so I'm not entirely sure what I did wrong. 

 

Here is the file in which I streamlined her HoleLava, and Moving Platform scripts, into one file:

 

http://pastebin.com/KqvigbTW

 

That might help you out of this....hole.



#5 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 21 November 2016 - 12:15 PM

No Cav has not release a moving platform addon because he is very lazy and a little busy. I should have it done in a day or two.

It'll be worth the wait. It'll have the ability to move in any pattern, teleport to another location (with or without Link), wait for X time at each check point, and only move if screen secrets are triggered or not. The trick I'm currently working on is smoothing out speed so it'll always line up and trigger changers as intended.

Someone also asked for Pitfall to draw in Link before he falls instead of snapping to grid. However I couldnt get it to look nice as the distance is just to small for it to work smoothly so I've dropped it.

Lastly I'll also release the door shutter script with this one. As its required if you want to use shutter doors in the same room as pits. It's because of how Pitfall decides to drop you back in the room after falling. Link can appear behind vanilla or other scripted shutter doors.

Edited by cavthena, 21 November 2016 - 12:16 PM.


#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 November 2016 - 04:37 PM

No Cav has not release a moving platform addon because he is very lazy and a little busy. I should have it done in a day or two.

It'll be worth the wait. It'll have the ability to move in any pattern, teleport to another location (with or without Link), wait for X time at each check point, and only move if screen secrets are triggered or not. The trick I'm currently working on is smoothing out speed so it'll always line up and trigger changers as intended.

Someone also asked for Pitfall to draw in Link before he falls instead of snapping to grid. However I couldnt get it to look nice as the distance is just to small for it to work smoothly so I've dropped it.

Lastly I'll also release the door shutter script with this one. As its required if you want to use shutter doors in the same room as pits. It's because of how Pitfall decides to drop you back in the room after falling. Link can appear behind vanilla or other scripted shutter doors.

 

Oh, you're still using changers? I suppose, people that want hyper-complex paths, with varying speed might need them, but they are horribly convoluted to set up, and they waste ffcs.

 

I went with path combos, and I'll probably support raft path flags in the end. I'll also likely add a speed up/down combo or flag into the mix, but what I'm working on, I intend to work flawlessly across screens, and scrolling warps. It's a bit of a pain in the bum.

 

Good to see you're releasing it, and I'd suggest just updating PitFall and including it, pre-set-up for non-scripters.



#7 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 21 November 2016 - 04:55 PM

I'm not using changers. I'm just using that term for lack of a better one. It will still use FFCs to apply the changes but it's all script based so no changers used.

I can't use flags as the combos already use inherent flags and normal flags already.

Pre setup is the plan. I'll be updating the current release to include all the changes above. Including the shutter doors. A Pitfall pack if you will.

#8 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 22 November 2016 - 01:26 AM

Quick up date. I have it all working except keeping Link with the platform. Attempting to move Link at odd values, like 0.5, is messing it up. Does anyone have a suggestion on how to move Link?


  • Bagu likes this

#9 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 22 November 2016 - 07:18 AM

Quick up date. I have it all working except keeping Link with the platform. Attempting to move Link at odd values, like 0.5, is messing it up. Does anyone have a suggestion on how to move Link?

 

Are you not keying Link->X = this->X + offset and the same for Y?

 

Link->X and Link->Y are ints internally, so you can't adjust them in decimal values. You can track a secondary set of variables, with floating point X/Y coordinates, and apply them floored to Link->X and Link->Y. Moving less than one pixel per frame will obviously cause this sort of thing to happen, so I would round the platform position to the nearest pixel at all times if it persists. Otherwise, Link will jitter around.



#10 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 22 November 2016 - 09:10 PM

I'll just drop this here before I go ahead and update Pitfall.

Platforms, I've done some testing and managed to get the speed up to 3.5 not sure how much higher that can go but I don't think it matters. Slowest speed is 0.25.

Collision is built for small(?) link size. Not the big Link 16x16.

 

You'll need stdExtra.zh to use this.

 

Lots'o'code


Edited by cavthena, 22 November 2016 - 09:13 PM.


#11 Nightmeres

Nightmeres

    Defender

  • Members

Posted 22 November 2016 - 10:50 PM

is your new one for the lava as well and if i had other global scripts would i have to combine this to them?



#12 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 23 November 2016 - 12:56 AM

Yes. Pitfall includes both pits (fall damage), pits (fall warp) and lava and the platform script will work on all three. You will need to add Pitfall into your global loop, it's not difficult as Pitfall is a function and can be added easily (View the instruction video in the Pitfall script on the database here). The Platform and Shutter scripts are FFCs so add them as you would any other FFC. They do however require the Pitfall global to work.



#13 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 23 November 2016 - 01:06 AM

is your new one for the lava as well and if i had other global scripts would i have to combine this to them?

Cavthena forgot to post an example global script...this is what it would be:

 

global script cavpitsplats{
    void run(){
        //Init Ghost_ZH goes here
        while(true){
            PitFall();
            //GhostUpdate1 goes here
            Waitdraw();
            //Ghost update 2 goes here
            Waitframe();
        }
    }
}



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users