| View previous topic :: View next topic |
| Author |
Message |
nDEV
Joined: 13 Apr 2007 Posts: 48
|
Posted: Fri Apr 13, 2007 1:32 am Post subject: [OSlib] Few questions |
|
|
Hello!
Im using this great library to write a small game, and now its time to create a few animated characters but i have no idea how to do it in oslib.
What i want is to create animations at a given position.
For example:
void make_anime(int x,int y)
{
c = new animation(x,y)
return...
}
Any ideas how to do it?
Also , what's the use of centerX & Y?
Thanks. |
|
| Back to top |
|
 |
nDEV
Joined: 13 Apr 2007 Posts: 48
|
Posted: Fri Apr 13, 2007 5:17 pm Post subject: |
|
|
| bump |
|
| Back to top |
|
 |
Yodajr
Joined: 24 Sep 2005 Posts: 13
|
Posted: Fri Apr 13, 2007 9:04 pm Post subject: |
|
|
Animations ? try this : http://www.playeradvance.org/forum/showthread.php?t=2178
(it is in french, but easy to understand with google translation)
CenterX & Y defines the center of the image. By default, they are at the upper left corner of the image.
If you try to rotate the image for example, the image will rotate around his center... try, you will understand. _________________ Tutorials about OSLib here |
|
| Back to top |
|
 |
nDEV
Joined: 13 Apr 2007 Posts: 48
|
Posted: Sat Apr 14, 2007 3:55 am Post subject: |
|
|
Thanks , " oslSetImageTileSize" is what i need.
But still , i have no idea how to create a new image each time....any ideas? |
|
| Back to top |
|
 |
Yodajr
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sat Apr 14, 2007 4:48 am Post subject: |
|
|
What you don't understand in the tuto ? _________________ Tutorials about OSLib here |
|
| Back to top |
|
 |
nDEV
Joined: 13 Apr 2007 Posts: 48
|
Posted: Sat Apr 14, 2007 6:43 am Post subject: |
|
|
Well , i can do the animation , but i need to create a new object every time..
For example :
Each time one enemy is about to die i want to play the animation at his current position(i know how to this) , but the problem is that each time i kill an enemy the animation will just keep moving at different positions.
So , i need a way to create a new animation every time..!! |
|
| Back to top |
|
 |
Yodajr
Joined: 24 Sep 2005 Posts: 13
|
Posted: Sat Apr 14, 2007 9:19 am Post subject: |
|
|
Sorry, I can't help you, I do not understand what you want :/ _________________ Tutorials about OSLib here |
|
| Back to top |
|
 |
nDEV
Joined: 13 Apr 2007 Posts: 48
|
Posted: Sat Apr 14, 2007 7:52 pm Post subject: |
|
|
What i want is to create a new instance of the object dynamically
Ce que je veux doit créer un nouvel exemple de l'objet dynamiquement(by babel fish) |
|
| Back to top |
|
 |
|