Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,483 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | 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