Author Topic: Object failing to cycle?  (Read 3862 times)

0 Members and 1 Guest are viewing this topic.

Offline claudehuggins

Object failing to cycle?
« on: September 26, 2016, 10:32:35 PM »
I feel like I've been posting too much... I've just been really frustrated with my code lately.
And I had been doing so well up to this point. To be fair, it was an ambitious scene for my skill level.
The main focus is an object I defined as "gelnath", which performs some animations.
He had been animating okay until this block:
Code: [Select]
if (f52) {
         erase(o4);
         set.loop(gelnath,1);
         set.cel(gelnath,0);
         start.cycling(gelnath);    //The problem happens whether this line is there or not.
         end.of.loop(gelnath,f53);
}
Wherein I do see cel 0 of loop 1, but he doesn't finish the animation. He just freezes there. You can see where I added an extra start.cycling command in an attempt to bypass anything that could be stopping his movement, but I'm not sure if it did any good at all, as the problem is still occurring. Obviously, flag 53 is never triggered. Ego can move around the room after gelnath's cel/loop changes, but the sequence never finishes. (Note: o4 is a sound effect bubble I put over the action for visual effect. I made sure it was set to ignore objects, in case collision was messing the sequence up, but to no avail.)

I had a similar issue with ego in a different room, but that was before I was aware of flag 31, and once I learned how to use it, the problem was gone. Could there be a similar situation happening with my gelnath, or is the fault in my code?

UPDATE: I "solved" this problem functionality-wise by letting the animation play out during a sound effect, then triggering flag 53 after that. It works fine, but it's not the most graceful fix I've ever done. I'm still clueless as to why the issue is there in the first place, though.
« Last Edit: September 27, 2016, 05:42:18 PM by claudehuggins »


A while ago, at a block party I found myself socially trapped at, I thought to myself: I need a t-shirt that says, "I'd rather be programming".

Offline AGKorson

Re: Object failing to cycle?
« Reply #1 on: November 17, 2023, 02:24:12 PM »
I was bored this morning, and decided to poke around in some of the old posts for anything that might be interesting. I saw this old post, and thought I'd add some insight as to what was the original problem.

Looking at cluadehuggins' code, the most likely cause of his problem is failing to reset flag f52. Without seeing the entire source code file, I can't say for sure, but if f52 does not get reset, then in every cycle, the gelnath object will be reset to cel 0 - it'll never get a chance to cycle.

When using flags to initiate blocks of code like this, you have to make sure to reet the flag so the block only runs one time.

Offline doomlazer

Re: Object failing to cycle?
« Reply #2 on: November 22, 2023, 04:47:28 AM »
If you're bored and want to look into an AGI bug:

In logic45 of SQ2 you can either sling a rock at the ape or lure him down and sneak into the elevator. Normally you would hide behind the elevator until the ape exits and then sneak around to enter the lift, but you can just walk through the guard and trigger the exit script without getting caught. You do get caught if you're more obvious. Below a certain y or something as he exits.

Threepwang loves having these bugs fixed in his translations and you might enjoy solving something like this.



« Last Edit: November 22, 2023, 07:11:45 AM by doomlazer »

Offline AGKorson

Re: Object failing to cycle?
« Reply #3 on: November 22, 2023, 09:40:39 AM »
If you're bored and want to look into an AGI bug:

In logic45 of SQ2 you can either sling a rock at the ape or lure him down and sneak into the elevator. Normally you would hide behind the elevator until the ape exits and then sneak around to enter the lift, but you can just walk through the guard and trigger the exit script without getting caught. You do get caught if you're more obvious. Below a certain y or something as he exits.

Threepwang loves having these bugs fixed in his translations and you might enjoy solving something like this.

I'm on it! Like stink on poo!

The game is afoot!

Once more, unto the breach!

Hold the mayo!

wait - never mind, keep the mayo...



SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.048 seconds with 23 queries.