Character Scalling

Started by MarvinS, Tue 06/04/2004 15:36:57

Previous topic - Next topic

MarvinS

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

SSH

No, there isn't such a function. What are you trying to achieve: maybe we can work around this?
12

MarvinS

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 ?  ;)

Scorpiorus

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.


MarvinS

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 ?

Scorpiorus

#5
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)

MarvinS

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 ;) )

Scorpiorus

#7
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

MarvinS

Yes, that's perfect Scorpiorus !!!

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

Thanks !

Lafferty

#9
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

Scorpiorus

#10
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.

Iago

My player Character about 2 times the size of the NPCs. Is there an easy way of reducing his size?

strazer

No, at the moment it's not possible to directly set a character's or object's scaling.
There's a tracker entry 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.

SMF spam blocked by CleanTalk