Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
about VECTOR and VECTOR* ? #272781
06/19/09 19:13
06/19/09 19:13
Joined: Oct 2008
Posts: 67
C
Crypton Offline OP
Junior Member
Crypton  Offline OP
Junior Member
C

Joined: Oct 2008
Posts: 67
Can't find them anywhere on the manual although it's the way of predefining them in Lite-C. Now I found that when using VECTOR* I get my function Kick() to crash (or declaring "VECTOR* something;" anywhere in my code I get funny results) and when I don't use the * everything works fine.

Whats up with that?

Some code:

VECTOR* vKick;

function Kick()
{
vKick.x = 150; vKick.y = 0; vKick.z = 65;
vec_rotate(vKick, eCam.pan);
phent_addvelcentral(eBall, vKick);
//Plop(); //play a sound
}
Makes it crash...

or usining VECTOR* temp:

function point_cam()
{
VECTOR* temp;
vec_set(temp, eBall.x);
vec_sub(temp, eCam.x);
vec_to_angle(eCam.pan, temp);
}

Then the camera points somewhere and I see blue sky only.

Last edited by Crypton; 06/19/09 19:13. Reason: typo

New into Gamestudio and eager to learn it..
Stuff and games done in 2D: LINK
Re: about VECTOR and VECTOR* ? [Re: Crypton] #272796
06/19/09 20:33
06/19/09 20:33
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Have a look at this Post, here it would be explain very good:
Post Vector and Vector*

Last edited by Widi; 06/19/09 20:35.
Re: about VECTOR and VECTOR* ? [Re: Widi] #272797
06/19/09 20:51
06/19/09 20:51
Joined: Oct 2008
Posts: 67
C
Crypton Offline OP
Junior Member
Crypton  Offline OP
Junior Member
C

Joined: Oct 2008
Posts: 67
Thanks, got it!


New into Gamestudio and eager to learn it..
Stuff and games done in 2D: LINK

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1