|
Author
|
|
Thread
|
|
|
|
|
|
08-27-2004 15:14
Posted by:
MapMaker
Location:
Edmonton, Alberta (Canada)

|
Hi,
I'm stuck with a problem with this command.
I'm working on a game where the player builds up his ship, selecting different components. As he selects the different compontents, different pictures are added together, resulting in one finished ship. This ship is then copied to an image bank to be used as a sprite for the game.
However, when the ship needs to be used, the relative hotspot has to be in the center of the ship for proper rotation.
But the copy image command doesn't let you select a relative hotspot.
Hence my problem.
Any Ideas?
Thanks,
MapMaker
|
|
08-27-2004 19:55
Posted by:
Fischgurkensenf
Location:
Bern, Switzerland

|
Yes, I had this problem, too. And it SUCKS. i think there's NO fix....
|
|
08-28-2004 14:00
Posted by:
matteo
Location:
Venice, ITALY!

|
Of C there is! You just have to get the sprite dimensions (I think with image width/height...) then set the hotspot to be 0.5*image width...
|
|
08-28-2004 14:58
Posted by:
MapMaker
Location:
Edmonton, Alberta (Canada)

|
...
And maybe you could explain to me how to set hotspots without a 'set hotspot' command?
Always Thankful,
MapMaker
|
|
08-28-2004 15:09
Posted by:
someone
Location:
Quebec ( Canada )

|
i dunno if the command exists, but you could fix that when displaying the sprite:
sprite 1,x-width/2,y-height/2,image
it wil just work like it was a centered hotspot ( or, if it doesn't work ,try replacing the - by +, i never remember wich one to use ;)
|
|
08-28-2004 16:03
Posted by:
MapMaker
Location:
Edmonton, Alberta (Canada)

|
But unfortunately that doesnt help much with sprite rotation, the axis is still in the wrong place..
|
|
08-28-2004 16:08
Posted by:
Fischgurkensenf
Location:
Bern, Switzerland

|
Yes, that's the problem Mapmaker...... I made an example that reads out the text of a file and then save it as a sprite. i wanted to rotate that sprite, but I can't get it working.
|
|
08-31-2004 22:37
Posted by:
-wyvern
Location:
Bedroom

|
I'm really sure that you can reselect hotspots... Although this might be just a fevered dream, since my first attempt at a workaround caused TNT to crash mac OS X in to a billion pieces.
So, yeah.
|
|
09-01-2004 01:22
Posted by:
matteo
Location:
Venice, ITALY!

|
Check the commands better!!!!
Hey, the nice thing of TNT is that there are very few commands... you really dont need much to check them all... here's what youre looking for...
Set Image Offsets
Changes the position of the image's offsets
Syntax
Set Image Offset image,x,y
Set Image Offset image,bankNumber,x,y
Description
image is the index into the bank of the image to use.
bankNumber is the id of the image bank to get the image from. If this is not specified then the default image bank is used.
x,y are the new offsets for the image
|
|
09-01-2004 14:21
Posted by:
MapMaker
Location:
Edmonton, Alberta (Canada)

|
...
Unfortunately this command does not work for me. Hieroglyph does not recognise that command. Maybe you could give it a try for me and tell me if it works for you?
Thanks,
MapMaker
|
|
09-01-2004 22:38
Posted by:
someone
Location:
Quebec ( Canada )

|
the command does exist, check the docs ( help menu ) if the command's not listed then try downloading the latest version otherwise you probably mispelled it
|
|
09-05-2004 14:33
Posted by:
eekaydee
Location:
CA, USA

|
Hey, I didn't know there was a "set sprite offsets" command!
Anyway, that still doesn't answer the question. The relative hot spots don't work correctly, I believe. They just don't work. The workaround is to maybe set absolute hotspots or use the set sprite offsets command.
Oh, and for he who asked, the relative hotspot and absolute hotspot settings are accessed from the image bank window when you're in the graphics tab of heiroglyph. It's the window with the mask and stuff.
|
|
09-05-2004 19:35
Posted by:
MapMaker
Location:
Edmonton, Alberta (Canada)

|
Well what do you know...
:D
Sucess!
I guess matteo was right after all...
The command is "set image offsets", unlike the documentation which says that its "set image offset" (Mark or John if your reading it should be fixed).
The actual syntax that I used is:
set image offsets 0,129,(image width (0,129))/2,(image height (0,129))/2
Thanks all for your help,
MapMaker
|
|
All times are GMT
|
|
|
|
|