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
1 registered members (TipmyPip), 18,618 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
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