Hi I am looking for code showing a sprite attached to a ball.mdl

Posted By: ncc1701d

Hi I am looking for code showing a sprite attached to a ball.mdl - 02/23/10 23:59

Hi
I am looking for a working code sample showing a sprite.tga attached to the ball.mdl say in phyics lite c tutorial.
I have asked for working sample in another area but I dont get answer. Perhaps I was posting in the wrong area.
This has got to be easy for you experts out there.
thank you.
Posted By: rvL_eXile

Re: Hi I am looking for code showing a sprite attached to a ball.mdl - 02/24/10 14:10

Look for ent_create / vec_for_vertex, this should be help. Examples can be found in the Manual.

cYa Sebastian
Posted By: aztec

Re: Hi I am looking for code showing a sprite attached to a ball.mdl - 02/24/10 19:23

yeah or all over the forum.
I asked this question about 1 1/2 years ago too I think tongue
maybe just try using the search funktion wink
Posted By: ncc1701d

Re: Hi I am looking for code showing a sprite attached to a ball.mdl - 02/25/10 03:09

Being from a non programming background and still learning its not always easy even to know what to look for in the manual. The first time I asked the question they didnt even refer to vec_for_vertex and.. Sometimes examples in manual are to advanced as well and skip ahead mixing more than one concept which can add confusion to a brand new student like myself.
Posted By: Pappenheimer

Re: Hi I am looking for code showing a sprite attached to a ball - 02/25/10 19:02

I can tell you why I didn't answer to your post.
It is because of this phrase: "a working code sample" - when I read something like that I expect someone who isn't willing to take the effort to learn coding.
There have been too much requests where someone from the forum wrote the whole code, and result was that the requester didn't learn from it, but requested another code snippet and another and so on.

If you are satisfied with hints as well, then I, and others, can give you some.

These are the tasks that the requested code has to solve:
- placing a sprite at a certain position --> needed instruction: vec_set
- getting the position of a certain vertex of the ball.mdl --> needed instruction: vec_for_vertex and the pointers you and my
- moving the ball.mdl --> needed instruction a while loop with a wait(1) which continuesly changes the value of the position
- keeping the position of the sprite at the position of the certain vertex of the ball.mdl --> needed instruction: repeatedly vec_for_vertex
- this means that one of both entities needs to store the 'identity' of the other entity, and set the you pointer to it --> needed instructions: handle() and ptr_for_handle and a skill


You see, your requested code could be as complicated as the examples in the manual and even more.
There might be an example of a code quite similar to what you requested in the AUM, but it isn't easy to find.
One forum member made an index for the AUM, but I don't recall his name.
Posted By: ncc1701d

Re: Hi I am looking for code showing a sprite attached to a ball - 03/04/10 00:49

I hate asking questions frankly but only do it after going in circles for long time. I appreciate any guidance.
For me I think I bring 3d modeling baggage perhaps to this programing field. Since vectors arent really objects I am still struggling with how one vector relates to another vector.
A vector by itself makes sense but how one vector can relate or mix/overlap/copy over with another is the difficulty for me to mentally visualize.
Posted By: Anonymous

Re: Hi I am looking for code showing a sprite attached to a ball - 03/04/10 06:50

Do you want to stick a sprite/image to a ball model or do you want to texture your ball with a sprite?
© 2024 lite-C Forums