PDA

View Full Version : I can't push the block



Joeiiii
12-09-2018, 05:46 AM
Hi :evil:

I have a problem and hope we can solve it.

I can't push the block to open the shutter, if a guy (no enemy) is in the room. Or does a guy count as enemy? Without a guy the trigger opens the door, but with a guy in the room I can't push the block.

https://abload.de/img/unverschiebbarerblocklfe5l.png

ZoriaRPG
12-09-2018, 07:00 AM
Hi :evil:

I have a problem and hope we can solve it.

I can't push the block to open the shutter, if a guy (no enemy) is in the room. Or does a guy count as enemy? Without a guy the trigger opens the door, but with a guy in the room I can't push the block.

https://abload.de/img/unverschiebbarerblocklfe5l.png

Room guys are enemies. If Link has the bracelet, try Push->Heavy instead of Push->Wait.

Joeiiii
12-09-2018, 08:05 AM
With push-heavy I can move to block to the trigger, but nothing happens. The door stay closed. :(

Maybe it's a silly question, but why are guys enemies? And why they are not in the list of enemies? So it would be possible to set the guys in the enemy editor as not beatable "enemies". Maybe an idea for a update?

The "problem" in the posted picture: It is from a dungeon named "hall of wisdom", where Link can learn something about secrets and items. And because it is always good if he is learning by doing, the guy tells him, that he should push the block to the colored tile, so that the door get open. But it is not possible, if a helping guy is a bad enemy. :(

ZoriaRPG
12-09-2018, 06:05 PM
With push-heavy I can move to block to the trigger, but nothing happens. The door stay closed. :(

Maybe it's a silly question, but why are guys enemies? And why they are not in the list of enemies? So it would be possible to set the guys in the enemy editor as not beatable "enemies". Maybe an idea for a update?

The "problem" in the posted picture: It is from a dungeon named "hall of wisdom", where Link can learn something about secrets and items. And because it is always good if he is learning by doing, the guy tells him, that he should push the block to the colored tile, so that the door get open. But it is not possible, if a helping guy is a bad enemy. :(


Hmm...err... Use Flag 61 on the block itself, as an inherent flag That's |Push, 4-Way, Many. It'll work. The actual problem might be that the screen flag Block->Shutters requires enemies to be dead, but I don't think thaqt's the case. It's been a while since I made a Z1 dungeon, so I'll need to check.

Jer originally made these types of sprited objects:
GUYS, WEAPONS, ITEMS

Every |C object derives in some way from those. Screen guys, shooting statues, enemies, and faeries are all in the GUYS class. In the future, I may allow marking screen guys in such a way that they don't interfere; and likewise with faeries.

I can write a quick 'room guy' script that you can use here, to simulate the screen guy, if that'd suffice for now, and nothing else works:



//////////////////////////
/// Fake Room Guy FFC ///
/// v0.1 ///
/// 9th December, 2018 ///
/// By: ZoriaRPG ///
//////////////////////////

// Instructions
//Put a solid combo down where you want the fake guy,
//then add an ffc to the screen.
//Set the FFC combo to the combo of a guy.
//Set its script to fakeroomguy, then as the script args:

// D0: The Screen Message to show. This is mandatory.
// D1: Override the X position of the string. This is optional.
// D2: Override the Y position of the string. This is optional.
// D3: Override the default (white in Classic) string colour.
// D4: Override the default Z1 font.

ffc script fakeroomguy
{
void run(int zqstring, int mx, int my, int mcolour, int mfont)
{
if ( !mx ) mx = 24;
if ( !my ) my = 32;
if ( !mcolour ) mcolour = 0x01;
if ( !mfont ) mfont = FONT_Z1;
int buffer[100];
Game->GetMessage(zqstring, buffer);
while(1)
{

Screen->DrawString(1, mx, my, mfont, mcolour, -1, 0, buffer, 128);
Waitframe();
}
}
}

ZoriaRPG
12-09-2018, 08:07 PM
P.S. Do you have Block->Shutters, or Enemies->Shutters set in Screen Flags Joeiiii?

Joeiiii
12-10-2018, 04:41 PM
P.S. Do you have Block->Shutters, or Enemies->Shutters set in Screen Flags Joeiiii?
With a guy in the room: If Block->Shutters is checked OR unchecked, the door is closed (and the block unmoveable)

Without a guy:

If Block->Shutters is unchecked, the door is open and I can move the stone. But for what? To open an open door? :(

If Block->Shutters is checked, the door is closed, I can move the stone and the trigger makes the door open (as it should be).


The other problem: I get the following error message, if I try to load your script:

https://abload.de/img/unabletoparse0wcrc.png

ZoriaRPG
12-10-2018, 07:00 PM
With a guy in the room: If Block->Shutters is checked OR unchecked, the door is closed (and the block unmoveable)

Without a guy:

If Block->Shutters is unchecked, the door is open and I can move the stone. But for what? To open an open door? :(

If Block->Shutters is checked, the door is closed, I can move the stone and the trigger makes the door open (as it should be).


You want Block>Shutters enabled, but not Enemies->Shutters. If that solved your problem, then you likely won't need the script, unless you run into a situation where you need a room guy, and you need something such as Enemies->Secret.

Try it with your screen Guy set as 'Empty'. I think that may both show your message, and still alliow Enemy secrets.




The other problem: I get the following error message, if I try to load your script:



That's not at ASM script. You'd compile it in the ZScript buffer:

Press the 'Y' key to open the ZScript dialogue, or go to Quest->Scripts->Compile ZScript
Click the Import button
Select the file by typing in the filename under which you saved it--2.50.2 will only list files with an extension of .z--I fixed this starting in 2.53.
At the top of the buffer, add:


import "std.zh"


Close the buffer. When the dialogue asks if you wish to save it, confirm with 'Yes', then click 'Compile'.

When the compiler finishes, youll see the 'Assign to slot' dialogue.

Click on the FFC tab. click the script name, and click the assign << button t assign it to the lowest unused slot.

Click the OK button to complete the process. The script will now be available to the FFC editor dialogues.

-----or

http://timelord.insomnia247.nl/zc-dev/zasm-scripts/fakeroomguy.zasm

Download that, and use the Import ASM FFC Script dialogue to load it to your lowest-numbered, unused ffc script slot.

Joeiiii
12-11-2018, 04:03 PM
Try it with your screen Guy set as 'Empty'. I think that may both show your message, and still alliow Enemy secrets.
The door stay closed, the block unmoveable.



That's not at ASM script. You'd compile it in the ZScript buffer:

Press the 'Y' key to open the ZScript dialogue, or go to Quest->Scripts->Compile ZScript
Click the Import button
Select the file by typing in the filename under which you saved it--2.50.2 will only list files with an extension of .z--I fixed this starting in 2.53.
At the top of the buffer, add:


import "std.zh"


Close the buffer. When the dialogue asks if you wish to save it, confirm with 'Yes', then click 'Compile'.

When the compiler finishes, youll see the 'Assign to slot' dialogue.

Click on the FFC tab. click the script name, and click the assign << button t assign it to the lowest unused slot.

Click the OK button to complete the process.
I've done it so as you said. But: What then? How can I say "Script, do in this room what you should do!"? Sorry for the silly question, but I never used scripts before. :confused_white:

Slowly I think it would be better if I make the guy-room one room before and the trigger-door-room sepaerate. :P

ZoriaRPG
12-12-2018, 12:39 AM
The door stay closed, the block unmoveable.



I've done it so as you said. But: What then? How can I say "Script, do in this room what you should do!"? Sorry for the silly question, but I never used scripts before. :confused_white:

Slowly I think it would be better if I make the guy-room one room before and the trigger-door-room sepaerate. :P


https://youtu.be/tLP5o28OmMc

Note that I didn't write this to output one character at a time although that's also possible.

ZoriaRPG
12-12-2018, 12:46 AM
The door stay closed, the block unmoveable.



I've done it so as you said. But: What then? How can I say "Script, do in this room what you should do!"? Sorry for the silly question, but I never used scripts before. :confused_white:

Slowly I think it would be better if I make the guy-room one room before and the trigger-door-room sepaerate. :P


https://youtu.be/tLP5o28OmMc

Send the updated quest file to me, with room and map coordinates for this puzzle, and I'll look at it.

Here's a test quest (http://timelord.insomnia247.nl/zc-dev/quests/pushtest.qst) that demonstrates the correct set-up of the block and the trigger.

Here is a second test quest (http://timelord.insomnia247.nl/zc-dev/quests/pushtest_withroomguy.qst), adding a room guy. It still works, although because I used an upward shutter, Link can't walk to it. (The combos above and around the room guy are solid).

ZoriaRPG
12-12-2018, 02:25 AM
P.S.

Here's an update of the script, that fully-emulates the Z1 message speed and text sound:



import "std.zh"

///////////////////////////
/// Fake Room Guy FFC ///
/// v0.3 ///
/// 11th December, 2018 ///
/// By: ZoriaRPG ///
///////////////////////////

// Instructions
//Put a solid combo down where you want the fake guy,
//then add an ffc to the screen.
//Set the FFC combo to the combo of a guy.
//Set its script to fakeroomguy, then as the script args:

// D0: The Screen Message to show. This is mandatory.
// D1: Override the X position of the string. This is optional.
// D2: Override the Y position of the string. This is optional.
// D3: Override the default (white in Classic) string colour.
// D4: Override the default Z1 font.
// D5: Delay between characters output to the screen. Emulates Z1 messages.

ffc script fakeroomguy
{
void run(int zqstring, int mx, int my, int mcolour, int mfont, int delay)
{
if ( !mx ) mx = 24;
if ( !my ) my = 32;
if ( !mcolour ) mcolour = 0x01;
if ( !mfont ) mfont = FONT_Z1;
if ( !delay ) delay = 8;
int buffer[100];
GetMessage(zqstring, buffer);
for ( int q = 99; q > 0; --q )
{
if ( buffer[q] != 0 && buffer[q] != ' ' ) break;
else buffer[q] = 0;
}
int msg[100]; int pos; int f; bool trail; bool done = false;
while(1)
{

++f; ++g;
if ( !(f%delay) && !done )
{
if ( !buffer[pos] )
{
done = true;
}
else
{
msg[pos] = buffer[pos];
if ( buffer[pos] != 0 ) Game->PlaySound(18);
++pos;
}
}

Screen->DrawString(1, mx, my, mfont, mcolour, -1, 0, msg, 128);
Waitframe();
}
}
}


...and the ZASM Script (http://timelord.insomnia247.nl/zc-dev/zasm-scripts/fakeroomguy_0.3.zasm)

Joeiiii
12-13-2018, 03:54 AM
https://youtu.be/tLP5o28OmMc

Send the updated quest file to me, with room and map coordinates for this puzzle, and I'll look at it.
Thanks for the video tutorial.

But the new problem is: in the new script is an undeclared variable g. :shakehead:

https://abload.de/img/undeclaredvariablegkpigw.png

My quest: v127-fixed10.qst (https://www.file-upload.net/download-13430288/v127-fixed10.qst.html)

The room with the "problem" you can find in M14, S27

Required string is 82.

And a special only for your eyes: In M8, S76 you ca find a real picture of princess Zelda. :smile-new:

ZoriaRPG
12-13-2018, 05:38 AM
That file is incorrect, or corrupt. The ZIP contained what reported to be an ISO file.

Please use a host without adware, or send the file to me over Discord.

ZoriaRPG
12-13-2018, 07:24 AM
ZC Development Discord Server (https://discord.gg/ZqdG9wM)

For the script, change:


++f; ++g;

to


++f;

I removed (g), but I apparently pasted a version of the script that I saved before doing that.

Joeiiii
12-13-2018, 10:31 AM
It works perfect. Thank you very much.