Gamestudio Links
Zorro Links
Newest Posts
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
Camera always moves upwards?
by NeoDumont. 11/14/25 16:32
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 8,964 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
tritom, sheliepaley, Blueguy, blobplayintennis, someone2
19178 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
creating object / entity #306693
01/24/10 08:53
01/24/10 08:53
Joined: Dec 2008
Posts: 124
bobby_danseco Offline OP
Member
bobby_danseco  Offline OP
Member

Joined: Dec 2008
Posts: 124
hi..
how to create an object or entity in front of the player
regardless of the player facing north, south, east or west.

i am able to create but only static location
eg.
Code:
tmpLoc.x = my.x;
        tmpLoc.y = my.y + 50;
	tmpLoc.z = my.z + 50;

        tmpName = ent_createlocal(_str("cube.mdl"),vector(tmpLoc.x,tmpLoc.y,tmpLoc.z),NULL);



those were create only in one location with a distance of 50
what i want is when im facing right cube should be in front of me the same with left and so on..:)


please help..

thanks laugh

Re: creating object / entity [Re: bobby_danseco] #306702
01/24/10 09:55
01/24/10 09:55
Joined: Apr 2009
Posts: 69
Karlsruhe, Baden Württemberg,...
luckyxxl Offline
Junior Member
luckyxxl  Offline
Junior Member

Joined: Apr 2009
Posts: 69
Karlsruhe, Baden Württemberg,...
vec_for_angle(tmpLoc, my.pan);
vec_normalize(tmpLoc, 50);
vec_add(tmpLoc, my.x);
ent_create(..., tmpLoc, ...);

should work...

If the cube should be left or right the player add between line 1 and 2

vec_rotate(tmpLoc, xx); //(view manual)


Sry for my bad English!! I'm German!!
A7 Extra Edition
Intel Core i7-960 (4x3.2GHz), 8GB DDR3, 9800GT 1GB
My homepage: www.ultitech.de
Re: creating object / entity [Re: luckyxxl] #306713
01/24/10 11:46
01/24/10 11:46
Joined: Dec 2008
Posts: 124
bobby_danseco Offline OP
Member
bobby_danseco  Offline OP
Member

Joined: Dec 2008
Posts: 124
thank you very much laugh


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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