Jump to content

Photo

Moving Platform Script


  • Please log in to reply
44 replies to this topic

#16 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 11 March 2016 - 04:16 PM

Edited again. It should at least compile now, but I haven't tested it with Meropits because that script is a mess and I don't want to set it up in a test quest.

#17 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 11 March 2016 - 04:21 PM

It's the checks. I had to add LA_RAFTING to the checks to get it to allow rafting. If you add a check to see if "OnPlatform == false", it should work.

EDIT: Oh, wait, never mind, you don't have a global variable for being on the platform, anymore.


Edited by Binx, 11 March 2016 - 04:39 PM.


#18 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 11 March 2016 - 04:40 PM

Edited again. It should at least compile now, but I haven't tested it with Meropits because that script is a mess and I don't want to set it up in a test quest.

It did compile this time. You were right, though, it didn't have any effect.

I wouldn't mind using a non-Mero script, but there's pretty much nothing else in the DB other than his that I can find.



#19 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 11 March 2016 - 04:57 PM

It did compile this time. You were right, though, it didn't have any effect.

I wouldn't mind using a non-Mero script, but there's pretty much nothing else in the DB other than his that I can find.

Like I said, before, the problem is in the line 

if(Link->Action != LA_Scrolling)

 You need to add a check to that line to see if you're on the platform. Looking through the script you posted, you still have "bool OnPlatform(ffc this)", right?, if it's still there, change the above line to

 

if((Link->Action != LA_SCROLLING) && (OnPlatform(this) != true))

That *should* fix the problem. Not sure how it woud  done with Dimentio's script, since it doesn't use a global variable.


Edited by Binx, 11 March 2016 - 04:58 PM.


#20 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 11 March 2016 - 05:15 PM

Like I said, before, the problem is in the line 

if(Link->Action != LA_Scrolling)

 You need to add a check to that line to see if you're on the platform. Looking through the script you posted, you still have "bool OnPlatform(ffc this)", right?, if it's still there, change the above line to

 

if((Link->Action != LA_SCROLLING) && (OnPlatform(this) != true))

That *should* fix the problem. Not sure how it woud  done with Dimentio's script, since it doesn't use a global variable.

 

"Could not macth type signature."



#21 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 11 March 2016 - 05:29 PM

Hmmmm. that's strange, probably a syntax error on my part. Or maybe it's that it isn't hard-coded to use a specific ffc...

Probably won't do anything but try changing 

OnPlatform(this) != true

to 

OnPlatform == false

Edited by Binx, 11 March 2016 - 05:32 PM.


#22 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 11 March 2016 - 05:54 PM

 

Hmmmm. that's strange, probably a syntax error on my part. Or maybe it's that it isn't hard-coded to use a specific ffc...

Probably won't do anything but try changing 

OnPlatform(this) != true

to 

OnPlatform == false

No good.



#23 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 11 March 2016 - 05:57 PM

Because that line is in the global script, and "this" only refers to an FFC within an FFC script.

#24 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 11 March 2016 - 06:14 PM

The alteration to Mero's script does use a global check to check if you are on a platform. If you want, I can fix the other pit scripts that you are using to check for if you are on a platform.



#25 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 11 March 2016 - 06:31 PM

Check my first post again. I missed that the platform script is just called "Platform", not "MovingPlatform".

#26 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 11 March 2016 - 06:50 PM

Check my first post again. I missed that the platform script is just called "Platform", not "MovingPlatform".

Still compiles, but platforms don't hold up over pits.

 

Here is my global as of now:

Spoiler

 

My platform script:

 

Spoiler

And my pit script, which is mixed in with a shield item script (IIRC, it's Zoria's modification of Mero's script, or some-such).

Spoiler


#27 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 11 March 2016 - 07:12 PM

Because that line is in the global script, and "this" only refers to an FFC within an FFC script.

Then there needs to be a global variable that tells you if he's on the platform. I've tried every way possible of modifying the Update_Holelava function and OnPitCombo functions (trying to get rafting to work, even tried to make a scripted raft for it), and nothing worked until I expanded the Link->Action check in the global. I dunno *why* that is, but as long as there's nothing in the global to protect platforms from pits, it won't work.



#28 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 11 March 2016 - 07:39 PM

My method is to check for an FFC running the platform script, then use the existing OnPlatform function to see if Link is standing on top of it. I explicitly know this works because I went to the trouble of compiling a test quest for it. I don't know how EJSnowden set up his own quest, and he's only posted snippets of his full script, so I can't know what else he's doing.

#29 EJSnowden

EJSnowden

    Initiate

  • Members
  • Location:U.S.A.

Posted 11 March 2016 - 09:41 PM

What I posted is pretty much all the relevant script work, the rest is a sideview ladder, power bracelet, and sideview, using the other global script slots. Platforms are handled by global flags, as are pits. In the script above, there's no check for platforms.

 

I'm considering tabling this until I'm competent enough with zscript to write in my own code. I can just use water as pits for now.



#30 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 11 March 2016 - 09:59 PM

I meant that I would like to see the entirety of the script so I can actually compile it. The segments you've got there are missing all of the constants etc. I'm expecting this to be some kind of ZQuest error, like not actually assigning the Platform script to the FFC in the room, because what I've got doesn't look fundamentally different from what's in your post and it works.
  • Binx likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users