MODULE: rellax 0.4.0

Started by eri0o, Mon 07/10/2019 03:26:58

Previous topic - Next topic

PMick

Sorry for resurrecting an old thread, but I'm trying to use this and I confess I don't know some of the minimal things I need to know. I figured out how to export the rellax scripts from the demo and then import them into my game, and I've created the necessary custom properties, but when I set an object's PxPos and pyPos to anything above 3, the game draws that object in the foreground, covering up another object that is supposed to be in front of it

eri0o

Well, object Z sort (named baseline) will by default use the Y position of it. You really don't want that, you should instead use a manual baseline setting in the object so it has a predictable Z sort.

PMick

Yep, I think you're right. I experimented with the intitial Y positions of the objects and it definitely changes it. I've got it working fine now, and will remember about manual baselines :)

ThreeOhFour

I just switched AGS 4.0 to use the extended script compiler, and now rellax gives me this error:

rellax.asc(679): 'Rellax::set_TargetCharacter' has the qualifiers '' here but 'static' elsewhere. See rellax.ash line 89

I realise that AGS 4.0 is still in development, but figured it would be worth mentioning here!

Crimson Wizard

#84
Quote from: ThreeOhFour on Fri 06/12/2024 11:41:03I just switched AGS 4.0 to use the extended script compiler, and now rellax gives me this error:

rellax.asc(679): 'Rellax::set_TargetCharacter' has the qualifiers '' here but 'static' elsewhere. See rellax.ash line 89

I realise that AGS 4.0 is still in development, but figured it would be worth mentioning here!

That's a mistake in the module. The old compiler was more "relaxed" (accidental pun), and ignored some of them.
The TargetCharacter is declared as "static attribute", so it cannot have "this".

To fix this, change from
"void set_TargetCharacter(this Rellax*, Character* target)"
to
"void set_TargetCharacter(static Rellax, Character* target)"

For this, and all the similar functions.
Note that such change will work well with the old compiler too.

eri0o

I realized I already applied this fix but I just didn't made a new release, I will look into releasing it on the weekend.

ThreeOhFour

Thank you, CW, that fixed it perfectly. I also went through some issues with the compiler finding problems in the Tween module with Edmundito and he praised the quality of the new compiler and the errors it catches!

SMF spam blocked by CleanTalk