conversion problems

Started by M, Sun 15/08/2004 18:32:19

Previous topic - Next topic

M

So I converted a game to v2.61 from v2.56b and I've noticed some problems.

The problem is when using the FaceLocation() command. Basically, in the game its used a lot - mainly for the purpose of changing the loop in a view. The thing is, since converting - none of the previously coded FaceLocation() stuff is working!

For example, on the intro of this game theres a guy on a ledge (yeah, this is Perils of Poom I'm talking about). I used FaceLocation every few seconds to get him to look in a different direction - so the graphic changes and when he talks, it will have a different talking animation than when facing the other direction. The problem is none of that is happening. He's just in the same direction the whole time, same talking animation. (hope i wrote that clearly enough)

The thing is the code is exactly how it should be. It says FaceLocation etc etc, everything is normal but yet its still not working. I've been writing some new stuff in 2.61 using FaceLocation and that seems to be working ok though.

Can anyone offer any suggestions? Being an idiot, I'm not sure if I got an up-to-date backup of the game handy.

Ashen_Away

#1
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=6429.0

Similar problem. I think the fix is to add Wait(1); after the FaceLocation.

M

I've already got Wait() commands in place but still no difference.

Here's some of the code I got:

Quote
FaceLocation (JAY, character[JAY].x, character[JAY].y + 5); //face down
Wait (30);
FaceLocation (JAY, character[JAY].x - 5, character[JAY].y); //face left
Wait (50);

Gilbert

Hmmm try to make him look farther and see if it makes a difference, eg.
FaceLocation (JAY, character[JAY].x, character[JAY].y + 100); //face down
Wait (30);
FaceLocation (JAY, character[JAY].x - 100, character[JAY].y); //face left
Wait (50);

M

Still no good I'm afraid. The thing is, as I said, this is only a problem in the rooms I converted from v2.56b. I added some new rooms, using similar FaceLocation() commands and they work perfectly.

I'm hoping this isnt a case of doing all the rooms again from stratch in v2.61 - copying/pasting code parts, etc.

Gilbert

Strange problem, can you upload a room that exhibits this problem for us to check (can be a bug though)?

Pumaman

I can't see a reason why one room would work differently to another -- they both call thorugh to the same FaceLocation function in AGS, regardless.

As Gilbot says, something to demonstrate the problem would be handy.

M

#7
Well, here's a room running (compiled) and the room file on its own (editable). As you can tell by the code, the characters direction should change after certain time intervals but its staying in the same direction.

And to add to my frustrations, when I imported this room to a new game using the default EGO character (i.e. changing ego's name to 'jay'), it worked with ego looking in these directions. Maybe its not just the room code but something to do with the sprites/characters when they were converted. That said, I've had a look and can't see a problem - all the views for different directions are there.

Man... what a problem...

==EDIT==
Oh yeah, there is a variable called 'cutscene' there (in the room code) which doesnt seem to do much. That's coz the room code was initially a lot longer with code for like 3 cutscenes in it for different values of the variable, but I deleted it for this demonstration. Forgot to take out the variable itself, though. Yeah...

Pumaman

Ah, I think this is due to the new support for 2-loop characters.

Basically, if the character has less than 4 loops, it assumes you only want left and right animations. Because you're only drawn Down and Left animations for him (presumably because that's all he needs), it's assuming wrongly that you only want left & right.

The workaround is to create 4 loops in the view, and add a dummy frame to the 4th loop.

Meanwhile, I'll fix up AGS so that it only makes this assumption if both loop 0 AND loop 3 are empty.

M

Ah, yeah. That got it. Thanks a lot, CJ. And thanks everyone for the suggestions. Sorted it me right aat.

Mike.

SMF spam blocked by CleanTalk