Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How the VECTOR pointer works #341810
09/20/10 19:26
09/20/10 19:26
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
hello, i use the VECTOR pointer but i dont know how to load its variables(x,y,z)

thanks in advance..

Re: How the VECTOR pointer works [Re: peteredlin] #341812
09/20/10 19:40
09/20/10 19:40
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
yourvector.x
yourvector.y
yourvector.z

Re: How the VECTOR pointer works [Re: Lukas] #341814
09/20/10 19:46
09/20/10 19:46
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
Yes that's what i thought but some how it doesnt work in my code:

///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////////////////////////////////////
ENTITY* frame;
VECTOR* spawnp;
spawnp.x = -100;








function main()
{
level_load("small.hmp");
frame = ent_create("p360_frame.mdl",spawnp,NULL);


}

Re: How the VECTOR pointer works [Re: peteredlin] #341815
09/20/10 19:47
09/20/10 19:47
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
spawnp.x = -100;

needs to be inside a function or action.

Re: How the VECTOR pointer works [Re: Rei_Ayanami] #341817
09/20/10 19:53
09/20/10 19:53
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Additionally, you currently don't have a real VECTOR, but a VECTOR(*) pointer. Remove the star from your declaration.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: How the VECTOR pointer works [Re: Superku] #341821
09/20/10 20:14
09/20/10 20:14
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
That what i needed,thanks superku.

Re: How the VECTOR pointer works [Re: Superku] #341823
09/20/10 20:15
09/20/10 20:15
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Yeah, you can do what Superku said, or you can define your vector like this:
VECTOR* spawnp = {x=0; y=0; z=0;}
This would also initiallize all values of your vector (this is important, because if you don't initialize a variable it isn't necessarily zero!).

Re: How the VECTOR pointer works [Re: Lukas] #342040
09/22/10 20:54
09/22/10 20:54
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
Thanks this is what i needed....question solved


Gamestudio download | chip programmers | 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