Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MarvinS on Tue 06/04/2004 15:36:57

Title: Character Scalling
Post by: MarvinS on Tue 06/04/2004 15:36:57
Hello,

Is there a Character Scaling function ?
Who let change the scale of a character, without to use the walkable area scaling ?

eg : SetCharacterScale(EGO, 50);
who make the character looking half little
Title: Re:Character Scalling
Post by: SSH on Tue 06/04/2004 15:56:06
No, there isn't such a function. What are you trying to achieve: maybe we can work around this?
Title: Re:Character Scalling
Post by: MarvinS on Tue 06/04/2004 22:30:30
I wanna make the same thing as in FOA game, when Indy is in the barnett  college hall, and go on the staircase and then to his car.
First Indy disappear under the stair, then he is very little and go to his car.
But i dont understand how to draw 2 different walkable area, on with scale at 100%, and the other scale at 20%, because these 2 areas must be at the same place.

Is this clear, or must I explain better ?  ;)
Title: Re:Character Scalling
Post by: Scorpiorus on Wed 07/04/2004 13:59:49
How about using of the SetAreaScaling(int area, int min, int max) function? You could temporary change walkable area's scaling than restore it back to the original value.

Title: Re:Character Scalling
Post by: MarvinS on Wed 07/04/2004 15:57:33
It's a good idea.
But I dont know when to change the AreaScale.

How can i know that the player click on a area after the staircase ?
Because, if I make only a single Walkable area, Indy will be able to go to the car, without the good scaling area.

I dont know if I'm clear.

what will be good, is that I'm able to know when the player clicks somewhere, and then the Mouse x and y coordinates.
I found Mouse.X, but it seems not to be what I want.
Or maybe, it is possible to draw a region and to know when the player click on this region ?
Title: Re:Character Scalling
Post by: Scorpiorus on Wed 07/04/2004 16:45:51
QuoteHow can i know that the player click on a area after the staircase ?
Because, if I make only a single Walkable area, Indy will be able to go to the car, without the good scaling area.
To be honest, I dont completely understand the exact scene, but if clicking on a walkable area doesn't produce a desirable result in that case then, yep you can draw a hotspot (as it more refered to what player clicks on than a region) and type-in appropriate script:

MoveCharacterBlocking(INDY, X, Y,...);


[EDIT]

I'd fiddled with overlapping walkables before. I'm not quit sure if it's a similar situation but here is a little template I made before http://www.geocities.com/scorpiorus82/stairs10.zip (right click/save as)
Title: Re:Character Scalling
Post by: MarvinS on Wed 07/04/2004 21:21:33
I try your template, but that is not what i want.

Here is a template of what I do :
http://greg_fichiers.site.voila.fr/IndyStairs.agt

It is in French, so do "Utiliser la voiture" (use the car).
The animation begin. Indy goes under the stairs (wa can still see him behind the stair, but that doesnt matter for the moment).
Then he goes to the car.
So first, he goes in the south direction, then to the north direction.
The south direction is ok. But when he goes north, he must be little (scale = 20%). But the 20% scaling area dont begin so far.

Try my template, you will understand my problem, and perhaps find a solution ;)

Thanks for helping me :)

(and Thanks Proskrito for the Indy Template ;) )
Title: Re:Character Scalling
Post by: Scorpiorus on Wed 07/04/2004 22:44:05
I see now :)

thats what I made

http://www.geocities.com/scorpiorus82/indywalks.zip (right clck/save as)

I added some new masks, changed on use hotspot (car) interaction and added player enters room before fadein.

~Cheers
Title: Re:Character Scalling
Post by: MarvinS on Wed 07/04/2004 22:58:03
Yes, that's perfect Scorpiorus !!!

Thank you very much. I have understand what you did, and its a very good idea :)

Thanks !
Title: Re:Character Scalling
Post by: on Mon 09/08/2004 15:39:17
Quote from: Scorpioruson vacation] link=topic=12888.msg154638#msg154638 date=1081374245]
I see now :)

thats what I made

http://www.geocities.com/scorpiorus82/indywalks.zip (right clck/save as)

I added some new masks, changed on use hotspot (car) interaction and added player enters room before fadein.

~Cheers

Hmm... I'm Sorry but that doesnt work for me. I use 2.61.490 and it says

PLAYER1 not defined for the function SetPlayerDefaultPosition(int plr)

I am new to AGS so i might miss something obvious. I'd really like to see this thing working in order to study it.

Thanks, Lafferty

EDIT: Got it working. I replaced PLAYER1 with 0 and PLAYER2 with 1.

But i still dont understand why that function cant access the globals PLAYER1 and PLAYER2... so some explanation would be very appreciated
Title: Re:Character Scalling
Post by: Scorpiorus on Wed 01/09/2004 17:46:45
Quote from: Lafferty on Mon 09/08/2004 15:39:17EDIT: Got it working. I replaced PLAYER1 with 0 and PLAYER2 with 1.

But i still dont understand why that function cant access the globals PLAYER1 and PLAYER2... so some explanation would be very appreciated
There was(?) a bug in the script compiler where under certain conditions it didn't report any errors if there were nested #define's macros. It actually complains about the PLAYER1_DEFAULT_POSITION macro which includes PLAYER1 being macro itself.
Title: Re: Character Scalling
Post by: Iago on Wed 19/01/2005 09:25:13
My player Character about 2 times the size of the NPCs. Is there an easy way of reducing his size?
Title: Re: Character Scalling
Post by: strazer on Thu 20/01/2005 03:41:55
No, at the moment it's not possible to directly set a character's or object's scaling.
There's a tracker entry (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=187) for that, though.

But even if it would be possible, it wouldn't look so nice. Even with anti-aliasing enabled, scaled characters will stand out.
It's best to draw all characters the same size from the get-go.

If you have drawn them the same size already, and if you have a hi-res game, be sure to check the "Import for 640x400" resolution checkbox. Otherwise the imported frames will be too big, I think.