Thank you i think it works now.I replaced all ints with doublesserengeor wrote:the first way looks correct.
Lets say width is 120.
So if you have 100 epx out of 1000 it would get calculated:
100*120/1000=12.
Try printing out every value and looking at other functions for problems.
Search found 12 matches
- Wed Feb 15, 2012 2:39 pm
- Forum: Beginners Help
- Topic: Help with displaying experience inside experience bar bounds
- Replies: 5
- Views: 399
Re: Help with displaying experience inside experience bar bo
- Wed Feb 15, 2012 1:57 pm
- Forum: Beginners Help
- Topic: Help with displaying experience inside experience bar bounds
- Replies: 5
- Views: 399
Re: Help with displaying experience inside experience bar bo
ShowRect is calling draw2d function and works(the red bar is filled properly).
I think that the problem is that i need to stretch the width so that it fills all the surface of the bar but i don't know how to calculate the ratio per % :(
int Ratio = ?
int Show = Experience * 100/ExperienceMax ...
I think that the problem is that i need to stretch the width so that it fills all the surface of the bar but i don't know how to calculate the ratio per % :(
int Ratio = ?
int Show = Experience * 100/ExperienceMax ...
- Wed Feb 15, 2012 11:53 am
- Forum: Beginners Help
- Topic: Help with displaying experience inside experience bar bounds
- Replies: 5
- Views: 399
Re: Help with displaying experience inside experience bar bo
Did i posted my question in the wrong forum ?
- Tue Feb 14, 2012 4:45 pm
- Forum: Beginners Help
- Topic: Help with displaying experience inside experience bar bounds
- Replies: 5
- Views: 399
Help with displaying experience inside experience bar bounds
Heyy :D
Im trying to display the experience of my bubble hero but im having some trouble when i attempt to render it inside
the experience bar's rectangle and i desperately need some help :oops: ..
This is my non working code that doesn't fill the whole rectangle :
int Init3dBubbleStats ...
Im trying to display the experience of my bubble hero but im having some trouble when i attempt to render it inside
the experience bar's rectangle and i desperately need some help :oops: ..
This is my non working code that doesn't fill the whole rectangle :
int Init3dBubbleStats ...
- Sun Jul 10, 2011 11:26 am
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
You didn't read carefully how cube is created :P
virtual IMeshSceneNode * addCubeSceneNode (f32 size=10.0f, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core ...
virtual IMeshSceneNode * addCubeSceneNode (f32 size=10.0f, ISceneNode *parent=0, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core ...
- Sat Jul 09, 2011 2:56 pm
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
I have another problem.Im making a zelda tile game clone to 3d ;but when im generating the world i get this :
http://i53.tinypic.com/55s2g7.png
The tile texture is this :
http://i54.tinypic.com/2mhy5ae.png
And the code is this :
void generateDungeon(int sx,int sy,int sz,int tileSize ...
http://i53.tinypic.com/55s2g7.png
The tile texture is this :
http://i54.tinypic.com/2mhy5ae.png
And the code is this :
void generateDungeon(int sx,int sy,int sz,int tileSize ...
- Thu Jul 07, 2011 2:07 pm
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
Thank you!
It took me some time
but got it to work 
It took me some time
- Wed Jul 06, 2011 4:27 pm
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
By the way , im facing another issue.
I can't get the directx drivers to work but the opengl.I think its because of codeblock's compiler , because i can use fine all drivers with ms vc
.
Any idea how to fix this
I can't get the directx drivers to work but the opengl.I think its because of codeblock's compiler , because i can use fine all drivers with ms vc
Any idea how to fix this
- Wed Jul 06, 2011 4:24 pm
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
Thanks for making it clear.
My hero can't use his gear yet , so i haven't tested the above code.... but i will do so after im done
with the controls!
My hero can't use his gear yet , so i haven't tested the above code.... but i will do so after im done
with the controls!
- Wed Jul 06, 2011 2:45 am
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Re: Some questions
Thanks both of you.
Look into rotationToDirection() and use its return vector scaled before sending it as the second parameter to move().
I don't recall if you'll need to normalize it first.
Oh my god , thank you , that's exactly what i wanted and works as expected !!! :D
As for question 2 ...
Look into rotationToDirection() and use its return vector scaled before sending it as the second parameter to move().
I don't recall if you'll need to normalize it first.
Oh my god , thank you , that's exactly what i wanted and works as expected !!! :D
As for question 2 ...
- Tue Jul 05, 2011 6:46 am
- Forum: Beginners Help
- Topic: Some questions
- Replies: 11
- Views: 886
Some questions
Hi ! Another irrlicht user here with some questions waiting for answers! :D
Question 1 :
I have the following code for my hero's movement :
void move(ISceneNode* node,const vector3df<f32>& add)
{
node->setPosition(node->getPosition() + add);
}
if(keys[up])
move(hero,vector3df(0,0,10.0f ...
Question 1 :
I have the following code for my hero's movement :
void move(ISceneNode* node,const vector3df<f32>& add)
{
node->setPosition(node->getPosition() + add);
}
if(keys[up])
move(hero,vector3df(0,0,10.0f ...
- Sun Mar 27, 2011 4:51 pm
- Forum: Project Announcements
- Topic: Stunt Marble Racers - now includes network playing
- Replies: 85
- Views: 32586